please help me
Chandresh Suthar
chandresh.suthar at gmail.com
Wed Sep 7 18:22:14 CEST 2005
Hi,
Please help me in sending notifications. I have only one configuration file
for contactfgroup,hostsgroup etc. "minimal.cfg"
minimal.cfg :
define timeperiod{
timeperiod_name 24x7
alias 24 Hours A Day, 7 Days A Week
sunday 00:00-24:00
monday 00:00-24:00
tuesday 00:00-24:00
wednesday 00:00-24:00
thursday 00:00-24:00
friday 00:00-24:00
saturday 00:00-24:00
}
define command{
command_name notify-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type:
$NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress:
$HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
$LONGDATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | /bin/mail -s "**
$NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **"
$CONTACTEMAIL$
}
# This is a sample host notification command that can be used to send email
# notifications (about host alerts) to contacts.
define command{
command_name host-notify-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type:
$NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress:
$HOSTADDRESS$\nInfo: $OUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s
"Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
}
define contact{
contact_name nagios
alias Nagios Admin
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email nagios at localhost
}
define contact{
contact_name chandresh
alias Administrator
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email "personalemail id"
}
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagios
}
define contactgroup{
contactgroup_name admingrp
alias Administrators
members chandresh
}
define host{
name generic-host ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program
restarts
retain_nonstatus_information 1 ; Retain non-status information across
program restarts
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A
TEMPLATE!
}
define host{
use generic-host ; Name of host template to use
host_name webmail.com <http://webmail.com/>
alias localhost
address 127.0.0.1 <http://127.0.0.1/>
check_command check-host-alive
max_check_attempts 10
notification_interval 120
notification_period 24x7
notification_options d,r
contact_groups admingrp
}
define service{
use generic-service ; Name of service template to use
host_name webmail.com <http://webmail.com/>
service_description HTTP
is_volatile 0
check_period 24x7
max_check_attempts 4
normal_check_interval 5
retry_check_interval 1
contact_groups admingrp
notification_interval 960
notification_period 24x7
check_command check_http
}
I am able to send mails to my persoanl email id by "mail" command. But
notification is not going. I have configured sendmail. I am not even
receiving mails on local system at nagios at localhost( I tried). I am even not
getting any error messages in logs of nagios.
Please help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050907/a48dd0a1/attachment.html>
More information about the Users
mailing list