Actions12
- Host Actions
- Service Actions
- Monitoring Server Actions
Overview
This node integrates with the Centreon Web API to manage monitoring resources, specifically hosts in this context. The "Delete Host" operation allows users to remove a host from the Centreon monitoring system by specifying its name or ID.
Common scenarios for this node include automating the cleanup of obsolete or decommissioned hosts from your monitoring environment, ensuring that your monitoring data remains relevant and up-to-date. For example, when a server is retired, you can use this node to automatically delete its corresponding host entry in Centreon.
Properties
| Name | Meaning |
|---|---|
| API Version | Version of the Centreon API to use (e.g., "latest", "v24.10"). |
| Host Name or ID | The identifier of the host to delete. Choose from a dropdown list populated dynamically or specify an ID using an expression. |
Output
The output JSON object includes the response from the Centreon API after attempting to delete the specified host. It contains:
success: A boolean indicating if the deletion was successful.message: A string message confirming the completion of the delete operation.timestamp: The ISO timestamp when the operation was performed.operation: The string"delete"indicating the performed operation.resource: The string"host"indicating the resource type.resourceId: The ID of the host that was deleted.
Example output JSON:
{
"success": true,
"message": "DELETE /configuration/hosts/123 completed successfully",
"timestamp": "2024-06-01T12:00:00Z",
"operation": "delete",
"resource": "host",
"resourceId": "123"
}
No binary data is produced by this operation.
Dependencies
- Requires an API key credential for authenticating with the Centreon Web API.
- The node uses HTTP requests to communicate with the Centreon API endpoints.
- The user must configure the Centreon API base URL, username, password, and SSL verification preferences in the credentials.
- The API version property controls which version of the Centreon API is targeted.
Troubleshooting
- Authentication errors: If the node fails to authenticate, ensure that the provided API credentials are correct and have sufficient permissions.
- Host not found: If the specified host ID does not exist, the API will return an error. Verify the host exists by listing hosts before deleting.
- API version mismatch: Using an unsupported or incorrect API version may cause unexpected errors. Confirm the API version matches your Centreon instance.
- Network issues: Connection failures or SSL errors can occur if the base URL is incorrect or SSL settings do not match the server configuration.
- Error messages: The node throws errors with messages such as "Cannot authenticate to Centreon" or "Unknown operation". These indicate credential issues or misconfigured parameters respectively.
To resolve these issues, verify credentials, confirm host IDs, check API version compatibility, and review network connectivity.