Page 1 of 1

Nagios doesn't send notification

Posted: Thu Oct 13, 2022 5:40 am
by cossali98
Good morning all,
I'm facing a strange issue with a service's notifications.
I'm expecting that nagios sends a notification via mail to contact group primo livello when the available space disk on C is below 2 GB.

Here there are my config files, could someone help me to understand where is the problem? I laready tried to modify the name of service and host, modify the notification period, first_notification_delay and other parameters but nothing has changed. I waited also for one hour but any notification hasn't been sent.

I can't find anything related in the nagios log.

Config file

Code: Select all

define  host {
        use                             HOST_SA
        host_name                       VM_iw-app
        alias                           iw-app.iw.local
        address                         XXX.XXX.XXX.XXX
        parents                         VMPOOL_esxpool02
        notification_period             IW-REBOOT
        }

define  service {
        use                             SERVICE_SA
        host_name                       VM_iw-app
        service_description             Space_available_disk_C
        check_command                   check-snmp-disk!28468bb6!@2048!@1024!TIMEOUT!COMMUNITY!VERSION!PORT!
#       check_command                   check-snmp-disk!28468bb6!@202400!@202400!TIMEOUT!COMMUNITY!VERSION!PORT!  ##check if space disk is below 200Gb (used for test)
        check_interval                  5
        notification_period             IW-REBOOT
        }

define  service {
        use                             SERVICE_SA
        host_name                       VM_iw-app
        service_description             CPU_usage
        check_command                   check-win-snmp-cpu-avg!$_HOSTCPUWARNING$!$_HOSTCPUCRITICAL$!ict_read
        check_interval                  15
        max_check_attempts              14
        notification_period             IW-REBOOT
        }
SERVICE_SA

Code: Select all

define  service {
        name                            SERVICE_SA
        active_checks_enabled           1
        check_freshness                 0
        check_interval                  15
        check_period                    24x7
        contact_groups                  primo_livello
        event_handler_enabled           1
        first_notification_delay        15
        flap_detection_enabled          1
        high_flap_threshold             0
        is_volatile                     0
        low_flap_threshold              0
        max_check_attempts              3
        notification_interval           0
        notification_options            w,u,c,r
        notification_period             24x7
        notifications_enabled           1
        obsess_over_service             1
        parallelize_check               1
        passive_checks_enabled          1
        process_perf_data               1
        register                        0
        retain_nonstatus_information    1
        retain_status_information       1
        retry_interval                  1
        }
HOST_SA

Code: Select all

define  host {
        name                            HOST_SA
        check_command                   check-host-alive
        max_check_attempts              3
        retry_interval                  1
        active_checks_enabled           1
        passive_checks_enabled          1
        obsess_over_host                1
        check_freshness                 0
        freshness_threshold             0
        event_handler_enabled           1
        low_flap_threshold              0
        high_flap_threshold             0
        flap_detection_enabled          1
        process_perf_data               1
        retain_status_information       1
        retain_nonstatus_information    1
        notification_interval           0
        first_notification_delay        15
        notification_period             24x7
        notification_options            d,u,r
        notifications_enabled           1
        contact_groups                  primo_livello
        _centreonciscoif                --oid-display ifName --oid-extra-display ifAlias --add-duplex-status --add-err-disable --critical-status '%{admstatus
} eq "up" and %{opstatus} ne "up" or %{duplexstatus} ne "fullDuplex" or %{errdisable} ne "-"' --name --interface
        _centreonciscopo                --oid-display ifName --oid-extra-display ifAlias --add-err-disable --critical-status '%{admstatus} eq "up" and %{opst
