From: Chris K. <cko...@th...> - 2002-06-27 21:33:53
|
Hey Everyone, I've been working on Nagios 1.0b3 for awhile now and I have quite a few servers, etc being monitored. I am having alot of trouble getting any type of notifications, whether it be email or pager. Right now at this point, I am just trying to get a simple email sent. Here are my current configurations of my *.cfg files. HELP ME! :-) ******************* Begin Files ******************* ************************ contactgroup.cfg ************************ # "Administrators" contact group defintion define contactgroup{ contactgroup_name admins alias Administrators members admins } ********************** contact.cfg ********************** define contact{ contact_name admins alias Chris service_notification_period 24x7 host_notification_period 24x7 service_notification_options w,u,c,r host_notification_options d,u,r service_notification_commands notify-by-email host_notification_commands host-notify-by-email # This is a fake email address below, for demonstration purposes only email me...@my... } *********************** hostgroup.cfg *********************** # "Administrators" host group definition define hostgroup{ hostgroup_name admins alias Administrator contact_groups admins members nt3 } ********************** hosts.cfg ********************** define host{ name generic-host check_command check-host-alive notifications_enabled 1 max_check_attempts 5 notification_interval 10 notification_period 24x7 notification_options d,u,r register 0 } define host{ use generic-host host_name nt3 alias nt3 address 172.24.20.207 } ****************** services.cfg ****************** define service{ name generic-service active_checks_enabled 1 passive_checks_enabled 1 parallelize_check 1 obsess_over_service 1 check_freshness 0 notifications_enabled 1 event_handler_enabled 1 flap_detection_enabled 1 process_perf_data 1 retain_status_information 1 retain_nonstatus_information 1 max_check_attempts 5 normal_check_interval 5 retry_check_interval 2 check_period 24x7 is_volatile 0 notification_interval 240 notification_options w,u,c,r notification_period 24x7 contact_groups admins register 0 } # NT 3 - Service Defintion define service{ use generic-service host_name nt3 service_description PING is_volatile 0 check_period 24x7 max_check_attempts 3 normal_check_interval 5 retry_check_interval 1 contact_groups admins notification_interval 120 notification_period 24x7 notification_options w,u,c,r check_command check_ping notifications_enabled 1 } ********************** misccommands.cfg ********************** # 'notify-by-email' command definition define command{ command_name notify-by-email command_line /usr/bin/printf "%b" "***** Nagios 1.0b3 *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$ } # 'notify-by-epager' command definition define command{ command_name notify-by-epager command_line /usr/bin/printf "%b" "Service: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\nInfo: $OUTPUT$\nDate: $DATETIME$" | /bin/mail -s "$NOTIFICATIONTYPE$: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$" $CONTACTPAGER$ } # 'host-notify-by-email' command definition define command{ command_name host-notify-by-email command_line /usr/bin/printf "%b" "***** Nagios 1.0b3 *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $OUTPUT$\n\nDate/Time: $DATETIME$\n" | /bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$ } # 'host-notify-by-epager' command definition define command{ command_name host-notify-by-epager command_line /usr/bin/printf "%b" "Host '$HOSTALIAS$' is $HOSTSTATE$\nInfo: $OUTPUT$\nTime: $DATETIME$" | /bin/mail -s "$NOTIFICATIONTYPE$ alert - Host $HOSTNAME$ is $HOSTSTATE$" $CONTACTPAGER$ } ******************************* End of Files ******************************* Thanks for any advice, I will be appreciated greatly! Chris Koniecny Computer Techinician - Linux Admin. The Saginaw News |