Page 3 of 3

Re: Help with NRPE please

Posted: Thu Sep 12, 2013 10:00 am
by csward
Ok, getting closer. I changed the socket timeouts on the .ini file. This is allowing it to process when I run the command from the nagios prompt. I will wait til the nagios core updates to verify this portion.

Re: Help with NRPE please

Posted: Thu Sep 12, 2013 10:21 am
by lmiltchev
Since it works with my c:\test folder could this just be a permission issue?
Is "j:" a network drive or a physical drive? I don't think the plugin will work with a network drive... You may review this post:
http://nsclient.org/nscp/discussion/topic/844

Re: Help with NRPE please

Posted: Thu Sep 12, 2013 10:34 am
by csward
No it's a physical drive. I did get this working through the nagios server command prompt, but still can't get it to work in core. I get the same error:

(No output returned from plugin)

Not sure why yet as my config is the same as the data i'm putting in the command prompt when i run it manually. Seems like it isn't passing the arguments across.


Also, i'm having a hard time figuring our filter expressions (--filter "name eq *GeneralUpdateAttachmentZip*"), not sure if you can help with this one, but I can't figure out the syntax. I've tried various things. I'm trying to filter just the particular word in the file name. There are characters before and after the name.

ex.
the file name is 123456GeneralUpdateAttachmentZip12536.xml and i'm just trying to filter GeneralUpdateAttachmentZip

Re: Help with NRPE please

Posted: Thu Sep 12, 2013 10:52 am
by csward
Figured the matching out. Needs to be in this format:
"name match GeneralUpdateAttachmentZip"
It's also case sensitive.

Still can't figure out the nagios core yet.

Re: Help with NRPE please

Posted: Thu Sep 12, 2013 12:38 pm
by csward
Can you verify my syntax please:

Windows.cfg
define service {
use generic-service
host_name CSITFPSP01A
service_description Check Files in CSITFPSP01a
check_command check_nrpe!check_winfile! -a '--target J:\AWIIProxy\ProcessedMessages --filter "age ge -1 hours" --filter "name match GeneralUpdateAttachmentZip" --critical 0'
}


Commands.cfg
define command{
command_name check_nrpe
command_line /usr/local/src/nagios-plugins-1.4.16/plugins/check_nrpe -H $HOSTADDRESS$ -t 180 -c $ARG1$ $ARG2$
}


.INI File
check_winfile=scripts\check_winfile.exe //T:30 //NoLogo $ARG1$

Thanks

Re: Help with NRPE please

Posted: Thu Sep 12, 2013 3:16 pm
by lmiltchev
It looks correct... not sure. Do you find anything in the nsclient.log that can point us to the right direction?

Re: Help with NRPE please

Posted: Thu Sep 12, 2013 3:39 pm
by csward
The log didn't have anything written in it. I let the process run for an hour and it finally came back with "service check timeout" error. I changed all the timeouts on the INI file a while back, so I changed the timeout in nagios and it's reporting now. I'm not sure why it took so long for the error to show up, but I'm glad it did.

Thanks for everybody's help....again!

Re: Help with NRPE please

Posted: Thu Sep 12, 2013 3:44 pm
by lmiltchev
Well, I am glad this is resolved now! :D