Re: using contacts causing double email alert
Posted: Thu Sep 18, 2014 5:14 pm
Thanks, as ever, for the help millisa.
Support for Nagios products and services
https://support.nagios.com/forum/
Code: Select all
Sep 17 08:42:09 SIT-NAGIOS postfix/pickup[19373]: 8E979600B3: uid=106 from=<nagios>
Sep 17 08:42:09 SIT-NAGIOS postfix/cleanup[4639]: 8E979600B3: message-id=<20140917004209.8E979600B3@SIT-NAGIOS>
Sep 17 08:42:09 SIT-NAGIOS postfix/qmgr[976]: 8E979600B3: from=<nagios@SIT-NAGIOS>, size=649, nrcpt=2 (queue active)
Sep 17 08:42:09 SIT-NAGIOS postfix/smtp[4645]: 668066008D: to=<[email protected]>, relay=sit-smtp01.xxx.com[10.16.0.142]:25, delay=0.47, delays=0.11/0.07/0.02/0.28, dsn=2.6.0, status=sent (250 2.6.0 <20140917004209.668066008D@SIT-NAGIOS> Queued mail for delivery)
Sep 17 08:42:09 SIT-NAGIOS postfix/qmgr[976]: 668066008D: removed
Sep 17 08:42:09 SIT-NAGIOS postfix/smtp[4648]: 8E979600B3: to=<[email protected]>, relay=sit-smtp01.xxx.com[10.16.0.142]:25, delay=0.37, delays=0.01/0.04/0.09/0.22, dsn=2.6.0, status=sent (250 2.6.0 <20140917004209.8E979600B3@SIT-NAGIOS> Queued mail for delivery)
Sep 17 08:42:09 SIT-NAGIOS postfix/smtp[4648]: 8E979600B3: to=<[email protected]>, relay=sit-smtp01.xxx.com[10.16.0.142]:25, delay=0.37, delays=0.01/0.04/0.09/0.22, dsn=2.6.0, status=sent (250 2.6.0 <20140917004209.8E979600B3@SIT-NAGIOS> Queued mail for delivery)
Sep 17 08:42:09 SIT-NAGIOS postfix/qmgr[976]: 8E979600B3: removedCode: Select all
contacts itdba
contact_groups null
Code: Select all
contacts null
contact_groups itnetworksupport
Code: Select all
And the third with the config you are trying to make work (state what you expect that alert to do).
If you are wanting to notify a group, put the contact_groups setting here. Just make it clear who you are intending to receive the alerts.
Code: Select all
# default services template
define service{
name generic-service
use generic-service-template
#contacts root
contacts null
contact_groups admins
}
# services template for DBA team
define service{
name generic-service-dba
use generic-service-template
contacts itdba
contact_groups null
#contact_groups db-admins
}
# services template for CIM team
define service{
name generic-service-cim
use generic-service-template
contacts itcim
#contact_groups cim-admins
}Code: Select all
[1411110016] SERVICE FLAPPING ALERT: SIT-WSUS;CPU Load;STARTED; Service appears to have started flapping (30.5% change >= 20.0% threshold)
[1411110186] SERVICE NOTIFICATION: itdba;6800SRETDB;F Drive;CRITICAL;notify-service-by-email;SNMP CRITICAL - F:\ Label:New Volume Serial Number 46939174 at 96% with 10,190 of 286,081 MB free
[1411110236] SERVICE NOTIFICATION: itnetworksupport;SIT-NAS2;F Drive;CRITICAL;notify-service-by-email;SNMP CRITICAL - F:\ Label:Data Serial Number d46ec860 at 97% with 8,741 of 419,258 MB free
[1411110356] SERVICE ALERT: SIT-HUBCAS01;Physical Memory;WARNING;SOFT;1;SNMP WARNING - Physical Memory at 85% with 1,178 of 8,186 MB free
[1411110416] SERVICE ALERT: S-CEMSDB02;Physical Memory;CRITICAL;SOFT;1;SNMP CRITICAL - Physical Memory at 97% with 188 of 8,191 MB free
[1411110416] SERVICE ALERT: SIT-HUBCAS01;Physical Memory;WARNING;SOFT;2;SNMP WARNING - Physical Memory at 85% with 1,178 of 8,186 MB free
[1411110476] SERVICE ALERT: S-CEMSDB02;Physical Memory;CRITICAL;SOFT;2;SNMP CRITICAL - Physical Memory at 97% with 188 of 8,191 MB free
[1411110476] SERVICE ALERT: SIT-HUBCAS01;Physical Memory;OK;SOFT;3;SNMP OK - Physical Memory at 84% with 1,237 of 8,186 MB free
[1411110536] SERVICE ALERT: S-CEMSDB02;Physical Memory;CRITICAL;SOFT;3;SNMP CRITICAL - Physical Memory at 97% with 188 of 8,191 MB free
[1411110536] SERVICE ALERT: SINFOHUB;D Drive;CRITICAL;HARD;6;SNMP CRITICAL - D:\ Label:New Volume Serial Number 78af2747 at 90% with 24,382 of 256,000 MB free
[1411110536] SERVICE FLAPPING ALERT: SINFOHUB;D Drive;STARTED; Service appears to have started flapping (22.0% change >= 20.0% threshold)
[1411110566] SERVICE ALERT: SIT-MBX01;Physical Memory;WARNING;HARD;6;SNMP WARNING - Physical Memory at 94% with 879 of 16,378 MB free
[1411110576] SERVICE NOTIFICATION: itnetworksupport;SRMSHOST08A;C Drive;CRITICAL;notify-service-by-email;SNMP CRITICAL - C:\ Label: Serial Number 30ae4373 at 82% with 5,220 of 30,482 MB free
[1411110576] SERVICE NOTIFICATION: itcim;SRMSHOST08A;C Drive;CRITICAL;notify-service-by-email;SNMP CRITICAL - C:\ Label: Serial Number 30ae4373 at 82% with 5,220 of 30,482 MB free
[1411110596] SERVICE ALERT: S-CEMSDB02;Physical Memory;CRITICAL;SOFT;4;SNMP CRITICAL - Physical Memory at 98% with 104 of 8,191 MB free
[1411110656] SERVICE ALERT: S-CEMSDB02;Physical Memory;CRITICAL;SOFT;5;SNMP CRITICAL - Physical Memory at 98% with 104 of 8,191 MB free
[1411110716] SERVICE ALERT: S-CEMSDB02;Physical Memory;CRITICAL;HARD;6;SNMP CRITICAL - Physical Memory at 97% with 197 of 8,191 MB free
[1411110786] SERVICE NOTIFICATION: itdba;6800SRETDB;F Drive;CRITICAL;notify-service-by-email;SNMP CRITICAL - F:\ Label:New Volume Serial Number 46939174 at 96% with 10,190 of 286,081 MB free
[1411110836] SERVICE NOTIFICATION: itnetworksupport;SIT-NAS2;F Drive;CRITICAL;notify-service-by-email;SNMP CRITICAL - F:\ Label:Data Serial Number d46ec860 at 97% with 8,741 of 419,258 MB free
[1411110866] SERVICE ALERT: SIT-MBX01;Physical Memory;CRITICAL;HARD;6;SNMP CRITICAL - Physical Memory at 95% with 768 of 16,378 MB freeCode: Select all
[1411110576] SERVICE NOTIFICATION: itnetworksupport;SRMSHOST08A;C Drive;CRITICAL;notify-service-by-email;SNMP CRITICAL - C:\ Label: Serial Number 30ae4373 at 82% with 5,220 of 30,482 MB free
[1411110576] SERVICE NOTIFICATION: itcim;SRMSHOST08A;C Drive;CRITICAL;notify-service-by-email;SNMP CRITICAL - C:\ Label: Serial Number 30ae4373 at 82% with 5,220 of 30,482 MB free
Code: Select all
Sep 19 15:09:36 SIT-NAGIOS postfix/pickup[10150]: 5609F60062: uid=106 from=<nagios>
Sep 19 15:09:36 SIT-NAGIOS postfix/cleanup[29168]: 5609F60062: message-id=<20140919070936.5609F60062@SIT-NAGIOS>
Sep 19 15:09:36 SIT-NAGIOS postfix/qmgr[976]: 5609F60062: from=<nagios@SIT-NAGIOS>, size=619, nrcpt=1 (queue active)
Sep 19 15:09:36 SIT-NAGIOS postfix/smtp[29172]: 5609F60062: to=<[email protected]>, relay=sit-smtp01.xxx.com[10.16.0.142]:25, delay=0.42, delays=0.06/0.03/0.01/0.32, dsn=2.6.0, status=sent (250 2.6.0 <20140919070936.5609F60062@SIT-NAGIOS> Queued mail for delivery)
Sep 19 15:09:36 SIT-NAGIOS postfix/qmgr[976]: 5609F60062: removed
------
Sep 19 15:09:36 SIT-NAGIOS postfix/pickup[10150]: 6CE616008B: uid=106 from=<nagios>
Sep 19 15:09:36 SIT-NAGIOS postfix/cleanup[29168]: 6CE616008B: message-id=<20140919070936.6CE616008B@SIT-NAGIOS>
Sep 19 15:09:36 SIT-NAGIOS postfix/qmgr[976]: 6CE616008B: from=<nagios@SIT-NAGIOS>, size=619, nrcpt=1 (queue active)
Sep 19 15:09:36 SIT-NAGIOS postfix/smtp[29177]: 6CE616008B: to=<[email protected]>, relay=sit-smtp01.xxx.com[10.16.0.142]:25, delay=0.35, delays=0.01/0.03/0.02/0.29, dsn=2.6.0, status=sent (250 2.6.0 <20140919070936.6CE616008B@SIT-NAGIOS> Queued mail for delivery)
Sep 19 15:09:36 SIT-NAGIOS postfix/qmgr[976]: 6CE616008B: removed
Code: Select all
define service{
use generic-service-cim
host_name SRMSHOST08A
service_description C Drive
check_command check_snmp_disk!public!C!70%!80%
notifications_enabled 1
}
Code: Select all
define service{
name generic-service-cim
use generic-service-template
contacts itcim
#contact_groups cim-admins
}
Code: Select all
define service{
name generic-service-template ; The 'name' of this service template
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 0 ; Service notifications are enabled
event_handler_enabled 1 ; Service 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
notification_interval 10 ; Only send notifications on status change by default.
is_volatile 0
check_period 24x7
normal_check_interval 5
retry_check_interval 1
max_check_attempts 6
notification_period 24x7
notification_options w,u,c,r
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
HI abrist,abrist wrote:OP, do you have other responses regarding the rest of millisa's inquiries?