Centreon icon

Centreon

Connect and manage Centreon using Centreon Web API (v2)

Actions12

Overview

This node integrates with Centreon, a monitoring software, to manage hosts and their downtime schedules via the Centreon Web API. Specifically, the "Host Downtime" operation allows users to schedule a downtime period for a selected host in the monitoring system. This is useful when planned maintenance or known issues require temporarily suspending alerts for a host to avoid unnecessary notifications.

Common scenarios include:

  • Scheduling maintenance windows for servers or network devices.
  • Temporarily silencing alerts during troubleshooting or upgrades.
  • Coordinating downtime across multiple services attached to a host.

Example: A user wants to put a server named "web-server-01" into downtime from 2024-07-01 10:00 UTC to 2024-07-01 12:00 UTC with a comment explaining the reason as "Scheduled maintenance".

Properties

Name Meaning
API Version Version of the Centreon API to use (e.g., "latest", "v24.10").
Host Name or ID The host to put into downtime. Select from a dropdown list of monitored hosts or specify an ID using an expression.
Comment Reason for scheduling the downtime.
Start Time UTC start time of the downtime in ISO 8601 format (e.g., "YYYY-MM-DDThh:mm:ssZ").
End Time UTC end time of the downtime in ISO 8601 format (e.g., "YYYY-MM-DDThh:mm:ssZ").
Fixed Boolean indicating whether the downtime is fixed (true) or flexible (false).
Schedule Downtime for Services Attached to the Host Boolean indicating if the downtime should also apply to all services attached to the host.
Duration in Seconds Duration of the downtime in seconds (minimum 1 second).

Output

The node outputs JSON data representing the result of the downtime scheduling request. The output typically includes success status, messages, timestamps, and any relevant response data from the Centreon API confirming the downtime was scheduled.

No binary data is produced by this operation.

Example output structure (simplified):

{
  "success": true,
  "message": "POST /monitoring/hosts/{hostId}/downtimes completed successfully",
  "timestamp": "2024-06-30T15:00:00Z"
}

Dependencies

  • Requires valid credentials for Centreon API access, including base URL, username, password, and SSL verification preference.
  • The node uses the Centreon Web API endpoints for authentication and downtime management.
  • The API version must be specified and supported by the Centreon instance.
  • Network connectivity to the Centreon server is required.

Troubleshooting

  • Authentication errors: If the node cannot authenticate, verify that the provided API credentials are correct and that the Centreon server is reachable.
  • Invalid time range: The node validates that the start time is before the end time; otherwise, it throws an error. Ensure the times are correctly set in UTC and formatted properly.
  • Host not found: If the selected host ID does not exist or is invalid, the API call will fail. Use the provided dropdown or ensure the expression returns a valid host ID.
  • API version mismatch: Using an unsupported API version may cause unexpected errors. Confirm the API version matches your Centreon installation.
  • Network or SSL issues: If ignoring SSL is disabled and the Centreon server uses self-signed certificates, requests may fail. Adjust the ignore SSL setting accordingly.

Links and References

Discussion