Actions12
- Host Actions
- Service Actions
- Monitoring Server Actions
Overview
This node integrates with Centreon, a monitoring software, via its Web API to manage hosts. Specifically, the "Host - Add" operation allows users to create new hosts in Centreon by specifying details such as the host's name, IP address, associated monitoring server, templates, macros, and host groups.
Common scenarios for this node include automating the onboarding of new infrastructure components into Centreon's monitoring system or dynamically adding hosts based on external triggers or workflows. For example, when a new server is provisioned in a cloud environment, this node can automatically add it to Centreon for monitoring.
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. This is a required identifier for the new host. |
| Address | The IP address of the host. Required to specify where the host is located on the network. |
| Monitoring Server Name or ID | Select the monitoring server responsible for this host from a list or specify an ID using an expression. This associates the host with a particular monitoring server. |
| Templates Names or IDs | One or more host templates to apply to the host. These define monitoring checks and configurations inherited by the host. Can be selected from a list or specified by IDs via expressions. |
| Macros | Optional key-value pairs (macros) to define custom variables for the host. Each macro has a name, value, optional password flag, and description. Multiple macros can be added. |
| Hostgroups Names or IDs | Optional host groups to which the host belongs. Groups help organize hosts logically. Can be selected from a list or specified by IDs using expressions. |
Output
The node outputs JSON data representing the result of the host creation request. The output typically includes:
- Confirmation of success or failure.
- Details of the created host such as its name, alias, address, assigned monitoring server ID, templates, groups, and macros.
- A timestamp indicating when the operation was completed.
No binary data is produced by this node.
Example output JSON structure:
{
"success": true,
"message": "POST /configuration/hosts completed successfully",
"timestamp": "2024-06-01T12:00:00Z"
}
Dependencies
- Requires valid credentials for Centreon API access, including base URL, username, and password.
- The node uses Centreon's REST API endpoints; thus, the Centreon server must be accessible from n8n.
- The API version parameter controls which version of the Centreon API is targeted.
- Network connectivity and proper permissions on the Centreon side are necessary to create hosts.
Troubleshooting
- Authentication errors: If the node cannot authenticate, verify that the provided API credentials are correct and that the Centreon server is reachable.
- Invalid input data: Missing required fields like host name or address will cause errors. Ensure all mandatory properties are set.
- API version mismatch: Using an unsupported or incorrect API version may lead to unexpected failures. Confirm the API version matches your Centreon installation.
- Permission issues: The API user must have sufficient rights to create hosts; otherwise, the request will fail.
- Empty or malformed responses: Could indicate network issues or Centreon API problems. Check connectivity and Centreon logs.