Actions12
- Host Actions
- Service Actions
- Monitoring Server Actions
Overview
This node integrates with the Centreon monitoring platform via its Web API, specifically focusing on managing and retrieving information about services. The "Service: List" operation allows users to fetch a list of services monitored by Centreon, optionally filtered by host and service name patterns, and limited in number.
Common scenarios for this node include:
- Retrieving all services running on a specific host to monitor their status.
- Filtering services by name using regex to find particular service types or groups.
- Limiting the number of returned services for performance or pagination purposes.
Practical example:
- A user wants to get up to 100 services running on a host identified by ID "123", filtering only those whose names contain "database". This node will query Centreon's API and return matching services accordingly.
Properties
| Name | Meaning |
|---|---|
| API Version | Version of the Centreon API to use (e.g., "latest", "v24.10"). |
| Host Name or ID | Select a host from the dropdown list or specify an ID via expression to filter services by host. |
| Service Name (Like Format) | Regex pattern to filter services by their name. |
| Limit | Maximum number of service results to return (minimum 1). |
Output
The output is a JSON array where each item represents a service retrieved from Centreon. Each service object includes details such as:
host.id: The ID of the host the service belongs to.service.name: The name of the service.- Other service metadata as provided by the Centreon API.
If no services match the filters, the output will be an empty array.
No binary data is produced by this operation.
Dependencies
- Requires valid Centreon API credentials (username, password, base URL, and SSL ignore option).
- The node authenticates with Centreon via a POST login request to obtain an authentication token.
- Uses the Centreon Web API endpoint
/monitoring/serviceswith optional query parameters for filtering and limiting results. - Requires n8n HTTP Request helper for making authenticated API calls.
Troubleshooting
- Authentication errors: If the node cannot authenticate, it throws an error "Cannot authenticate to Centreon". Ensure that the API credentials are correct and the Centreon server is reachable.
- Unexpected response format: If the API response does not contain an array under
result, the node throws an error indicating unexpected format. This may happen if the API version is incorrect or the endpoint changes. - Empty results: If no services match the filters, the output will be empty. Verify the host ID and regex filter correctness.
- API limits: Large limits may cause slow responses or timeouts. Use reasonable limits to avoid performance issues.
Links and References
- Centreon Web API Documentation
- n8n Expressions Documentation (for specifying dynamic IDs)
- Regex Tutorial (for crafting service name filters)