# Graylog

> Search and count your Graylog log messages, pause and resume streams, turn event definitions on and off, search alerts and send log messages. Start a workflow for each new alert or matching message, or when a count of messages crosses a threshold.

App · 11 actions. Web page: https://docs.lodol.com/docs/integrations/graylog

## Actions

### Count messages

Count the messages that match a search in the last few minutes or hours, such as errors from one server in the last 15 minutes, in all or for each value of a field, to compare with a threshold.

**Inputs**

- Search query (`query`, text): What to find, as typed in Graylog's search bar, such as level:3 AND source:web-01 or "payment declined". Leave empty for every message.
- Stream (`stream`, text): Only messages in this stream. Leave empty for every stream the token can see.
- Time range (`since`, text): How far back to look. Defaults to the last hour. A length of time such as 30m or 2d works too, up to 90 days. One of: `5m` (Last 5 minutes), `15m` (Last 15 minutes), `1h` (Last hour), `6h` (Last 6 hours), `24h` (Last 24 hours), `7d` (Last 7 days), `30d` (Last 30 days). Default: `1h`.
- From (`start`, date and time): Instead of the time range: when to start. Leave empty to use the time range.
- To (`end`, date and time): When to stop. Leave empty for now.
- Count for each (`group_by`, text): A field to count separately for each of its values, such as source or level. Leave empty for one total.
- Most values (`limit`, number): With Count for each: how many of its values to count, most first. Defaults to 10, up to 100. From 1 to 100.

**Outputs**

- `count` (number): How many messages matched, in all
- `end` (text): Where it ended, in UTC (ISO 8601)
- `group_by` (text): The field counted by; empty for one total
- `groups` (list): The count for each value of the field counted by, most first
- `query` (text): The Graylog search query that ran; * for every message
- `start` (text): Where the time range began, in UTC (ISO 8601)
- `streams` (list): The streams searched; empty for every stream the token sees

**Example output**

```json
{
  "count": 151,
  "end": "2026-11-09T14:30:00.000Z",
  "group_by": "source",
  "groups": [
    {
      "count": 97,
      "value": "checkout-01"
    },
    {
      "count": 54,
      "value": "checkout-02"
    }
  ],
  "query": "level:3",
  "start": "2026-11-09T14:15:00.000Z",
  "streams": []
}
```

### Disable event definition

Turn an event definition off, so it stops raising events and alerts, such as while a known problem is being fixed.

**Inputs**

- Event definition (`event_definition`, text, required): The event definition, by title or id.

**Outputs**

- `alert` (true/false): True when it sends notifications, so its events are alerts
- `description` (text): Its description
- `enabled` (true/false): True when it runs on its schedule
- `id` (text): The event definition's id
- `last_matched` (text): When it last matched, in UTC (ISO 8601)
- `priority` (number): Its priority: 1 Low, 2 Medium, 3 High, 4 Critical
- `priority_label` (text): Its priority by name, such as High
- `query` (text): The search it runs, if it is a search condition
- `stream_ids` (list): The streams it searches
- `title` (text): Its title
- `type` (text): Its kind, such as aggregation-v1 for a search condition
- `updated_at` (text): When it was last changed, in UTC (ISO 8601)

**Example output**

```json
{
  "alert": true,
  "description": "Error-level payment messages from checkout",
  "enabled": false,
  "id": "6af392ab573a5d60a357e39b",
  "last_matched": "2026-11-09T14:21:10.000Z",
  "priority": 3,
  "priority_label": "High",
  "query": "level:3 AND payment",
  "stream_ids": [
    "6af39249573a5d60a357e343"
  ],
  "title": "Payment failures",
  "type": "aggregation-v1",
  "updated_at": "2026-11-02T09:20:01.000Z"
}
```

### Enable event definition

Turn an event definition on, so it searches on its schedule and raises events and alerts again.

**Inputs**

- Event definition (`event_definition`, text, required): The event definition, by title or id.

**Outputs**

- `alert` (true/false): True when it sends notifications, so its events are alerts
- `description` (text): Its description
- `enabled` (true/false): True when it runs on its schedule
- `id` (text): The event definition's id
- `last_matched` (text): When it last matched, in UTC (ISO 8601)
- `priority` (number): Its priority: 1 Low, 2 Medium, 3 High, 4 Critical
- `priority_label` (text): Its priority by name, such as High
- `query` (text): The search it runs, if it is a search condition
- `stream_ids` (list): The streams it searches
- `title` (text): Its title
- `type` (text): Its kind, such as aggregation-v1 for a search condition
- `updated_at` (text): When it was last changed, in UTC (ISO 8601)

