# # Sample hosts.cfg file for NetSaint (http://www.netsaint.org/) # Copyright 2001-2003 DVL Software Limited # # Available from http://www.freebsddiary.org/samples/netsaint.hosts.txt # # ******************************************************** # # For information on how to use this file, please read # # http://www.freebsddiary.org/netsaint.php # # ******************************************************** # # # # This section is straight from the host.cfg file # but not all in such a small space # timeperiod[24x7]=24 Hours A Day, 7 Days A Week;00:00-24:00;00:00-24:00;00:00-24:00;00:00-24:00;00:00-24:00;00:00-24:00;00:00-24:00 timeperiod[workhours]="Normal" Working Hours;;09:00-17:00;09:00-17:00;09:00-17:00;09:00-17:00;09:00-17:00; timeperiod[nonworkhours]=Non-Work Hours;00:00-24:00;00:00-09:00,17:00-24:00;00:00-09:00,17:00-24:00;00:00-09:00,17:00-24:00;00:00-09:00,17:00-24:00;00:00-09:00,17:00-24:00;00:00-24:00 timeperiod[none]=No Time Is A Good Time;;;;;;; # Servers # # change the ip address! host[mybox]=My FreeBSD Box;10.0.0.1;;check-host-alive;10;120;24x7;1;1;1; # # Hosts are collected into groups. A group has a particular set of admins # hostgroup[my-servers]=All My Servers;freebsd-admins;mybox # # This section is straight from the default NetSaint hosts.cfg file, # but collected together for ease of use. # command[notify-by-email]=/usr/bin/printf '***** NetSaint 0.0.7 *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$' | /usr/bin/mail -s '** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **' $CONTACTEMAIL$ command[notify-by-epager]=/usr/bin/printf "Service: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\nInfo: $OUTPUT$\nDate: $DATETIME$" | /usr/bin/mail -s '$NOTIFICATIONTYPE$: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$' $CONTACTPAGER$ command[host-notify-by-email]=/usr/bin/printf "***** NetSaint 0.0.7 *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $OUTPUT$\n\nDate/Time: $DATETIME$\n" | /usr/bin/mail -s 'Host $HOSTSTATE$ alert for $HOSTNAME$!' $CONTACTEMAIL$ command[host-notify-by-epager]=/usr/bin/printf "Host '$HOSTALIAS$' is $HOSTSTATE$\nInfo: $OUTPUT$\nTime: $DATETIME$" | /usr/bin/mail -s '$NOTIFICATIONTYPE$ alert - Host $HOSTNAME$ is $HOSTSTATE$' $CONTACTPAGER$ command[process-host-perfdata]=/usr/bin/printf "$LASTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$STATETYPE$\t$EXECUTIONTIME$\t$OUTPUT$\t$PERFDATA$" >> /tmp/host-perfdata command[process-service-perfdata]=/usr/bin/printf "$LASTCHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$STATETYPE$\t$EXECUTIONTIME$\t$LATENCY$\t$OUTPUT$\t$PERFDATA$" >> /tmp/service-perfdata # # straight from the default hosts.cfg file # contact[netsaint]=Netsaint User;24x7;24x7;1;1;1;1;1;1;notify-by-email,notify-by-epager;host-notify-by-email,host-notify-by-epager;netsaint;pagenetsaint # # Fill in your own contact details. # YourName (short version perhaps, no spaces) # Your Name (full name) # yourname@example.org (email address) # contact[YourName]=Your Name;workhours;workhours;1;1;0;1;1;0;notify-by-email;host-notify-by-email;yourname@example.org; # # For each host group, we specify who gets notified # contactgroup[freebsd-admins]=FreeBSD Administrators;netsaint # # Define the services on mybox which NetSaint should monitor # all of these services as specified as running 24x7 # service[mybox]=SMTP;0;24x7;3;3;1;freebsd-admins;120;24x7;1;1;1;;check_smtp service[mybox]=FTP;0;24x7;3;5;1;freebsd-admins;120;24x7;1;1;1;;check_ftp service[mybox]=POP3;0;24x7;3;5;1;freebsd-admins;120;24x7;1;1;1;;check_pop service[mybox]=PING;0;24x7;3;5;1;freebsd-admins;120;24x7;1;1;0;;check_ping