Remove Host/Service from monitoring using command line
Posted: Tue Oct 04, 2016 9:00 am
Currently I am able to remove hosts /services from monitoring on the Nagios portal using the CCM. I would like to do the same using a script on the command line.
I have
created a host "remove_host_monitoring" and corresponding service "remove_service_monitoring". I understand that all the hosts and services config files are present
under the path /usr/local/nagiosxi/scripts/
I moved to the folder /usr/local/nagiosxi/scripts/ using cd /usr/local/nagiosxi/scripts/
I am not able to remove the service
from monitoring using the command ./nagiosql_delete_service.php –-config=remove_host_monitoring.
The error that I am getting.
./nagiosql_delete_service.php --
config=remove_host_monitoring
o/p:
URL: http://localhost/nagiosxi/includes/components/ccm/
Unable find services in nagiosql database.
Usage: ./nagiosql_delete_service.php
[--id=<service id>] [--config=<config_name>]
I also tried to apply configuration using the command: ./reconfigure_nagios.sh
Can you please suggest on how to remove
services from monitoring using command line
I have
created a host "remove_host_monitoring" and corresponding service "remove_service_monitoring". I understand that all the hosts and services config files are present
under the path /usr/local/nagiosxi/scripts/
I moved to the folder /usr/local/nagiosxi/scripts/ using cd /usr/local/nagiosxi/scripts/
I am not able to remove the service
from monitoring using the command ./nagiosql_delete_service.php –-config=remove_host_monitoring.
The error that I am getting.
./nagiosql_delete_service.php --
config=remove_host_monitoring
o/p:
URL: http://localhost/nagiosxi/includes/components/ccm/
Unable find services in nagiosql database.
Usage: ./nagiosql_delete_service.php
[--id=<service id>] [--config=<config_name>]
I also tried to apply configuration using the command: ./reconfigure_nagios.sh
Can you please suggest on how to remove
services from monitoring using command line