**Example output**

```json
{
  "alert": true,
  "description": "Error-level payment messages from checkout",
  "enabled": true,
  "id": "6af392ab573a5d60a357e39b",
  "last_matched": "2026-11-09T14:21:10.000Z",
  "priority": 3,
  "priority_label": "High",
  "query": "level:3 AND payment",
  "stream_ids": [
    "6af39249573a5d60a357e343"
  ],
  "title": "Payment failures",
  "type": "aggregation-v1",
  "updated_at": "2026-11-02T09:20:01.000Z"
}
```

### Get system status

Check Graylog's health: whether it is running and processing messages, its search cluster's health (green, yellow or red), its nodes and its system notifications.

**Inputs**: None.

**Outputs**

- `cluster_id` (text): The cluster's id
- `healthy` (true/false): True when Graylog is running and processing messages and its search cluster is green
- `hostname` (text): The host name of the node that answered
- `indexer_status` (text): The search cluster's health: green, yellow or red
- `is_processing` (true/false): True when it is processing messages
- `lifecycle` (text): Its state, such as running
- `node_count` (number): How many nodes there are
- `nodes` (list): The Graylog nodes in the cluster
- `notifications` (list): Graylog's system notifications, which name problems to look at
- `shards` (object): The search cluster's shards by state
- `started_at` (text): When the node started, in UTC (ISO 8601)
- `timezone` (text): Its time zone
- `version` (text): Graylog's version

**Example output**

```json
{
  "cluster_id": "a01aa45b-13f7-465f-be75-b053605860a0",
  "healthy": true,
  "hostname": "graylog-01",
  "indexer_status": "green",
  "is_processing": true,
  "lifecycle": "running",
  "node_count": 1,
  "nodes": [
    {
      "hostname": "graylog-01",
      "is_leader": true,
      "last_seen": "2026-11-09T14:29:58.000Z",
      "node_id": "9ab13ac4-eb70-421b-bb74-9deaedd6de68"
    }
  ],
  "notifications": [],
  "shards": {
    "active": 6,
    "initializing": 0,
    "relocating": 0,
    "unassigned": 0
  },
  "started_at": "2026-11-09T08:00:12.994Z",
  "timezone": "Etc/UTC",
  "version": "6.3.15+3ad654f"
}
```

### List event definitions

