Nagios not recognizing service via send_nsca

Mohr James james.mohr at elaxy.com
Tue Oct 4 17:42:38 CEST 2005


Hi All!

I want to create a service on the Nagios server (2.0b3) that accepts
message via ncsa and sends an SMS. In this way we have tested the chain
through nagios to sending a message. I have two services in service.cfg
defined like this:

define service (
        use                             generic-service         ; Name
of service template to use
        host_name                       nts-mgm-18
        service_description             SendXMS
        is_volatile                     1
        active_checks_enabled           0
        check_command                   check-host-alive
}

define service (
        use                             generic-service         ; Name
of service template to use
        host_name                       nts-mgm-17
        service_description             SendXMS
        is_volatile                     1
        active_checks_enabled           0
        check_command                   check-host-alive
}
The generic service is defined like this:

# Generic service definition template
define service{
        name                            generic-service ; The 'name' of
this service template, referenced in other service definitions
        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)
        event_handler_enabled           1       ; Service event handler
is enabled
        flap_detection_enabled          1       ; Flap detection 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

        register                        0       ; DONT REGISTER THIS
DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
        is_volatile                     0
        check_period                    24x7
        active_checks_enabled           1
        passive_checks_enabled          1
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  datacenter
        notification_interval           120
        notification_period             24x7
        notification_options            c
        notifications_enabled           0
}

After I added the services, I restarted nagios and nsca. When I am on
nts-mgm-18, I can run send_nsca, it sends the message and I see the text
in the Nagios GUI. I also see this in the /var/log/messages on the
Nagios server:

Oct  4 17:26:03 nts-mgm-17 nsca[20268]: Connection from 10.2.28.61 port
38666
Oct  4 17:26:03 nts-mgm-17 nsca[20268]: Host address checks out ok
Oct  4 17:26:03 nts-mgm-17 nsca[20268]: Handling the connection...
Oct  4 17:26:03 nts-mgm-17 nsca[20268]: SERVICE CHECK -> Host Name:
'nts-mgm-18', Service Description: 'SendXMS', Return Code: '0', Output:
'TEST TEST TEST'
Oct  4 17:26:03 nts-mgm-17 nsca[20268]: End of connection...
Oct  4 17:26:03 nts-mgm-17 nagios: EXTERNAL COMMAND:
PROCESS_SERVICE_CHECK_RESULT;nts-mgm-18;SendXMS;0;TEST TEST TEST 

However, when I run the command from nts-mgm-17 (the Nagios server), in
the /var/log/messages all I see is this:

Oct  4 17:27:23 nts-mgm-17 nsca[20268]: Connection from 10.2.28.48 port
35050
Oct  4 17:27:23 nts-mgm-17 nsca[20268]: Host address checks out ok
Oct  4 17:27:23 nts-mgm-17 nsca[20268]: Handling the connection...
Oct  4 17:27:23 nts-mgm-17 nsca[20268]: End of connection...

Apparently it does not recognize SendXMS as a valid service. I have
ensured that the local machine ist listed in nsca.cfg file, so I am
fairly sure it is not simply ignoring this machine. I have looked though
the nsca.c to find a way to be more verbose, but I didn't find anything
useful.

I am at a lost to see where the difference is. Does it have something to
do with the fact that this is the local machine? I would appreciate any
info at all.

Regards,

Jim Mohr


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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