On 26 Mar 2010, at 07:56, Jacob d'Andrade wrote:
I’m having problems with a contact, where there should be sent a sms message,
but Ospview sends an email instead, allthoug there isn’t an email address
specified for that contact…
Contact config:
# 'Jacob - SMS' contact definition
define contact {
contact_name admin-jd-sms/masterprofile
alias Jacob - SMS
use global-contact
service_notification_period 24x7
host_notification_period 24x7
notification_level 1
contactgroups A LOOOOOOT OF CONTACTGROUPS – REMOVED TO SIMPILIFY HERE…
pager 004512345678 (REPLACED WITH FAKE CELL PHONE NUMBER HERE)
host_notification_commands notify-by-foxbox
host_notification_options d,r
service_notification_commands notify-by-foxbox
service_notification_options w,c,r,u,f
}
I have reloaded the configuration and tried a reboot of the Opsview server, but
still Opsview thinks it should contact my sms contact by email? I have a custom
sms script, the command is simplified until I get it to work…
define command{
command_name notify-by-foxbox
command_line /usr/local/nagios/libexec/notifications/foxbox.sh
$CONTACTPAGER$ $HOSTNAME$
}
I have the same script running on a normal Nagios installation where the
messages work perfect, why does Opsview send the message via
service-notify-by-email instead of notify-by-foxbox ?
Nagios.log:
[1269589324] SERVICE NOTIFICATION: admin-jd-sms;asf-core;Connectivity -
LAN;CUSTOM (OK);service-notify-by-email;OK - asf-core: rta 1.318ms, lost
0%;Jacob;Testing
Can anyone tell me why this is happening?
The admin-jd-sms in the nagios.log is not the same as the contact above. The
contact above is called admin-jd-sms/masterprofile. What is the definition for
admin-jd-sms?
Thanks for getting back on this… The admin-jd-sms contact:
# 'Jacob - SMS' contact definition - no notifications, CGI view
define contact {
contact_name admin-jd-sms
alias Jacob - SMS
use global-contact
contactgroups
hostgroup12_servicegroup17/distprofile,hostgroup12_servicegroup10/distprofile,hostgroup12_servicegroup3/distprofile,hostgroup12_servicegroup2/distprofile,hostgroup12_servicegroup9/distprofile,hostgroup3_servicegroup17/masterprofile,hostgroup3_servicegroup10/masterprofile,hostgroup3_servicegroup2/masterprofile,hostgroup3_servicegroup9/masterprofile,hostgroup17_servicegroup17/masterprofile,hostgroup17_servicegroup18/masterprofile,hostgroup17_servicegroup10/masterprofile,hostgroup17_servicegroup3/masterprofile,hostgroup17_servicegroup2/masterprofile,hostgroup17_servicegroup9/masterprofile,hostgroup16_servicegroup17/masterprofile,hostgroup16_servicegroup10/masterprofile,hostgroup16_servicegroup3/masterprofile,hostgroup16_servicegroup2/masterprofile,hostgroup16_servicegroup9/masterprofile,hostgroup18_servicegroup17/masterprofile,hostgroup18_servicegroup10/masterprofile,hostgroup18_servicegroup2/masterprofile,hostgroup18_servicegroup9/masterprofile,hostgroup34_servicegroup10/masterprofile,hostgroup34_servicegroup3/masterprofile,hostgroup34_servicegroup9/masterprofile,hostgroup35_servicegroup10/masterprofile,hostgroup35_servicegroup3/masterprofile,hostgroup35_servicegroup9/masterprofile,hostgroup36_servicegroup18/masterprofile,hostgroup36_servicegroup10/masterprofile,hostgroup36_servicegroup3/masterprofile,hostgroup36_servicegroup2/masterprofile,hostgroup36_servicegroup9/masterprofile,hostgroup37_servicegroup10/masterprofile,hostgroup37_servicegroup3/masterprofile,hostgroup37_servicegroup9/masterprofile,hostgroup19_servicegroup17/distprofile,hostgroup19_servicegroup10/distprofile,hostgroup19_servicegroup2/distprofile,hostgroup19_servicegroup9/distprofile,hostgroup20_servicegroup17/distprofile,hostgroup20_servicegroup10/distprofile,hostgroup20_servicegroup2/distprofile,hostgroup20_servicegroup9/distprofile,hostgroup9_servicegroup17/masterprofile,hostgroup9_servicegroup10/masterprofile,hostgroup9_servicegroup3/masterprofile,hostgroup9_servicegroup2/masterprofile,hostgroup9_servicegroup9/masterprofile,hostgroup21_servicegroup17/masterprofile,hostgroup21_servicegroup10/masterprofile,hostgroup21_servicegroup2/masterprofile,hostgroup21_servicegroup9/masterprofile,hostgroup22_servicegroup17/masterprofile,hostgroup22_servicegroup10/masterprofile,hostgroup22_servicegroup3/masterprofile,hostgroup22_servicegroup2/masterprofile,hostgroup22_servicegroup9/masterprofile,hostgroup6_servicegroup17/distprofile,hostgroup6_servicegroup10/distprofile,hostgroup6_servicegroup2/distprofile,hostgroup6_servicegroup9/distprofile,hostgroup23_servicegroup17/distprofile,hostgroup23_servicegroup10/distprofile,hostgroup23_servicegroup3/distprofile,hostgroup23_servicegroup2/distprofile,hostgroup23_servicegroup9/distprofile,hostgroup10_servicegroup17/masterprofile,hostgroup10_servicegroup10/masterprofile,hostgroup10_servicegroup2/masterprofile,hostgroup10_servicegroup9/masterprofile,hostgroup4_servicegroup10/masterprofile,hostgroup4_servicegroup2/masterprofile,hostgroup33_servicegroup17/masterprofile,hostgroup33_servicegroup10/masterprofile,hostgroup33_servicegroup2/masterprofile,hostgroup33_servicegroup9/masterprofile,hostgroup32_servicegroup17/distprofile,hostgroup32_servicegroup18/distprofile,hostgroup32_servicegroup10/distprofile,hostgroup32_servicegroup2/distprofile,hostgroup32_servicegroup9/distprofile,hostgroup13_servicegroup17/distprofile,hostgroup13_servicegroup10/distprofile,hostgroup13_servicegroup3/distprofile,hostgroup13_servicegroup2/distprofile,hostgroup13_servicegroup9/distprofile,hostgroup2_servicegroup6/masterprofile,hostgroup2_servicegroup5/masterprofile,hostgroup2_servicegroup1/masterprofile,hostgroup2_servicegroup1/distprofile,hostgroup2_servicegroup10/masterprofile,hostgroup2_servicegroup8/masterprofile,hostgroup31_servicegroup17/distprofile,hostgroup31_servicegroup10/distprofile,hostgroup31_servicegroup2/distprofile,hostgroup31_servicegroup9/distprofile,hostgroup14_servicegroup17/distprofile,hostgroup14_servicegroup10/distprofile,hostgroup14_servicegroup2/distprofile,hostgroup14_servicegroup9/distprofile,hostgroup30_servicegroup17/distprofile,hostgroup30_servicegroup10/distprofile,hostgroup30_servicegroup3/distprofile,hostgroup30_servicegroup2/distprofile,hostgroup30_servicegroup9/distprofile,hostgroup15_servicegroup17/distprofile,hostgroup15_servicegroup18/distprofile,hostgroup15_servicegroup10/distprofile,hostgroup15_servicegroup2/distprofile,hostgroup15_servicegroup9/distprofile,hostgroup5_servicegroup17/distprofile,hostgroup5_servicegroup10/distprofile,hostgroup5_servicegroup3/distprofile,hostgroup5_servicegroup2/distprofile,hostgroup5_servicegroup9/distprofile,hostgroup40_servicegroup10/masterprofile,hostgroup24_servicegroup17/distprofile,hostgroup24_servicegroup10/distprofile,hostgroup24_servicegroup3/distprofile,hostgroup24_servicegroup2/distprofile,hostgroup24_servicegroup9/distprofile,hostgroup25_servicegroup17/distprofile,hostgroup25_servicegroup10/distprofile,hostgroup25_servicegroup3/distprofile,hostgroup25_servicegroup2/distprofile,hostgroup25_servicegroup9/distprofile,hostgroup38_servicegroup10/masterprofile,hostgroup41_servicegroup12/distprofile,hostgroup41_servicegroup10/distprofile,hostgroup41_servicegroup2/distprofile,hostgroup41_servicegroup9/distprofile,hostgroup8_servicegroup17/masterprofile,hostgroup8_servicegroup6/masterprofile,hostgroup8_servicegroup5/masterprofile,hostgroup8_servicegroup4/masterprofile,hostgroup8_servicegroup18/masterprofile,hostgroup8_servicegroup10/masterprofile,hostgroup8_servicegroup3/masterprofile,hostgroup8_servicegroup2/masterprofile,hostgroup8_servicegroup8/masterprofile,hostgroup8_servicegroup9/masterprofile,hostgroup8_servicegroup19/masterprofile,hostgroup7_servicegroup17/distprofile,hostgroup7_servicegroup10/distprofile,hostgroup7_servicegroup3/distprofile,hostgroup7_servicegroup2/distprofile,hostgroup7_servicegroup9/distprofile,hostgroup26_servicegroup17/distprofile,hostgroup26_servicegroup18/distprofile,hostgroup26_servicegroup10/distprofile,hostgroup26_servicegroup2/distprofile,hostgroup26_servicegroup9/distprofile,hostgroup27_servicegroup10/masterprofile,hostgroup27_servicegroup2/masterprofile,hostgroup39_servicegroup10/distprofile,hostgroup28_servicegroup17/distprofile,hostgroup28_servicegroup10/distprofile,hostgroup28_servicegroup2/distprofile,hostgroup28_servicegroup9/distprofile,hostgroup29_servicegroup17/distprofile,hostgroup29_servicegroup18/distprofile,hostgroup29_servicegroup10/distprofile,hostgroup29_servicegroup3/distprofile,hostgroup29_servicegroup2/distprofile,hostgroup29_servicegroup9/distprofile
}
But… I found the problem… I made the mistake of copying an entry in the
Advanced – SMS Notifications menu, the script was set to “Monitoring Server”,
if I change it to Master, it works perfectly.
Kind regards
Jacob
In a distributed environment, we use multiple contacts in order to
differentiate between what is notified on the master and what is notified from
the active monitoring server. We've got a much more elegant solution in 3.7.0.
Ton
_______________________________________________
Opsview-users mailing list
<mailto:[email protected]> [email protected]
<http://lists.opsview.org/lists/listinfo/opsview-users>
http://lists.opsview.org/lists/listinfo/opsview-users
_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-users