nsca/services issue

Mike Carpenter rothschilde2006 at yahoo.com
Tue Nov 21 19:43:06 CET 2006


That was the answer...thank you very much...

frank <ratty at they.org> wrote:  I'm not absolutely positive, but I think you just need to change your 
"test" file so it says "syslog-ng" instead of "nmbd". It's possible to 
send passive checks (via nsca or whatever other methods one may employ) 
for _any_ host or service you can imagine, but Nagios will log and ignore 
every one of them unless they're properly defined in your Nagios config 
files.


>From http://nagios.sourceforge.net/docs/2_0/passivechecks.html

Note that in order to submit service checks to Nagios, a service must have 
already been defined in the object configuration file! Nagios will ignore 
all check results for services that had not been configured before it was 
last (re)started.


-f

On Tue, 21 Nov 2006, Mike Carpenter wrote:

> Probably not...
>
> I have been reading some documentation on both syslog and nsca that talk (at the same time) about distributed systems and logging. This is a test script that I took from one to the pieces of documentation and appears that I messed up at midnight.
>
> With that said...how can I can I test this in this manner?
>
> Thanks
>
> frank wrote:
>
> Sorry for top-posting but my point would get lost in the mix.
>
> Pardon me if I'm wrong here, but it looks like you have a service defined
> for syslog-ng, yet the status that you're sending thru nsca is for _nmbd_.
> nmbd != syslog-ng, therefore no change to nagios display.
>
> Did I miss something?
>
> -f
>
>
> On Tue, 21 Nov 2006, Mike Carpenter wrote:
>
>> Date: Tue, 21 Nov 2006 09:20:21 -0800 (PST)
>> From: Mike Carpenter
>> To: nagios-users at lists.sourceforge.net
>> Subject: [Nagios-users] nsca/services issue
>>
>> I have a question about nsca and service checks. I am running nsca 2.6 and Nagios 2.5. I have just trying to send a simple test service check to Nagios to see if I can get the state to change
and it isn’t working

>>
>> Here is what I am trying to do

>>
>> From the remote machine:
>> /usr/bin/send_nsca –H ian -d “;” –c /etc/send_nagios.cfg < test
>>
>> The file test contains:
>> mike;nmbd;2;’ok-just one test’
>>
>> I have configured nsca on the Nagios server and the config file contains:
>>
>> server_port=5667
>> server_address=192.168.1.10
>> nsca_user=nagios
>> nsca_group=nagios
>> debug=0
>> command_file=/usr/local/nagios/var/rw/nagios.cmd
>> alternate_dump_file=/usr/local/nagios/var/rw/nsca.dump
>> aggregate_writes=0
>> append_to_file=0
>> max_packet_age=30
>> password=password
>> decryption_method=10
>>
>> The send_nagios.cfg contains:
>> password=password
>> encryption_method=10
>>
>> My service check is:
>>
>> define service{
>> host_name mike
>> service_description syslog-ng
>> active_checks_enabled 0
>> passive_checks_enabled 1
>> check_freshness 0
>> is_volatile 1
>> max_check_attempts 1
>> normal_check_interval 1
>> retry_check_interval 1
>> check_period none
>> contact_groups nagios-admins
>> check_command check_dummy!2!Critical
>> notification_options w,c,u
>> notification_period 24x7
>> notification_interval 120
>> }
>>
>> The /var/log/messages file shows the following:
>>
>> Nov 21 00:09:00 ian nsca[12202]: SERVICE CHECK -> Host Name: 'mike', Service Description: 'nmbd', Return Code: '2', Output: ''ok-just one test''
>>
>> Nov 21 00:09:47 ian nagios: EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;mike;nmbd;2;'ok-just one test'
>>
>> It appears that the external command file is getting the check
but the host page just sits there saying that the host hasn’t been checked. I have tried several different states and still the same result. I understand that an active check isnt being performed but I would think that because of the above "PROCESS_SERVICE_CHECK_RESULT" line that the nagios.cmd file got the message and the page should be updated with a critical message.
>>
>> I read in the docs that the check needs to have the date in front of it 
but when I tried that I couldn’t get nsca to expand the variable
I have checked permissions, etc.
>>
>> So
where have I messed up? LOL.
>>
>> Any help is greatly appreciated.
>>
>>
>> ---------------------------------
>> Sponsored Link
>>
>> Mortgage rates as low as 4.625% - $150,000 loan for $579 a month. Intro-*Terms
>
>
> ---------------------------------
> Sponsored Link
>
> Degrees for employed people - in as fast as 1 year. A.S. / Bachelors / Masters

 
---------------------------------
Sponsored Link

Rates near 39yr lows. $510,000 Loan for $1698/mo -   Calculate new house payment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20061121/50a6b90b/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-------------- next part --------------
_______________________________________________
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