command to show me all my hosts
is there any command to show me all the hosts in my Nagios core server 3.x
command to show me all my hosts
Re: command to show me all my hosts
I think this should work in Core 3 though I haven't tested it:
You may need to change the path depending on where your status.dat is located. Also the Nagios Core daemon must be running for this to work correctly.
In action:
Code: Select all
grep -A 1 'hoststatus' /usr/local/nagios/var/status.dat
In action:
Code: Select all
[root@nagios ~]# grep -A 1 'hoststatus' /usr/local/nagios/var/status.dat
hoststatus {
host_name=esprod00
--
hoststatus {
host_name=esprod01
--
hoststatus {
host_name=esprod02
--
hoststatus {
host_name=esprod03
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: command to show me all my hosts
Thanks it worked
Re: command to show me all my hosts
Sounds great! I'll be closing this topic as resolved!
If you have any more questions, feel free to create another thread!
Thank you for using the Nagios Support Forum!
If you have any more questions, feel free to create another thread!
Thank you for using the Nagios Support Forum!