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                                [EMAIL PROTECTED]
 }

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
-------------------------------------------------------------------------
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
_______________________________________________
Nagios-users mailing list
[email protected]
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

Reply via email to