icingaweb2/doc/command.md

4.8 KiB

Commands

Abstract

Commands are one important intersection between the monitoring core and the frontend. This is the writable interface where you can control the core how checks will be processed. Usually you can interact by buttons in the frontend.

This document describes the URL interface and what commands can be used.

Configuration

To be done.

URL Interface

The interface offers to options how to deal with commands:

  1. Show html forms to enter information about the commands (GET requests)
  2. Send commands when providing post data

Endpoint

Endpoint of commands is specified as follow:

http://localhost:8080/icinga2-web/monitoring/command/<name_of_command>

List of commands

To see which commands are support you can supply the list argument:

http://localhost:8080/icinga2-web/monitoring/command/list

Examples of command urls:

# Schedule downtime for an object
http://localhost:8080/icinga2-web/monitoring/command/scheduledowntime

# Provide a new commend for an object
http://localhost:8080/icinga2-web/monitoring/command/addcomment

Provide a global command for host or service checks

http://localhost:8080/icinga2-web/monitoring/command/disableactivechecks?global=host http://localhost:8080/icinga2-web/monitoring/command/disableactivechecks?global=service

Provide a object command globally

http://localhost:8080/icinga2-web/monitoring/command/disablenotifications?global=1

List of commands

Please note that the list is not complete yet, more commands will follow

Command Description
disableactivechecks Disable active checks for an object
enableactivechecks Enable active checks for an object
reschedulenextcheck Reschedule next active check
submitpassivecheckresult Submit a passive result set for this check
stopobsessing Stop obsessing over object
startobsessing Start obsessing over object
stopacceptingpassivechecks Stop accepting passive results for this object
startacceptingpassivechecks Start accepting passive results for this object
disablenotifications Disable sending messages for problems
enablenotifications Enable sending messages for problems
sendcustomnotification Send a custom notification for this object
scheduledowntime Schedule a downtime for this object
scheduledowntimeswithchildren Schedule a downtime for host and all services
removedowntimeswithchildren Remove all downtimes from this host and its services
disablenotificationswithchildren Disable all notification from this host and its services
enablenotificationswithchildren Enable all notification from this host and its services
reschedulenextcheckwithchildren Reschedule next check of host ans its services
disableactivecheckswithchildren Disable all checks of this host and its services
enableactivecheckswithchildren Disable all checks of this host and its services
disableeventhandler Disable event handler for this object
enableeventhandler Disable event handler for this object
disableflapdetection Disable flap detection
enableflapdetection Enable flap detection
addcomment Add a new comment to this object
resetattributes Reset all changed attributes
acknowledgeproblem Acknowledge problem of this object
removeacknowledgement Remove problem acknowledgement
delaynotification Delay next object notification
removedowntime Remove a specific downtime