@lmiltchev
The first occurrence of $ARG1$ is within a quoted string and is purely a label for readability.
I have tested with the first occurence removed but this has no effect whatsoever.
check_files.pl failing after XI update from 2012 to 2014
Re: check_files.pl failing after XI update from 2012 to 2014
I tested this with the following:
In Commands:
In Service
Note: I had to escape the asterisk with a backslash.
This seemed to work fine.
In Commands:
Code: Select all
$USER1$/check_files.pl -L "XI Backup $ARG1$" -H $HOSTADDRESS$ -D /tmp/$ARG1$ -F $ARG2$ -w $ARG3$ -c $ARG4$Code: Select all
check_files.pl!test!\*.tar.gz!4:40!1:45!This seemed to work fine.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_files.pl failing after XI update from 2012 to 2014
Using the backslash as an escape character for the asterisk in the command does the trick!!
It is very frustrating however to have to spend so much time and energy in finding out such a (relatively) simple solution.
Can you please explain to me where the problem came from? Was it the OS updates, or was it the Nagios update.
Furthermore is there some documentation you can point me to that explains the difference between "Testing check from command line" from within Nagios and really testing from commandline. (see attached files)
I think that a feature like a testing method that works exactly the same as the actual execution in NagiosXI would be very much appreciated by everyone.
(I know i would!)
Thanks for helping me solve this problem!!
It is very frustrating however to have to spend so much time and energy in finding out such a (relatively) simple solution.
Can you please explain to me where the problem came from? Was it the OS updates, or was it the Nagios update.
Furthermore is there some documentation you can point me to that explains the difference between "Testing check from command line" from within Nagios and really testing from commandline. (see attached files)
I think that a feature like a testing method that works exactly the same as the actual execution in NagiosXI would be very much appreciated by everyone.
(I know i would!)
Thanks for helping me solve this problem!!
You do not have the required permissions to view the files attached to this post.
Re: check_files.pl failing after XI update from 2012 to 2014
Depends what XI version you upgraded from. Due to security vulns, we had to add a bit more escaping, etc to portions of XI. Also, if the plugin requires some deps that were updated, those deps may have changed the way they handle strings/escapes.detronict wrote:Can you please explain to me where the problem came from? Was it the OS updates, or was it the Nagios update.
Unfortunately not. The quick overview: Usually, plugins are run by the "nagios" user. When running a check from the UI trough the "test check command" feature, it is run as the use3r "apache". This is done for a few different reasons - the important reason was due to security. Allowing "nagios" to run an arbitrary command from the web ui is very dangerous due the number of rights the nagios user has. For this reason the test feature is limited to the apache user.detronict wrote:Furthermore is there some documentation you can point me to that explains the difference between "Testing check from command line" from within Nagios and really testing from commandline.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.