Actions9
- Host Actions
- Service Actions
Overview
This node integrates with the Centreon Web API (version configurable, e.g., "latest" or "v24.10") to manage monitoring services within a Centreon environment. Specifically, for the Service resource and the Add operation, it allows users to create new monitoring services associated with a specified host.
Typical use cases include automating the creation of monitoring services in Centreon as part of infrastructure provisioning workflows or dynamically adding services based on external triggers or system states.
For example, when a new server is added to your infrastructure, this node can automatically add relevant monitoring services to that server in Centreon, applying predefined service templates and macros to customize the monitoring behavior.
Properties
| Name | Meaning |
|---|---|
| API Version | Version of the Centreon API to use (e.g., "latest", "v24.10"). |
| Host Name or ID | The host to which the new service will be associated. Choose from a list of existing hosts or specify an ID using an expression. |
| Service Name | The name of the service to create. |
| Template(s) Names or Name or ID | The service template(s) to apply to the new service. Choose from a list or specify IDs using expressions. |
| Macros | One or more macros to define for the service. Each macro includes: - Name: Macro identifier - Value: Macro value - Is Password: Whether the macro value is a password (hidden) - Description: Optional description |
| Options Avancées (Advanced Options) | Ignore SSL Errors: Whether to ignore TLS certificate errors during API requests. |
Output
The node outputs JSON data representing the response from the Centreon API after attempting to add the service. This typically includes details about the newly created service or error information if the creation failed.
The output structure corresponds directly to the API's JSON response and may contain fields such as service ID, name, associated host ID, applied templates, macros, and status messages.
No binary data output is produced by this operation.
Dependencies
- Requires valid credentials for Centreon API access, including base URL, username, and password.
- The node performs authentication by obtaining a token via the Centreon API login endpoint.
- Network connectivity to the Centreon server must be available.
- Optionally, the node can be configured to ignore SSL/TLS certificate errors if needed (useful for self-signed certificates).
Troubleshooting
- Authentication Failures: If the node throws an error indicating failure to authenticate, verify that the provided credentials are correct and that the Centreon API endpoint is reachable.
- Invalid Host ID: When specifying the host, ensure the host exists in Centreon and the ID or name is correctly provided. Using the load options method helps avoid invalid host references.
- Template Issues: Ensure the selected service templates exist and are compatible with the Centreon version used.
- SSL Errors: If you encounter TLS certificate errors, consider enabling the "Ignore SSL Errors" advanced option, especially when using self-signed certificates.
- API Version Mismatch: Using an incorrect API version string may cause unexpected errors. Confirm the API version supported by your Centreon instance.
- Macro Formatting: Macros must have all required fields (name and value). Incorrect macro definitions may cause the API request to fail.