Page 3 of 5

Re: SSL and Email issues with nagios

Posted: Tue Nov 19, 2013 5:45 pm
by abrist
How are the nagios macros handed off in the script? To me, it looks like it needs environment variables on to work correctly. Is the following directive set to '1' (enable_environment_variables=)?

Code: Select all

grep env /usr/local/nagios/etc/nagios.cfg
If not, change it to '1' and then restart nagios.

Re: SSL and Email issues with nagios

Posted: Tue Nov 19, 2013 5:47 pm
by vivithemage
I did set the environment variables to 1, the other script required that as well.

enable_environment_macros=1

Re: SSL and Email issues with nagios

Posted: Wed Nov 20, 2013 10:30 am
by abrist
Any errors in /var/log/messages after you attempt to run the script from Nagios? (as it requires environment variables, you cannot really test it from the cli)

Re: SSL and Email issues with nagios

Posted: Wed Nov 20, 2013 10:42 am
by vivithemage
I can check, but now I am seeing these in the nagios.log:

Code: Select all

[1384962008] wproc:   early_timeout=0; exited_ok=1; wait_status=512; error_code=0;
[1384962008] wproc:   stderr line 01: Can't locate Mail/Sendmail.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /usr/local/nagios/bin/nagios_send_service_mail.pl line 34.
[1384962008] wproc:   stderr line 02: BEGIN failed--compilation aborted at /usr/local/nagios/bin/nagios_send_service_mail.pl line 34.

the only cpan install that gave me gripe was RRDtool:OO but that is only needed if you use the graphs, which I was not planning to. The sendmail perl module installed fine from the looks of it.

This also seems to show up in /var/log/messages too.

Re: SSL and Email issues with nagios

Posted: Wed Nov 20, 2013 10:55 am
by abrist
Is "nagios_send_service_mail.pl" another custom script?

Re: SSL and Email issues with nagios

Posted: Wed Nov 20, 2013 11:11 am
by vivithemage

Re: SSL and Email issues with nagios

Posted: Wed Nov 20, 2013 5:57 pm
by abrist
I will have to take a closer look at this script. Catch you tomorrow.

Re: SSL and Email issues with nagios

Posted: Wed Nov 20, 2013 6:01 pm
by vivithemage
Thanks a lot!

Re: SSL and Email issues with nagios

Posted: Thu Nov 21, 2013 1:39 pm
by abrist
There are a couple versions of that script on the website - which one are you using?

Re: SSL and Email issues with nagios

Posted: Thu Nov 21, 2013 3:44 pm
by vivithemage
The latest one, haha.