[icinga-users] Custom plugin Countdownto reports WARNING

Odermatt Nicolas nicolas.odermatt at fhnw.ch
Wed Jul 25 15:11:13 CEST 2018


Hi guys


I'm having trouble installing the plugin countdown_to [0] in Icinga2 with Icingaweb2 and Icingadirector.


The thing is that local execution works:

root at server1100:/tmp# /usr/lib/nagios/plugins/countdown_to_date.php --date 2013-02-11 --warning 60 --critical 30
CRITICAL: 1990 days have past since 2013-02-11


And that Permissions are properly (according to the other plugins):

root at server1100:/tmp# ls -la /usr/lib/nagios/plugins/ | grep count
-rwxrwx--x 1 root root 48139 Jul 25 12:44 countdown_to_date.php


But I get the following error message in the GUI:

[cid:087dfd6f-27f7-4c7f-977e-d7cf77165fdf]


I tried to remove the "-q" option from line 1 from the script, like was suggested on stackoverflow [1] but that didn't work.


Here's the command definition also:

object CheckCommand "Countdown" {
   import "plugin-check-command"
   command = [
       PluginDir + "/countdown_to_date.php",
       "--date",
       "2013-02-11",
       "--warning",
       "60",
       "--critical",
       "30"
   ]
}



Has anyone an idea what I'm missing?


Cheers,

Nic


PS: I know that the date I'm passing doesn't make a lot of sense, but its a POC at the moment ;-)


[0] https://exchange.nagios.org/directory/Plugins/Others/countdown_to_date/details

[1] https://stackoverflow.com/questions/4567688/problems-with-a-php-shell-script-could-not-open-input-file

[https://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon@2.png?v=73d79a89bded]<https://stackoverflow.com/questions/4567688/problems-with-a-php-shell-script-could-not-open-input-file>

bash - Problems with a PHP shell script: "Could not open input file" - Stack Overflow<https://stackoverflow.com/questions/4567688/problems-with-a-php-shell-script-could-not-open-input-file>
stackoverflow.com
Ok, I am trying to create an email logger, that uses a PHP shell script. I have set up CPanel to pipe emails to my script. I am sure this is all configured properly. However I am having problems wi...


countdown_to_date - Nagios Exchange<https://exchange.nagios.org/directory/Plugins/Others/countdown_to_date/details>
exchange.nagios.org
Nagios Exchange - The official site for hundreds of community-contributed Nagios plugins, addons, extensions, enhancements, and more!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.icinga.org/pipermail/icinga-users/attachments/20180725/91ea6d67/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 21199 bytes
Desc: pastedImage.png
URL: <http://lists.icinga.org/pipermail/icinga-users/attachments/20180725/91ea6d67/attachment-0001.png>


More information about the icinga-users mailing list