Contacts Report
Posted: Fri May 03, 2013 9:08 am
How can I generate an easy-to-read list of all contacts and what each contact gets notified for? My bosses can't read .cfg files and have requested this information. Thanks.
Support for Nagios products and services
https://support.nagios.com/forum/
Code: Select all
cat /usr/local/nagios/var/objects.cache | grep 'host_name\|service_description\|contacts' > /tmp/contacts.Code: Select all
host_name ebony
service_description Linux Raid Status checks /proc/mdstat
contacts neboglory
host_name ebony
service_description Web Server Port 80 check
contacts neboglory
host_name gent
service_description / Disk Usage
contacts andy,nagiosadmin,neboglory
Code: Select all
cat /usr/local/nagios/var/objects.cache | grep 'host_name\|service_description\|contacts' |grep -v command_name > /tmp/contacts.txtCode: Select all
cat /usr/local/nagios/var/objects.cache | grep 'host_name\|service_description\|contacts\|notification_period' |grep -v command_name > /tmp/contacts.txtCode: Select all
cat /usr/local/nagios/var/objects.cache | grep 'host_name\|service_description\|contacts\|notification_period' |grep -v command_name | sed 's/host_name/\n/g' > /tmp/contacts.txtCode: Select all
ebony
service_description Linux Raid Status checks /proc/mdstat
contacts neboglory
notification_period 24x7
ebony
service_description Web Server Port 80 check
contacts neboglory
notification_period 24x7
gent
service_description / Disk Usage
contacts andy,nagiosadmin,neboglory
notification_period xi_timeperiod_24x7