Hi!
This is the first time I'm setting up Nagios but i can't get notifications working.
I get the following error in nagios log:
[Mon Aug 25 13:28:47 2014] SERVICE NOTIFICATION: nagiosadmin;srv0102vg;C:\ Drive Space;WARNING;notify-service-by-email;c:\ - total: 464,63 Gb - used: 385,00 Gb (83%) - free 79,63 Gb (17%)
[Mon Aug 25 13:28:47 2014] wproc: NOTIFY job 94 from worker Core Worker 31846 is a non-check helper but exited with return code 127
[Mon Aug 25 13:28:47 2014] wproc: host=srv0102vg; service=C:\ Drive Space; contact=nagiosadmin
[Mon Aug 25 13:28:47 2014] wproc: early_timeout=0; exited_ok=1; wait_status=32512; error_code=0;
[Mon Aug 25 13:28:47 2014] wproc: stderr line 01: /bin/sh: 1: /usr/bin/sendmail: not found
[Mon Aug 25 13:28:47 2014] wproc: stderr line 02: /usr/bin/printf: íráshiba: Broken pipe
What is wrong?
Thanks!
Daniel
Nagios not sending e-mail notification
Re: Nagios not sending e-mail notification
Ok i found it.
The sendmail is in /usr/sbin
Now I'm getting permission error:
[Mon Aug 25 15:24:30 2014] SERVICE NOTIFICATION: nagiosadmin;7120_baross;Yellow toner;WARNING;notify-service-by-email;Toner Warning - Yellow ink available: 7%
[Mon Aug 25 15:24:31 2014] wproc: NOTIFY job 6 from worker Core Worker 8516 is a non-check helper but exited with return code 78
[Mon Aug 25 15:24:31 2014] wproc: host=7120_baross; service=Yellow toner; contact=nagiosadmin
[Mon Aug 25 15:24:31 2014] wproc: early_timeout=0; exited_ok=1; wait_status=19968; error_code=0;
[Mon Aug 25 15:24:31 2014] wproc: stderr line 01: Program mode requires special privileges, e.g., root or TrustedUser.
[Mon Aug 25 15:24:31 2014] wproc: stdout line 01: WARNING: RunAsUser for MSP ignored, check group ids (egid=1001, want=127)
[Mon Aug 25 15:24:31 2014] wproc: stdout line 02: can not chdir(/var/spool/mqueue-client/): Permission denied
[Mon Aug 25 15:24:40 2014] SERVICE ALERT: srv0102vg;Total commander;CRITICAL;SOFT;5;TOTALCMD64.exe: not running
The sendmail is in /usr/sbin
Now I'm getting permission error:
[Mon Aug 25 15:24:30 2014] SERVICE NOTIFICATION: nagiosadmin;7120_baross;Yellow toner;WARNING;notify-service-by-email;Toner Warning - Yellow ink available: 7%
[Mon Aug 25 15:24:31 2014] wproc: NOTIFY job 6 from worker Core Worker 8516 is a non-check helper but exited with return code 78
[Mon Aug 25 15:24:31 2014] wproc: host=7120_baross; service=Yellow toner; contact=nagiosadmin
[Mon Aug 25 15:24:31 2014] wproc: early_timeout=0; exited_ok=1; wait_status=19968; error_code=0;
[Mon Aug 25 15:24:31 2014] wproc: stderr line 01: Program mode requires special privileges, e.g., root or TrustedUser.
[Mon Aug 25 15:24:31 2014] wproc: stdout line 01: WARNING: RunAsUser for MSP ignored, check group ids (egid=1001, want=127)
[Mon Aug 25 15:24:31 2014] wproc: stdout line 02: can not chdir(/var/spool/mqueue-client/): Permission denied
[Mon Aug 25 15:24:40 2014] SERVICE ALERT: srv0102vg;Total commander;CRITICAL;SOFT;5;TOTALCMD64.exe: not running
Re: Nagios not sending e-mail notification
Can you run the following commands and show us the output?
Code: Select all
ls -l /usr/sbin/sendmail
ls -l /var/spoolBe sure to check out our Knowledgebase for helpful articles and solutions!
-
Mapienator
- Posts: 17
- Joined: Thu Mar 26, 2015 10:09 am
Re: Nagios not sending e-mail notification
lmiltchev wrote:Can you run the following commands and show us the output?
Code: Select all
ls -l /usr/sbin/sendmail ls -l /var/spool
I also have this problem.
Code: Select all
root@nagios:/usr/local/nagios/etc# ls -l /usr/sbin/sendmail
lrwxrwxrwx 1 root root 26 jun 1 12:18 /usr/sbin/sendmail -> /etc/alternatives/sendmail
root@nagios:/usr/local/nagios/etc# ls -l /var/spool
total 40
drwxr-xr-x 2 root root 4096 mrt 23 13:58 anacron
drwxr-xr-x 3 root root 4096 jul 22 2014 cron
drwx--x--- 3 root lp 4096 jul 23 2014 cups
drwxr-xr-x 3 root root 4096 jul 23 2014 libreoffice
drwxr-xr-x 2 root root 4096 mrt 29 2014 lintian
lrwxrwxrwx 1 root root 7 mrt 23 13:41 mail -> ../mail
drwxr-s--- 2 smmta smmsp 4096 jun 1 13:42 mqueue
drwxrws--- 2 smmsp smmsp 4096 jun 1 13:42 mqueue-client
drwxr-xr-x 2 root root 4096 apr 11 2014 plymouth
drwx------ 2 syslog adm 4096 dec 4 2013 rsyslog
drwxrwxrwt 2 root root 4096 feb 23 16:55 samba
Re: Nagios not sending e-mail notification
homerkaro, Mapienator,
What distributions are you using?
Let's take a look at your users and groups, respectively:
Which user is sendmail running as?
What distributions are you using?
Code: Select all
cat /etc/*release
uname -aYou are right in thinking that this is likely a permission error. Do you have selinux/apparmor on?[Mon Aug 25 15:24:31 2014] wproc: stdout line 02: can not chdir(/var/spool/mqueue-client/): Permission denied
Let's take a look at your users and groups, respectively:
Code: Select all
cat /etc/passwd
cat /etc/group-
Mapienator
- Posts: 17
- Joined: Thu Mar 26, 2015 10:09 am
Re: Nagios not sending e-mail notification
jolson wrote:homerkaro, Mapienator,
What distributions are you using?Code: Select all
cat /etc/*release uname -aYou are right in thinking that this is likely a permission error. Do you have selinux/apparmor on?[Mon Aug 25 15:24:31 2014] wproc: stdout line 02: can not chdir(/var/spool/mqueue-client/): Permission denied
Let's take a look at your users and groups, respectively:Which user is sendmail running as?Code: Select all
cat /etc/passwd cat /etc/group
I Found my problem already. Te home dir and the permissions on the Nagios user where corrupt for some reason. I just corrected that and rebooted the system. Works like a charm.
Still thanks!
Re: Nagios not sending e-mail notification
No problem.
homerkaro, let us know if you are still having troubles. Thanks!
homerkaro, let us know if you are still having troubles. Thanks!