Centreon icon

Centreon

Interagir avec l’API Centreon Web (v2)

Overview

This node integrates with the Centreon Web API to manage monitoring resources, specifically hosts and services. The "Host - Add" operation allows users to create a new host in Centreon by specifying its details such as name, IP address, associated monitoring server, templates, macros, and host groups.

Common scenarios for this node include automating the provisioning of new hosts in a monitoring environment, integrating infrastructure deployment workflows with monitoring setup, or bulk-adding hosts based on external data sources.

For example, after deploying a new server, you can use this node to automatically register it in Centreon with appropriate monitoring templates and macros, ensuring it is monitored without manual intervention.

Properties

Name Meaning
API Version Version of the Centreon API to use (e.g., "latest", "v24.10").
Name The name of the host to create.
Address The IP address of the host.
Monitoring Server Name or ID Select the monitoring server from a list or specify its ID via an expression. This associates the host with a particular monitoring server.
Templates Names or IDs Select one or more host templates from a list or specify their IDs via expressions. These templates define monitoring checks and configurations applied to the host.
Macros Define one or more macros for the host. Each macro has a name, value, optional password flag, and description. Macros allow parameterizing templates or custom configurations per host.
Hostgroups Names or IDs Select one or more host groups from a list or specify their IDs via expressions. Host groups help organize hosts logically within Centreon.
Options Avancées > Ignore SSL Errors Whether to ignore TLS certificate errors when connecting to the Centreon API. Useful if the Centreon server uses self-signed certificates or has certificate issues.

Output

The node outputs JSON objects representing the response from the Centreon API after attempting to add the host. The exact structure depends on the API response but typically includes details about the created host or error information if the creation failed.

No binary data output is produced by this operation.

Dependencies

  • Requires valid credentials for the Centreon API, including base URL, username, and password.
  • The node authenticates with Centreon using these credentials to obtain an authentication token before making API requests.
  • The node relies on the Centreon API endpoints for managing hosts (/configuration/hosts).
  • Optional: If ignoring SSL errors, the node disables TLS certificate verification for API requests.

Troubleshooting

  • Authentication failures: If the node cannot authenticate, ensure the provided API credentials are correct and have sufficient permissions.
  • Invalid input data: Required fields like host name, address, monitoring server, and templates must be provided; missing or invalid values will cause errors.
  • API connectivity issues: Network problems or incorrect base URL may prevent communication with Centreon.
  • SSL errors: If the Centreon server uses self-signed certificates, enable the "Ignore SSL Errors" option to avoid TLS errors.
  • Unexpected API responses: If the API changes or returns unexpected data, the node may fail; verify API version compatibility.

Error messages typically indicate authentication failure, missing parameters, or HTTP request errors. Resolving them involves checking credentials, input correctness, network access, and API availability.

Links and References

Discussion