getting email again Nagios
Nedim Bicic
nedo72 at gmail.com
Fri Jan 19 19:51:47 CET 2007
I have Nagios 2.4
hey people i have been getting nagios notification email but dont get
anymore after i added the hosts
here is what i have so far I have MTA and tried sending email through my
local server which is fine
and this is how i have contacts.cfg set up :
# 'Master' contact definition
define contact{
contact_name genesis
alias genesis net
service_notification_period 24x7
host_notification_period 24x7
service_notification_options c,r
host_notification_options d,r,n
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email nedo72 at gmail.com
}
and this is what i have for my contactgroup.cfg
define contactgroup{
contactgroup_name gmaster
alias test Group
members genesis
}
And this is one sample host i have:
define host{
use generic-host ; Name of host
template to use
host_name cpu1
alias cpu1
address 10.8.1.53
check_command check-host-alive
max_check_attempts 10
check_period 24x7
notification_interval 120
notification_period 24x7
notification_options d,r,n
contact_groups gmaster
}
and this is what i have for my miscommands.cfg for my email commands:
---->this is for hosts
define command{
command_name host-notify-by-email
command_line /bin/echo -e "***** Nagios *****\n\nNotification Type:
$NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress:
$HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" |
/bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
}
->>this is for services
# 'notify-by-email' command definition
define command{
command_name notify-by-email
command_line /bin/echo -e "***** Nagios *****\n\nNotification Type:
$NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress:
$HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
$LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "**
$NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **"
$CONTACTEMAIL$
}
I dont why i dont get any email notifications after a host goes down when i
unplug it
thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070119/2dc08d46/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list