REST API and disabling active and passive checks
Posted: Fri Nov 10, 2017 9:53 am
Is there a way within the REST API to disable active and passive checks for a host.
Support for Nagios products and services
https://support.nagios.com/forum/
Code: Select all
define host {
host_name MyHost
use xiwizard_generic_host
address 127.0.0.1
check_command check_dummy!0!!!!!!!
active_checks_enabled 1
passive_checks_enabled 0
register 1
}Code: Select all
[root@main-nagios-xi ~]# curl -XPOST "http://192.168.5.151/nagiosxi/api/v1/config/host?apikey=LTltbjobR0X3V5ViDIitYaI8hjsjoFBaOcWYukamF7oAsD8lhJRvSPWq8I3PjTf7&pretty=1" -d "host_name=MyHost&address=127.0.0.1&check_command=check_dummy\!0\!&use=xiwizard_generic_host&active_checks_enabled=0&passive_checks_enabled=1&force=1&applyconfig=1"
{
"success": "Successfully added MyHost to the system. Config applied, Nagios Core was restarted."
}Code: Select all
define host {
host_name MyHost
use xiwizard_generic_host
address 127.0.0.1
check_command check_dummy!0!
active_checks_enabled 0
passive_checks_enabled 1
register 1
}