Graylog icon

Graylog

Consume Graylog API (v.1.1.0)

Overview

The Graylog node for n8n enables users to interact with the Graylog API, specifically to suggest possible values for a given field based on input criteria. The "Suggest Field Value" operation under the "Suggestions" resource is designed to help users dynamically retrieve likely or valid values for a specified field, which can be useful for building dynamic forms, data validation, or providing user assistance in workflows that integrate with Graylog.

Practical examples:

  • Auto-completing log field values in a UI.
  • Validating user input against existing Graylog data.
  • Building dynamic filters or search suggestions in dashboards.

Properties

Name Type Meaning
Authentication options The authentication method to use (Token Authentication or Basic Authentication).
Input string The input value or partial value for which suggestions are needed.
Field string The name of the field in Graylog for which to suggest values.
Additional Fields collection Optional parameters such as timerange type, size (number of suggestions), and streams.
Simplify boolean If true, simplifies the output structure for easier downstream processing.
Simplify Path string (Optional) Path to the property that should be returned when simplifying the output.

Output

  • The node outputs a json object containing the suggested values for the specified field.
  • If the Simplify option is enabled, the output may be reduced to only the relevant property or array, optionally using the Simplify Path to extract a specific part of the response.
  • The exact structure depends on the Graylog API's response for field suggestions, but typically includes an array of suggested values and possibly metadata about the suggestion process.

Example output (simplified):

{
  "suggestions": [
    "value1",
    "value2",
    "value3"
  ]
}

or, if simplified with a path:

[
  "value1",
  "value2",
  "value3"
]

Dependencies

  • External Service: Requires access to a running Graylog instance with API enabled.
  • Authentication: Needs either a Graylog API token or username/password credentials configured in n8n.
  • n8n Credentials: Must set up either "Graylog Token API" or "Graylog Basic API" credentials in n8n.
  • Environment Variables: None required by default, unless your Graylog instance requires special configuration.

Troubleshooting

Common issues:

  • Invalid credentials: If authentication fails, ensure the correct credential type is selected and credentials are valid.
  • Field not found: If the specified field does not exist in Graylog, the node may return an error or empty suggestions.
  • API connectivity: Network issues or incorrect Graylog API URL can cause connection errors.

Error messages and resolutions:

  • "401 Unauthorized" – Check your authentication method and credentials.
  • "Field not found" – Verify the field name matches one in your Graylog instance.
  • "Request failed" – Ensure the Graylog server is reachable from your n8n instance.

Links and References

Discussion