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?
Ta, IR. From: icinga-users <icinga-users-boun...@lists.icinga.org> On Behalf Of Odermatt Nicolas Sent: 25 July 2018 14:11 To: icinga-users@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@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@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@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", "--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-i...@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! [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.
_______________________________________________ icinga-users mailing list icinga-users@lists.icinga.org https://lists.icinga.org/mailman/listinfo/icinga-users