Hi,
As part of my project, i need to delete hosts without using nagios XI GUI and API.
so I have deleted a existing host (host1.cfg) config file from /usr/local/nagios/etc/hosts/host1.cfg
But same host is re-created when i run $/usr/local/nagiosxi/scripts/reconfigure_nagios.sh
Please help on
a) why reconfigure_nagios.sh script re-creating deleted host ? or
b) How can i delete host without using GUI and APIs ?
VidMate Mobdro word counter
Thanks,
deleting host without using GUI and Nagios XI API?
-
- Posts: 2
- Joined: Mon Aug 24, 2020 1:06 am
deleting host without using GUI and Nagios XI API?
Last edited by BlakeAntonio on Wed Aug 26, 2020 3:58 am, edited 1 time in total.
Re: deleting host without using GUI and Nagios XI API?
The hosts, services, etc. are stored in a DB which is read and the .cfg files created from that. Thus deleting a .cfg file won't help.
cd /usr/local/nagiosxi/scripts
Have a look at ./nagiosql_delete_host.php --config=service_name
Then run the reconfig to apply.
I'm not sure if this works or if it's wise to use, but it's in my notes from long ago. My notes say run it from the scripts dir.
cd /usr/local/nagiosxi/scripts
Have a look at ./nagiosql_delete_host.php --config=service_name
Then run the reconfig to apply.
I'm not sure if this works or if it's wise to use, but it's in my notes from long ago. My notes say run it from the scripts dir.