[icinga-users] Custom plugin Countdownto reports WARNING

Ian Rarity Ian.Rarity at espc.com
Wed Jul 25 15:58:14 CEST 2018

Hi Nic,

>From the "local execution" part in your email, it looks like you're running the command as root; what happens if you run it as the user that Icinga uses instead?


From: icinga-users <icinga-users-bounces at lists.icinga.org> On Behalf Of Odermatt Nicolas
Sent: 25 July 2018 14:11
To: icinga-users at lists.icinga.org
Subject: [icinga-users] Custom plugin Countdownto reports WARNING

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:image001.png at 01D42427.E85A8D40]

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",

Has anyone an idea what I'm missing?



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

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>
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>
Nagios Exchange - The official site for hundreds of community-contributed Nagios plugins, addons, extensions, enhancements, and more!

[http://assets.espc.com/sig/SHA_Finalist.png] [http://assets.espc.com/sig/SLA.png]
Private and Confidential: This e-mail transmission is strictly confidential and intended solely for the addressee. It may contain privileged and confidential information and if you are not the intended recipient, you must not copy, disclose, distribute or take any action in reliance on it. If you have received this e-mail in error, please delete it and notify our E-mail Systems Administrator on +44 (0) 131 624 8000. ESPC (UK) Ltd does not accept any liability for any harm that may be caused to the recipient's system or data by this message or any attachment.
ESPC (UK) Ltd is a company registered under the Companies Acts in Scotland (Registered Number SC203585), and having its registered office at 90A George Street, Edinburgh, Midlothian EH2 3DF.
ESPC (UK) Ltd is an Appointed Representative of Lyncombe Consultants Ltd which is authorised and regulated by the Financial Conduct Authority.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.icinga.org/pipermail/icinga-users/attachments/20180725/facb43a8/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 21199 bytes
Desc: image001.png
URL: <http://lists.icinga.org/pipermail/icinga-users/attachments/20180725/facb43a8/attachment-0001.png>

More information about the icinga-users mailing list