atus} ne "up" or %{errdisable} ne "-"' --name --interface
        _centreonvcentercpu             --warning-total-cpu 80 --critical-total-cpu 80
        _controlup                      'name=Application,logged_after=5m,event_id=1000,message=Successful logon: to resource: notepad' -w 1: -c 1:
        _cpucritical                    95
        _cpuwarning                     90
        _cvclient                       'service=GxCVD(Instance001),service=GxFWD(Instance001),service=GxClMgrS(Instance001)'
        _diskcritical                   90
        _diskdatalarge                  -w 70: -c 50: -u G
        _diskdatamedium                 -w 50: -c 30: -u G
        _diskdatasmall                  -w 30: -c 20: -u G
        _diskwarning                    75
        _frgcpucritical                 55
        _frgcpuwarning                  75
        _frgmemcritical                 60
        _frgmemwarning                  70
 _memcritical                    100
        _memwarning                     98
        _mssqlcentreon                  --username username_here --password password_here
        _ontapaggr                      --warning 90 --critical 95
        _ontapvol                       --size-warning 93 --size-critical 95 --inode-warning 90 --inode-critical 90 --snap-warning 90 --snap-critical 90
        _snmpv2centreon                 --snmp-version 2 --snmp-community ict_read
        _snmpv3centreon                 --snmp-version 3 --snmp-username username_here --authprotocol SHA --authpassphrase password_here --privprotocol DES --priv
passphrase password_here
        _snmpv3centreonidrac            --snmp-version 3 --snmp-username username_here --authprotocol SHA --authpassphrase password_here --privprotocol DES --priv
passphrase password_here
        _snmpv3cisco                    -v 3 -C pco-read-v3:password_here:sha:T3qvbhjvef:des
        _svccitrix7                     'service=CtxAudioSvc,service=CitrixVDACeipService,service=BrokerAgent,service=CitrixRedirector,service=CdfSvc,service
=Citrix Encryption Service,service=Citrix EUEM,service=CtxGDTSvc,service=CitrixCseEngine,service=CtxBrowserSvc,service=CtxHdxWebSocketService,service=CtxPort
FwdSvc,service=CtxTeamsSvc,service=CtxLocalUserSrv,service=CtxSensVcSvc,service=MRVCSvc,service=CtxMultiTouchSvc,service=CtxNsapSvc,service=cpsvc,service=Ser
vicesManager,service=CtxSmartCardSvc,service=StackControlService,service=CitrixTelemetryService,service=CitrixUWACacheService,service=CWAUpdaterService,statu
s=running'
        _svccitrix7sba                  'service=CtxAudioSrv,service=CitrixVDACeipService,service=BrokerAgent,service=CitrixRDR,service=CdfSvc,service=PicaDv
cControllerSvc,service=Citrix Encryption Service,service=Citrix EUEM,service=CtxGDTSvc,service=CitrixCseEngine,service=CtxBrowserSvc,service=CtxHdxWebSocketS
ervice,service=CtxPortFwdSvc,service=CtxTeamsSvc,service=PorticaService,service=CtxLocalUserSrv,service=CtxSensVcSvc,service=MRVCSvc,service=CtxMultiTouchSvc
,service=CtxNsapSvc,service=cpsvc,service=CtxSCardCertPropSvc,service=CtxSCardRemovalPolicySvc,service=CtxSmartCardSvc,service=CitrixTelemetryService,service
=CitrixUWACacheService,service=CWAUpdaterService,status=running'
        _svciis                         'service=IISADMIN,service=W3SVC,status=running'
        _swapcritical                   50
        _swapwarning                    80
        _token                          qUwHYyd.6BwFrdZwZGwSjfnheCTY3T
        _unixdiskboot                   -w 100: -c 0: -u M
        _unixdiskroot                   -w 7: -c 5: -u G
        _uptimecritical                 604800
        _uptimewarning                  1209600
        _windisksystem                  -w 7: -c 5: -u G
        register                        0
        }
TIMEPERIOD

Code: Select all

define  timeperiod {
        timeperiod_name IW-REBOOT
        alias           Bypass check during reboot
        sunday          00:00-06:40,07:40-24:00
        monday          00:00-06:40,07:40-24:00
        tuesday         00:00-06:40,07:40-24:00
        wednesday       00:00-06:40,07:40-24:00
        thursday        00:00-06:40,07:40-24:00
        friday          00:00-06:40,07:40-24:00
        saturday        00:00-06:40,07:40-24:00
        }