Page 1 of 1

NRPE Scheduled task error

Posted: Tue Nov 09, 2021 7:37 am
by Baptist39
Hello everyone!

A little problem that is bothering me :)

I want to supervise the execution of a pannified windows task, so I use NRPE, it's the simplest solution I found.
Before creating my command on Nagios XI, I test it directly on the server.

Image

My command works well !
"OK: All tasks are ok|'FTP_CopyfactInfra_exit_code'=0;0;0 'FTP_CopyfactInfra_most_recent_run_time'=1636453698;0;1636370894"

So I switch to Nagios, I create my command the same way:
Image

I make a small test of order, and it is there that it blocks:
Image

"Failed to validate filter see log for details: Filter expression is not valid: title eq \'FTP_CopyfactInfra\'"

However, the syntax is exactly the same as the first one I ran without using the nagios interface?
So I don't understand what's wrong with this "\" character...

If someone has an idea, I'm interested !

Thank !! :)

(Sorry for my english translation)

Re: NRPE Scheduled task error

Posted: Fri Nov 12, 2021 11:49 am
by benjaminsmith
Hi,

If you have a complicated string sometimes that button will not work due to security hardening between the GUI layer and Nagios Core. I would apply confirmation and then check the home page to see if it's working.

If that's not it, double-check your command definition and argument fields for any errors. I'm not able to see that from the screenshot but given the complexity of the string here, that might be it.

Let us know if you get it worked out.

--Benjamin

Re: NRPE Scheduled task error

Posted: Fri Nov 12, 2021 11:49 am
by benjaminsmith
Hi,

If you have a complicated string sometimes that button will not work due to security hardening between the GUI layer and Nagios Core. I would apply confirmation and then check the home page to see if it's working.

If that's not it, double-check your command definition and argument fields for any errors. I'm not able to see that from the screenshot but given the complexity of the string here, that might be it.

Let us know if you get it worked out.

--Benjamin

Re: NRPE Scheduled task error

Posted: Fri Nov 19, 2021 8:32 am
by Baptist39
Hi Benjamin,

Thank you for your answer

Indeed, this was a problem with the $arg2$ argument, the command was exactly the same visually, but this was to be a problem.

So I lengthened the string passed as argument :

Image

And now everything is OK! 'OK: All tasks are ok"

Thank you very much, the topic can be closed.

Re: NRPE Scheduled task error

Posted: Fri Nov 19, 2021 1:26 pm
by benjaminsmith
Thank you very much, the topic can be closed.
Excellent! We'll go ahead and close this out.

Have a great weekend.