List the event definitions (Graylog's alert rules) the token can see, with their priority and whether each is enabled.

**Inputs**

- Title contains (`query`, text): Only event definitions whose title contains this. Leave empty for all.
- Limit (`limit`, number): The most to return. Defaults to 100. From 1 to 1000.

**Outputs**

- `count` (number): How many were returned
- `enabled_count` (number): How many of those returned are enabled
- `event_definitions` (list): The event definitions, by title
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "enabled_count": 1,
  "event_definitions": [
    {
      "alert": true,
      "description": "Error-level payment messages from checkout",
      "enabled": true,
      "id": "6af392ab573a5d60a357e39b",
      "last_matched": "2026-11-09T14:21:10.000Z",
      "priority": 3,
      "priority_label": "High",
      "query": "level:3 AND payment",
      "stream_ids": [
        "6af39249573a5d60a357e343"
      ],
      "title": "Payment failures",
      "type": "aggregation-v1",
      "updated_at": "2026-11-02T09:20:01.000Z"
    }
  ],
  "total": 1
}
```

### List streams

List the streams the token can see, with whether each is running or paused.

**Inputs**: None.

**Outputs**

- `count` (number): How many streams there are
- `paused_count` (number): How many of them are paused
- `streams` (list): The streams, by name

**Example output**

```json
{
  "count": 1,
  "paused_count": 0,
  "streams": [
    {
      "created_at": "2026-11-02T09:12:44.000Z",
      "description": "Messages from the checkout servers",
      "editable": true,
      "id": "6af39249573a5d60a357e343",
      "index_set_id": "6af39211573a5d60a357e154",
      "is_default": false,
      "paused": false,
      "rule_count": 1,
      "title": "Checkout"
    }
  ]
}
```

### Pause stream

Pause a stream, so messages stop being routed into it (and its alerts stop) until it is resumed, such as during planned maintenance.

**Inputs**

- Stream (`stream`, text, required): The stream, by name or id. The token's user needs it shared as Manager.

**Outputs**

- `created_at` (text): When it was created, in UTC (ISO 8601)
- `description` (text): What the stream holds
- `editable` (true/false): False for Graylog's own streams, which can't be paused
- `id` (text): The stream's id
- `index_set_id` (text): The index set it stores messages in
- `is_default` (true/false): True for the Default Stream
- `paused` (true/false): True when the stream is paused
- `rule_count` (number): How many rules route messages into it
- `stream_id` (text): The id of the stream changed
- `title` (text): The stream's name

**Example output**

```json
{
  "created_at": "2026-11-02T09:12:44.000Z",
  "description": "Messages from the checkout servers",
  "editable": true,
  "id": "6af39249573a5d60a357e343",
  "index_set_id": "6af39211573a5d60a357e154",
  "is_default": false,
  "paused": true,
  "rule_count": 1,
  "stream_id": "6af39249573a5d60a357e343",
  "title": "Checkout"
}
```

### Resume stream

Resume a paused stream, so messages are routed into it again.

**Inputs**

- Stream (`stream`, text, required): The stream, by name or id. The token's user needs it shared as Manager.

**Outputs**

- `created_at` (text): When it was created, in UTC (ISO 8601)
- `description` (text): What the stream holds
- `editable` (true/false): False for Graylog's own streams, which can't be paused
- `id` (text): The stream's id
- `index_set_id` (text): The index set it stores messages in
- `is_default` (true/false): True for the Default Stream
- `paused` (true/false): True when the stream is paused
- `rule_count` (number): How many rules route messages into it
- `stream_id` (text): The id of the stream changed
- `title` (text): The stream's name

**Example output**

```json
{
  "created_at": "2026-11-02T09:12:44.000Z",
  "description": "Messages from the checkout servers",
  "editable": true,
  "id": "6af39249573a5d60a357e343",
  "index_set_id": "6af39211573a5d60a357e154",
  "is_default": false,
  "paused": false,
  "rule_count": 1,
  "stream_id": "6af39249573a5d60a357e343",
  "title": "Checkout"
}
```

### Search events and alerts

Find the events and alerts Graylog raised in the last few minutes or hours, newest first: all of them, or only alerts, of one event definition, or from a priority up.

**Inputs**

- Show (`include`, text): Alerts and events (the default), alerts only, or only events that aren't alerts. One of: `all` (Alerts and events), `alerts` (Alerts only), `events` (Events that aren't alerts). Default: `all`.
- Event definition (`event_definition`, text): Only events of this event definition. Leave empty for all.
- Priority (`priority`, text): Only events of this priority or higher. One of: `any` (Any priority), `2` (Medium or higher), `3` (High or higher), `4` (Critical only). Default: `any`.
- Search query (`query`, text): Only events whose message or fields match this, such as payment or fields.order_id:48213. Leave empty for all.
- Time range (`since`, text): How far back to look. Defaults to the last hour. A length of time such as 30m or 2d works too, up to 90 days. One of: `5m` (Last 5 minutes), `15m` (Last 15 minutes), `1h` (Last hour), `6h` (Last 6 hours), `24h` (Last 24 hours), `7d` (Last 7 days), `30d` (Last 30 days). Default: `1h`.
- From (`start`, date and time): Instead of the time range: when to start. Leave empty to use the time range.
- To (`end`, date and time): When to stop. Leave empty for now.
- Limit (`limit`, number): The most to return. Defaults to 50. From 1 to 1000.

**Outputs**

- `alert_count` (number): How many of those returned are alerts
- `count` (number): How many were returned
- `events` (list): The events, newest first
- `total` (number): How many match in all

**Example output**

```json
{
  "alert_count": 1,
  "count": 1,
  "events": [
    {
      "alert": true,
      "event_definition_id": "6af392ab573a5d60a357e39b",
      "event_definition_title": "Payment failures",
      "fields": {},
      "group_by_fields": {},
      "id": "01M73Q9W89TWW2JEDCJCKS9TGR",
      "key": "",
      "message": "Payment failures",
      "priority": 3,
      "priority_label": "High",
      "source": "graylog-01",
      "source_streams": [
        "6af39249573a5d60a357e343"
      ],
      "timestamp": "2026-11-09T14:21:07.418Z",
      "timestamp_processing": "2026-11-09T14:22:00.297Z"
    }
  ],
  "total": 1
}
```

### Search messages

Find the log messages that match a search, in the last few minutes or hours or between two times, newest first. Get each message with its time, source and the fields you choose, and all of them as text for an AI step or a message.

**Inputs**

- Search query (`query`, text): What to find, as typed in Graylog's search bar, such as level:3 AND source:web-01 or "payment declined". Leave empty for every message.
- Stream (`stream`, text): Only messages in this stream. Leave empty for every stream the token can see.
- Time range (`since`, text): How far back to look. Defaults to the last hour. A length of time such as 30m or 2d works too, up to 90 days. One of: `5m` (Last 5 minutes), `15m` (Last 15 minutes), `1h` (Last hour), `6h` (Last 6 hours), `24h` (Last 24 hours), `7d` (Last 7 days), `30d` (Last 30 days). Default: `1h`.
- From (`start`, date and time): Instead of the time range: when to start. Leave empty to use the time range.
- To (`end`, date and time): When to stop. Leave empty for now.
- Fields (`fields`, text): Other fields to get with each message, separated by commas, such as level, http_status. The time, source and message always come back.
- Limit (`limit`, number): The most messages to return. Defaults to 50, up to 1000. From 1 to 1000.
- Order (`order`, text): Newest messages first (the default), or oldest first. One of: `newest` (Newest first), `oldest` (Oldest first). Default: `newest`.

**Outputs**

- `count` (number): How many messages were returned
- `end` (text): Where it ended, in UTC (ISO 8601)
- `limit_reached` (true/false): True when the limit was reached, so there may be more
- `messages` (list): The matching messages, in the order asked for
- `query` (text): The Graylog search query that ran; * for every message
- `start` (text): Where the time range began, in UTC (ISO 8601)
- `streams` (list): The streams searched; empty for every stream the token sees
- `text` (text): Every message as text, one a line with its time and source, ready for an AI step or a message

**Example output**

```json
{
  "count": 1,
  "end": "2026-11-09T14:30:00.000Z",
  "limit_reached": false,
  "messages": [
    {
      "fields": {
        "level": 3,
        "order_id": "48213"
      },
      "id": "3bebbab0-dd51-11f1-b786-e2a8d2599290",
      "message": "payment declined for order 48213: card expired",
      "source": "checkout-01",
      "timestamp": "2026-11-09T14:21:07.418Z"
    }
  ],
  "query": "level:3 AND payment",
  "start": "2026-11-09T13:30:00.000Z",
  "streams": [
    "6af39249573a5d60a357e343"
  ],
  "text": "2026-11-09T14:21:07.418Z checkout-01: payment declined for order 48213: card expired (level=3, order_id=48213)"
}
```

### Send log message

Send a message to Graylog through its GELF HTTP input, such as an audit trail of what a workflow did, with fields you choose. Needs the input's address on the connection.

**Inputs**

- Message (`message`, text, required): The text to log, such as Refund 48213 approved.
- Level (`level`, text): How serious it is. Defaults to Informational. One of: `0` (Emergency), `1` (Alert), `2` (Critical), `3` (Error), `4` (Warning), `5` (Notice), `6` (Informational), `7` (Debug). Default: `6`.
- Source (`source`, text): The host or app to log it as, such as billing-workflow. Defaults to lodol.
- Fields (`fields`, object): Extra fields to send with it, by name, such as order_id and workflow, which you can search for in Graylog.
- Details (`full_message`, text): A longer text kept with the message, such as a stack trace.
- Time (`timestamp`, date and time): When it happened. Leave empty for now.

**Outputs**

- `fields` (object): The extra fields sent with it, by name
- `level` (number): Its level, as a syslog severity from 0 (Emergency) to 7 (Debug)
- `level_label` (text): Its level by name, such as Informational
- `message` (text): The message sent
- `sent` (true/false): True once the GELF HTTP input took the message
- `source` (text): The source it was sent as
- `timestamp` (text): The time it carries, in UTC (ISO 8601)

**Example output**

```json
{
  "fields": {
    "order_id": "48213",
    "workflow": "refunds"
  },
  "level": 6,
  "level_label": "Informational",
  "message": "Refund 48213 approved by the finance workflow",
  "sent": true,
  "source": "lodol",
  "timestamp": "2026-11-09T14:30:00.000Z"
}
```
