SSL and Email issues with nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: SSL and Email issues with nagios

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: SSL and Email issues with nagios

Post by vivithemage »

I did set the environment variables to 1, the other script required that as well.

enable_environment_macros=1
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: SSL and Email issues with nagios

Post 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)
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: SSL and Email issues with nagios

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: SSL and Email issues with nagios

Post by abrist »

Is "nagios_send_service_mail.pl" another custom script?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: SSL and Email issues with nagios

Post by vivithemage »

abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: SSL and Email issues with nagios

Post by abrist »

I will have to take a closer look at this script. Catch you tomorrow.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: SSL and Email issues with nagios

Post by vivithemage »

Thanks a lot!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: SSL and Email issues with nagios

Post by abrist »

There are a couple versions of that script on the website - which one are you using?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: SSL and Email issues with nagios

Post by vivithemage »

The latest one, haha.
Locked