Closed Einaudij closed 7 years ago
Hi Johnny,
Please set the configuration option enable_environment_macros=1 in [nagios_home]/etc/nagios.cfg, and restart Nagios. This should set the gobal variable data needed for the script. There is also some additional info for troubleshooting:
http://nagios.fm4dd.com/howto/manual/pnp4n_send_service_mail.htm http://nagios.fm4dd.com/howto/manual/nagios_send_service_mail.htm
I hope this resolves your problem. Best wishes!
Frank
Einaudij mailto:notifications@github.com Tuesday, April 05, 2016 11:32 PM
Hello,
based on Naemonbox installed on a debian 8.3 (https://github.com/mgadi/naemonbox)
I try to use pnp4n_send_service_mail.pl, but I have an error message (exited with exit code 255) in the logs of naemon:
To debug notifications, there is no problem:
debug_notification https://cloud.githubusercontent.com/assets/18211152/14284804/66ad14ba-fb49-11e5-984f-d9feba1bc347.png
If I execute this command : /usr/bin/printf "%b" "message de test Naemon" | /usr/bin/mail -s "test envoi de mail" johnny.einaudi@sonaca.com mailto:johnny.einaudi@sonaca.com --> I get the good email
And if I run the other command : /usr/lib/naemon/plugins/pnp4nagios_send_service_mail.pl -v -t -r johnny.einaudi@sonaca.com mailto:johnny.einaudi@sonaca.com -f graph -u -l en --> I have no problem, and I get out the test email.
It looks like he can not recover Naemon Global variables:
Can you help me ?
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/fm4dd/nagios4dd/issues/2
Sent with Postbox http://www.getpostbox.com
Hello,
based on Naemonbox installed on a debian 8.3 (https://github.com/mgadi/naemonbox)
I try to use pnp4n_send_service_mail.pl, but I have an error message (exited with exit code 255) in the logs of naemon:
To debug notifications, there is no problem:
If I execute this command : /usr/bin/printf "%b" "message de test Naemon" | /usr/bin/mail -s "test envoi de mail" johnny.einaudi@sonaca.com --> I get the good email
And if I run the other command : /usr/lib/naemon/plugins/pnp4nagios_send_service_mail.pl -v -t -r johnny.einaudi@sonaca.com -f graph -u -l en --> I have no problem, and I get out the test email.
It looks like he can not recover Naemon Global variables:
Can you help me ?