nrpe and multiple lines?
Werner Flamme
Werner.Flamme at ufz.de
Fri Feb 4 14:37:12 CET 2005
LOL ...
now, how do I convince NAGIOS itself to take an input of more than one line?
Invoking check_nrpe now gives all the 6 lines, but nagios shows only one
line when looking at "Service State Information". So I think only this line
turns on the green colour. But the info of the other lines is needed too!
Do I really have to split this service into six services? :-(
Regards,
\/\/erner
Werner Flamme schrieb am 04.02.2005 14:26:
> You are the greatest! It works fine!
>
> Best regards,
> \/\/erner
>
>
> Gotzon Astondoa schrieb am 04.02.2005 13:30:
>
>>Hi:
>>
>> I can see in the code that in function my_system, in file nrpe.c there
>>is this line:
>> fgets(buffer,sizeof(buffer)-1,fp);
>> This gets only the first line of the response.
>>
>> Y suppose that, if you change it by:
>> int i=0;
>> while(!feof(fp))
>> {
>> buffer[i]=fgetc(fp);
>> i++;
>> if (i >= (sizeof(buffer)-1))
>> {
>> buffer[i]='\n';
>> break;
>> }
>> }
>> buffer[i]='\n';
>>
>> Or something similar it will work.
>>
>>
>>bye...
>>----- Original Message -----
>>From: "Werner Flamme" <Werner.Flamme at ufz.de>
>>To: <Nagios-users at lists.sourceforge.net>
>>Sent: Friday, February 04, 2005 1:22 PM
>>Subject: [Nagios-users] nrpe and multiple lines?
>>
>>
>>
>>
>>>Hi all,
>>>
>>>we have a nagios host working (quite ;-) fine. Up to now, local checks,
>>>ping and http-checks work as they should, the rest will be tested soon ;-)
>>>
>>>The first problem we got is related to nrpe.
>>>
>>>We want to check a foreign host running SAP. When we do this manually
>>
>>there
>>
>>
>>>is an output of 6 lines. When we invoke this check via check_nrpe from our
>>>nagios host, there is only one line (the first) coming back.
>>>
>>># nrpe -h
>>>
>>>NRPE - Nagios Remote Plugin Executor
>>>Copyright (c) 1999-2003 Ethan Galstad (nagios at nagios.org)
>>>Version: 2.0
>>>Last Modified: 09-08-2003
>>>License: GPL with exemptions (-l for more info)
>>>SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required
>>>
>>>#rpm -q openssl
>>>openssl-0.9.6g-114
>>>
>>>OpenSSL is not the problem, we use "-n" on the command line on both
>>>machines - thanks to this list's archive ;-). Both machines are running
>>>SuSE Linux Exterprise Server 8 for x86.
>>>
>>>Maybe I'm too dumb, but I did not find a possibility to get more than 1
>>>line back to our nagios host. Someone here to help me?
>>>
>>>Thanks in advance,
>>>\/\/erner
>>>
>>
>>
>>
>>
>>-------------------------------------------------------
>>This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
>>Tool for open source databases. Create drag-&-drop reports. Save time
>>by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
>>Download a FREE copy at http://www.intelliview.com/go/osdn_nl
>>_______________________________________________
>>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
>>
--
Werner Flamme, Abt. WKDV
UFZ Umweltforschungszentrum Leipzig-Halle GmbH,
Permoserstr. 15, 04318 Leipzig - http://www.ufz.de
eMail: werner.flamme at ufz.de, Tel.: (0341) 235-2500
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
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