Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
mihair
bymihair, January 30, 2012
Great work! And great tutorial!
I have modified the last part so it will include also the IP’s of the hosts: http://mihai.radoveanu.ro/2012/01/nagios-search-auto-complete/
(
Just create a script like this one and add it to the crontab:
#!/bin/sh
/bin/cat /usr/local/nagios/var/objects.cache | /bin/grep "host_name" | /bin/sed 's/\s*host_name\s*//g' | /usr/bin/sort | /usr/bin/uniq > /usr/local/nagios/share/hosts.txt
/bin/cat /usr/local/nagios/var/objects.cache | /bin/grep "address" | /bin/sed 's/\s*address\s*//g' | /usr/bin/sort | /usr/bin/uniq >> /usr/local/nagios/share/hosts.txt
)
Thanks again!
I have modified the last part so it will include also the IP’s of the hosts: http://mihai.radoveanu.ro/2012/01/nagios-search-auto-complete/
(
Just create a script like this one and add it to the crontab:
#!/bin/sh
/bin/cat /usr/local/nagios/var/objects.cache | /bin/grep "host_name" | /bin/sed 's/\s*host_name\s*//g' | /usr/bin/sort | /usr/bin/uniq > /usr/local/nagios/share/hosts.txt
/bin/cat /usr/local/nagios/var/objects.cache | /bin/grep "address" | /bin/sed 's/\s*address\s*//g' | /usr/bin/sort | /usr/bin/uniq >> /usr/local/nagios/share/hosts.txt
)
Thanks again!