Centreon icon

Centreon

Interagir avec l’API Centreon Web (v2)

Overview

This node integrates with the Centreon Web API to manage and retrieve monitoring data related to hosts and services. Specifically, for the Host - List operation, it fetches a list of hosts from the Centreon monitoring system, optionally filtered by a regex pattern on host names and limited in number.

Common scenarios where this node is beneficial include:

  • Retrieving an inventory of monitored hosts for reporting or further automation.
  • Filtering hosts dynamically based on naming conventions using regex.
  • Limiting the number of results to optimize performance or focus on a subset.

Practical example:

  • You want to get up to 100 hosts whose names contain "webserver" to check their status or feed them into another workflow for maintenance tasks.

Properties

Name Meaning
API Version Version of the Centreon API to use (e.g., "latest", "v24.10").
Host Name (Like Format) A regex pattern to filter hosts by their name. Only hosts matching this pattern are returned.
Limit Maximum number of host results to return. Minimum value is 1.
Options Avancées Advanced options collection: includes "Ignore SSL Errors" which determines whether TLS certificate errors should be ignored during API requests.

Output

The output is an array of JSON objects, each representing a host retrieved from Centreon. The exact structure depends on the Centreon API response but generally includes host details such as:

  • Host identifiers
  • Host names and aliases
  • Other metadata provided by the Centreon API under /monitoring/hosts

No binary data is output by this operation.

Dependencies

  • Requires valid credentials for the Centreon API (an API key credential with username, password, and base URL).
  • The node performs authentication by sending login credentials to the Centreon API endpoint and uses the returned token for subsequent requests.
  • The node supports specifying the API version to target different Centreon API versions.
  • Optionally, the node can ignore SSL/TLS certificate errors if configured in advanced options.

Troubleshooting

  • Authentication failures: If the node cannot authenticate, it throws an error indicating failure to authenticate to Centreon. Verify that the API credentials (username, password, base URL) are correct and that the Centreon API is reachable.
  • Unexpected response format: If the API response does not contain the expected array of hosts, an error is thrown. This may indicate an API change or misconfiguration.
  • SSL errors: If connecting to the Centreon API fails due to TLS certificate issues, enable the "Ignore SSL Errors" option in advanced settings to bypass these errors (use with caution).
  • Invalid regex filter: Providing an invalid regex pattern in "Host Name (Like Format)" may result in no hosts being returned or an error. Ensure the regex syntax is correct.

Links and References

Discussion