Graylog icon

Graylog

Consume Graylog API (v.1.1.0)

Overview

This n8n node allows you to update a "Decorator" resource in Graylog via its API. Decorators in Graylog are used to modify or enrich log messages as they are displayed, such as adding computed fields or formatting data. This node is useful for automating the management of decorators, for example, updating their configuration or properties as part of a workflow.

Common scenarios:

  • Automatically updating decorator settings when deploying new log analysis rules.
  • Adjusting decorator order or type based on dynamic workflow conditions.
  • Integrating with other systems to keep Graylog decorators in sync.

Practical example:
You might use this node to change the stream or type of a decorator after a new log source is added, ensuring that logs are processed and displayed correctly without manual intervention.

Properties

Name Type Meaning
Authentication options The authentication method to use (Token Authentication or Basic Authentication).
Id string The unique identifier of the decorator to update.
Additional Fields collection Optional fields to further specify the update: Stream, Type, Order (sort direction).
Simplify boolean If enabled, returns only the main response property instead of the full API response.
Simplify Path string Path to a specific property in the response to return if simplification is enabled.

Output

  • json: The output will contain the updated decorator object as returned by the Graylog API.
    • If "Simplify" is enabled, only the specified property (or the main property) will be included in the output.
    • If "Simplify Path" is set, only the value at that path in the response will be returned.
  • Binary: This node does not output binary data.

Dependencies

  • Graylog instance: You must have access to a running Graylog server.
  • API Credentials: Requires either a Token or Basic Authentication credentials configured in n8n:
    • graylogTokenApi for token-based authentication.
    • graylogBasicApi for basic authentication.
  • n8n Configuration: Ensure the appropriate credentials are set up in your n8n instance.

Troubleshooting

  • Authentication errors:
    • Error message: "Invalid credentials" or "401 Unauthorized".
      • Resolution: Check that the correct authentication method is selected and valid credentials are provided in n8n.
  • Resource not found:
    • Error message: "404 Not Found" or similar.
      • Resolution: Verify that the "Id" property matches an existing decorator in Graylog.
  • Insufficient permissions:
    • Error message: "403 Forbidden".
      • Resolution: Ensure the user associated with the credentials has permission to update decorators.
  • Invalid additional fields:
    • Error message: "Bad Request" or validation errors from Graylog.
      • Resolution: Double-check the values provided in "Additional Fields" for correctness.

Links and References

Discussion