Actions20
- Legacy Actions
- Decorators Actions
- Exports Actions
- Messages Actions
- Metadata Actions
- Saved Actions
- Suggestions Actions
- Validation Actions
Overview
The Graylog node for n8n allows you to interact with the Graylog API, specifically to create new Decorators using the "Create" operation. This is useful in scenarios where you want to automate the management of log data presentation within Graylog, such as programmatically adding or updating decorators that modify how logs are displayed or processed.
Practical examples:
- Automatically add a decorator to highlight certain log messages based on dynamic criteria.
- Integrate with other systems to create decorators when specific events occur (e.g., after deploying a new service).
Properties
| Name | Type | Meaning |
|---|---|---|
| Authentication | options | The authentication method to use for connecting to Graylog ("Token Authentication" or "Basic Authentication"). |
| Type | string | The type of decorator to create. This is a required field. |
| Additional Fields | collection | Optional fields to further specify the decorator: - Id: Identifier for the decorator. - Stream: Associated stream. - Order: The sort direction. |
| Simplify | boolean | If enabled, simplifies the output structure. |
| Simplify Path | string | (Optional) Path to the property that should be returned if simplification is enabled. |
Output
- The node outputs a
jsonobject containing the response from the Graylog API for the "Create Decorator" operation. - If "Simplify" is enabled, only the specified path (if provided) will be returned in the output.
- The exact structure of the output depends on the Graylog API's response for creating a decorator, but typically includes details about the created decorator (such as its ID, type, and configuration).
- Binary Data: This node does not output binary data; all output is in JSON format.
Dependencies
- External Services: Requires access to a running Graylog instance with API enabled.
- API Keys / Credentials:
- For Token Authentication: Requires a valid Graylog API token (
graylogTokenApicredential in n8n). - For Basic Authentication: Requires Graylog username and password (
graylogBasicApicredential in n8n).
- For Token Authentication: Requires a valid Graylog API token (
- n8n Configuration: Ensure the appropriate credentials are set up in n8n under the respective names.
Troubleshooting
Common Issues:
- Authentication Errors:
- Error Message: "Invalid credentials" or "401 Unauthorized".
Resolution: Check that the correct authentication method is selected and the credentials are valid and active in n8n.
- Error Message: "Invalid credentials" or "401 Unauthorized".
- Missing Required Fields:
- Error Message: "Type is required" or similar.
Resolution: Ensure the "Type" property is filled in.
- Error Message: "Type is required" or similar.
- Connection Errors:
- Error Message: "Cannot connect to Graylog API".
Resolution: Verify network connectivity to the Graylog server and that the API endpoint is accessible.
- Error Message: "Cannot connect to Graylog API".
- Invalid Additional Fields:
- Error Message: "Invalid field value" or "Bad Request".
Resolution: Double-check the values provided in "Additional Fields" for correctness according to your Graylog setup.
- Error Message: "Invalid field value" or "Bad Request".
