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.
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.
[1385068794] wproc: stderr line 01: Can't locate RRDs.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 38.
[1385068794] wproc: stderr line 02: BEGIN failed--compilation aborted at /usr/local/nagios/bin/nagios_send_service_mail.pl line 38.
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.
[root@vmmgmtappnagios var]# yum install perl-RRD-Simple
Loaded plugins: security
Setting up Install Process
No package perl-RRD-Simple available.
Nothing to do
[root@vmmgmtappnagios var]#
the rest worked fine though.
and now getting:
[1385072067] wproc: NOTIFY job 8 from worker Core Worker 19087 is a non-check helper but exited with return code 255
[1385072067] wproc: command: /usr/local/nagios/bin/nagios_send_host_mail.pl -c "" -f html -u
[1385072067] wproc: host=client315_node02; service=(none); contact=nagiosadmin
[1385072067] wproc: early_timeout=0; exited_ok=1; wait_status=65280; error_code=0;
[1385072067] wproc: stdout line 01: Error: no recipients have been provided
[1385072067] wproc: stdout line 02: Usage: /usr/local/nagios/bin/nagios_send_host_mail.pl [-v] [-V] [-h] [-t] [-H <SMTP host>] [-p <customername>]
[1385072067] wproc: stdout line 03: [-r <to_recipients>] or -g <to_group>] [-c <cc_recipients>] [-b <bcc_recipients>]
[1385072067] wproc: stdout line 04: [-f <text|html|multi|graph>] [-u] [-l <en|jp|fr|de>(or other languages if added]
[1385072091] SERVICE NOTIFICATION: nagiosadmin;localhost;Current Load;CRITICAL;notify-service-by-email;(No output on stdout) stderr:
[1385072094] wproc: NOTIFY job 56 from worker Core Worker 19087 is a non-check helper but exited with return code 255
[1385072094] wproc: command: /usr/local/nagios/bin/nagios_send_service_mail.pl -c "" -f html -u
[1385072094] wproc: host=localhost; service=Current Load; contact=nagiosadmin
[1385072094] wproc: early_timeout=0; exited_ok=1; wait_status=65280; error_code=0;
It looks like the first script (/usr/local/nagios/bin/nagios_mail.php) is not handing off any of the macro values to the second script (/usr/local/nagios/bin/nagios_send_host_mail.pl).
Did you ever verify if the first script was able to use the env vars?
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.
You could add some debug output to the first file to check if it is getting the env vars. As it is php, I would suggest using "put_file_contents" (http://us2.php.net/file_put_contents).
Have it dump some of the php vars that were loaded from the env vars to a file in /tmp.
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.
okay, so I am going to skip that mail script and go back to the old one, as the format looks better. To start debugging it ... I was able to send a test email no problem generated by the script, but it seems like nagios cannot send any on its own.
I see one message in my /var/log/maillog and it was the only successful attempt that I sent via my test command line. I don't see any errors in nagios.log when the script is trying to execute...so I am not sure what other log files I can look at to narrow down where the problem is.
Can you post the command definition that is configured for this script please? Does this have read and execute permission for the nagios user and group? Where is it located on your file system? Can you su to the nagios user and execute by hand or does that also give an issue?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.