Centreon icon

Centreon

Interagir avec l’API Centreon Web (v2)

Overview

This node integrates with the Centreon Web API (version configurable, e.g., "latest" or "v24.10") to manage monitoring resources such as hosts and services. It supports listing, adding, and acknowledging both hosts and services within a Centreon monitoring environment.

Typical use cases include:

  • Retrieving lists of monitored hosts or services with optional filtering and limits.
  • Adding new hosts or services with detailed configuration including templates, macros, and group associations.
  • Acknowledging alerts on hosts or services to mark issues as handled, optionally notifying contacts or making acknowledgements persistent.

Practical examples:

  • Automatically add new servers to Centreon monitoring when they are provisioned.
  • Fetch a filtered list of services for reporting or integration with other systems.
  • Programmatically acknowledge host or service alerts after automated remediation steps.

Properties

Name Meaning
API Version The version of the Centreon API to use (e.g., "latest", "v24.10").
Options Avancées Advanced options collection; currently supports:
   Ignore SSL Errors Whether to ignore TLS certificate errors during API requests (boolean).

The node also dynamically supports these input properties depending on the selected Resource and Operation:

  • Resource: Choose between "Host" and "Service".
  • Operation: Choose operation like "List", "Add", or "Acknowledge".

For Hosts:

  • List: Filter by host name regex (filterName), limit number of results (limit).
  • Add: Specify host name, IP address, monitoring server, templates, host groups, and macros.
  • Acknowledge: Select host, provide comment, and options to notify, sticky, persistent acknowledgement, and whether to acknowledge attached services.

For Services:

  • List: Filter by service name regex, filter by host ID, limit results.
  • Add: Specify service name, associated host, service template, and macros.
  • Acknowledge: Select service (host and service IDs), provide comment, and options to notify, sticky, persistent acknowledgement.

Macros in add operations allow defining key-value pairs with optional password flag and description.

Output

The node outputs an array of JSON objects corresponding to the API responses from Centreon for each input item processed. Each output item contains the raw JSON response from the Centreon API call related to the requested operation.

No binary data output is produced by this node.

Dependencies

  • Requires valid credentials for Centreon API access, including base URL, username, and password.
  • Uses HTTP requests to interact with Centreon’s REST API endpoints.
  • Supports ignoring SSL errors via an advanced option if needed.
  • Requires n8n credential setup for Centreon API authentication.
  • No additional external libraries beyond n8n core helpers are used.

Troubleshooting

  • Authentication failures: If the node throws errors about failing to authenticate or missing tokens, verify that the provided Centreon API credentials (URL, username, password) are correct and have sufficient permissions.
  • Unexpected response format: Errors indicating unexpected response structure may occur if the Centreon API changes or returns errors. Check API version compatibility and network connectivity.
  • SSL errors: If TLS certificate errors occur, enable the "Ignore SSL Errors" advanced option cautiously.
  • Invalid parameters: Ensure required fields like host/service names, IDs, and comments are provided according to the operation.
  • Rate limiting or pagination: Large result sets are paginated internally; if incomplete data is returned, check Centreon API limits and adjust filters or limits accordingly.

Links and References

Discussion