Specifying a service on a different host withsend_nsca

Marc Powell marc at ena.com
Mon Nov 5 20:12:49 CET 2007



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Mohr James
> Sent: Monday, November 05, 2007 12:52 PM
> To: Nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Specifying a service on a different host
> withsend_nsca
> 
> Hi All!
> 
> 
> 
> We have nagios 2.4 and would like to know if there is any way of
> specifying a service different host than the one using send_nsca. For
> example, the nagios server is not allowed to have contact to several
> customers' networks. However, we do have one machine that does have
access
> to each network. The one machine monitors several customer machines
and
> sends the status via send_ncsa. The problem is that the host is always
the
> intermediate machine and not that machine that is actually being
> monitored. Therefore, we would like to be able to specify the actual
host
> name when using send_nsca. Is this possible? Is there a newer version
> where this is possible?

You must specify the host_name with any version of send_nsca that I am
aware of as part of the check result data you send back to the nagios
server. You just seem to have it hard coded to be a specific host for
all results --

$ send_nsca --help 

Usage: ../bin/send_nsca <host_address> [-p port] [-to to_sec] [-d delim]
[-c config_file]

<snip>

Note:
This utility is used to send passive service check results to the NSCA
daemon.
Servce check data that is to be sent to the NSCA daemon is read from
standard
input. Service check information is in the following format
(tab-delimited
unless overriden with -d command line argument, one entry per line):

<host_name>[tab]<svc_description>[tab]<return_code>[tab]<plugin_output>[
newline]


^^^ it's this last bit that you need to modify to send the correct host
name. Be aware that nagios will reject submissions for hosts/services
that it doesn't know about so you almost certainly need to do some
config re-writing to make it work.

--
Marc

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
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