nagios not sending service alerts
alexus
alexus at gmail.com
Tue Nov 18 16:46:03 CET 2008
define contactgroup {
contactgroup_name staff
alias staff
members DAC2
}
define contact {
contact_name DAC2
alias XXX
host_notification_period 24x7
service_notification_period 24x7
host_notification_options d,u,r
service_notification_options w,u,c,r
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
email XXX at messaging.sprintpcs.com
pager XXX at messaging.sprintpcs.com
}
define command {
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios 2.12
*****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost:
$HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:
$HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "Host
$HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
}
define command {
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "***** Nagios 2.12
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$
alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
d# file /usr/bin/printf
/usr/bin/printf: ELF 32-bit LSB executable, Intel 80386, version 1
(FreeBSD), for FreeBSD 6.3, dynamically linked (uses shared libs),
stripped
d# file /usr/bin/mail
/usr/bin/mail: ELF 32-bit LSB executable, Intel 80386, version 1
(FreeBSD), for FreeBSD 6.3, dynamically linked (uses shared libs),
stripped
d#
On Tue, Nov 18, 2008 at 5:44 AM, Assaf Flatto <assaf.flatto at ssp.uk.com> wrote:
> And the Contacts in the staff group , what notification did you put in there ?
>
>
>
> On Tuesday 18 November 2008 07:57:24 alexus wrote:
>> for some reason I'm not getting any alerts for any of services, I
>> think I've checked everywhere...
>>
>> I've created a dummy service
>>
>> [1226994112] SERVICE ALERT: XXX.box;check_dummy;CRITICAL;SOFT;1;CRITICAL
>> [1226994172] SERVICE ALERT: XXX.box;check_dummy;CRITICAL;HARD;2;CRITICAL
>>
>> besides these two, nothing.. no NOTIFICATION
>>
>> this is my host configuration
>>
>> define host {
>> host_name XXX
>> alias XXX
>> address XXX
>> parents XXX
>> hostgroups XXX
>> check_command check_icmp
>> max_check_attempts 1
>> check_interval 0
>> active_checks_enabled 1
>> passive_checks_enabled 1
>> check_period 24x7
>> obsess_over_host 1
>> check_freshness 0
>> event_handler_enabled 1
>> flap_detection_enabled 1
>> failure_prediction_enabled 1
>> process_perf_data 0
>> retain_status_information 1
>> retain_nonstatus_information 1
>> contact_groups staff
>> notification_interval 30
>> notification_period 24x7
>> notification_options d,u,r,f
>> notifications_enabled 1
>> register 1
>> }
>>
>> and this is my service
>>
>> define service {
>> host_name XXX
>> service_description check_dummy
>> is_volatile 0
>> check_command check_dummy!2
>> max_check_attempts 2
>> normal_check_interval 2
>> retry_check_interval 1
>> active_checks_enabled 1
>> passive_checks_enabled 1
>> check_period 24x7
>> parallelize_check 1
>> obsess_over_service 1
>> check_freshness 0
>> event_handler_enabled 1
>> flap_detection_enabled 1
>> failure_prediction_enabled 1
>> process_perf_data 0
>> retain_status_information 1
>> retain_nonstatus_information 1
>> contact_groups staff
>> notification_interval 4
>> notification_period 24x7
>> notification_options w,u,c,r,f
>> notifications_enabled 1
>> register 1
>> }
>
>
>
> --
> Assaf Flatto
> SSP Ops Team
> Linux System Administrator
> 169 Euston Road, London, NW1 2AE
>
>
>
>
>
> IMPORTANT . this email and the information in it may be confidential, legally
> privileged and/or protected by law. It is intended solely for the use of the
> person to whom it is addressed. If you are not the intended recipient, please
> notify the sender immediately and do not disclose the contents to any other
> person, use it for any purpose, or store or copy the information in any medium.
> Please also delete all copies of this email and any attachments from your
> system.
>
> We cannot guarantee the security or confidentiality of email communications. We
> do not accept any liability for losses or damages that you may suffer as a
> result of your receipt of this email including but not limited to computer
> service or system failure, access delays or interruption, data non-delivery or
> mis-delivery, computer viruses or other harmful components.
>
> Copyright in this email and any attachments belong to Select Service Partner UK
> Limited. Should you communicate with anyone at Select Service Partner UK Limited by
> email, you consent to us monitoring and reading any such correspondence.
>
> Nothing in this email shall be taken or read as suggesting, proposing or
> relating to any agreement concerted practice or other practice that could
> infringe UK or EC competition legislation.
>
> Select Service Partner UK Limited is a company registered in England and Wales
> (company number 05687183) whose registered office is at 1 The Heights, Brooklands, Weybridge. Surrey. KT13 0NY
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> 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
>
--
http://alexus.org/
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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