fm4dd / nagios4dd

Collection of scripts and plugins for the open source monitoring system Nagios.
http://nagios.fm4dd.com
20 stars 13 forks source link

Notification --> exited with exit code 255 #2

Closed Einaudij closed 7 years ago

Einaudij commented 8 years ago

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:

image

To debug notifications, there is no problem:

debug_notification

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.

image

It looks like he can not recover Naemon Global variables:

image

Can you help me ?

fm4dd commented 8 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:

image https://cloud.githubusercontent.com/assets/18211152/14284731/199c14be-fb49-11e5-9d10-07e9556e6f6b.png

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.

image https://cloud.githubusercontent.com/assets/18211152/14285031/47a12614-fb4a-11e5-8a2f-7e351962a5ed.png

It looks like he can not recover Naemon Global variables:

image https://cloud.githubusercontent.com/assets/18211152/14285268/209a61a6-fb4b-11e5-904a-dfbfb6c303f8.png

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