Hi,
Still wont work and now i've got this error :
# /usr/lib/nagios/plugins/check_nrpe -H server45026x -c check_eximailqueue
Mailqueue WARNING - query returned no output!
Any solution for this ?
Thanks
Cant show exim queue
Re: Cant show exim queue
There are a few troubleshooting procedures that I picked up from the exim plugin page: http://exchange.nagios.org/directory/Pl ... ue/details
You will also need to add the following to the /etc/sudoers file: "nagios ALL=NOPASSWD:/usr/local/exim/bin/exim"
When using with NRPE you need to comment out the Defaults requiretty line in the sudoers file.
Have you already gone through these procedures? Please read the page that I have linked above, it could be very useful. Thank you!I commented out the EXIM= line:
# default hard-coded # EXIM=/usr/local/exim/bin/exim
and replaced it with one that checks the location of exim:
EXIM=$(which exim)
and now the script works
Re: Cant show exim queue
still not work and now have a different error
any idea ?
Code: Select all
usr/lib/nagios/plugins/check_nrpe -H server45026x -c check_eximailqueue
NRPE: Unable to read output
-
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Cant show exim queue
I suggest you change user nagios shell from nologin to bash in /etc/passwd, su to nagios and try to run the command to see if there is any more terse output there. There almost definitely will be.
When done you should remember to replace bash with nologin for security reasons.
When done you should remember to replace bash with nologin for security reasons.
Re: Cant show exim queue
Did you change the shell, as I said?
eloyd wrote:Nagios user on remote host needs a valid login shell, not disabled:nagios496:497::/var/spool/nagios:/sbin/nologin
Re: Cant show exim queue
i was desperate and now i'm creating my own bash scripts for monitor exim queue, but why still happening this :
But if im using the simple ssh commandline it was running just fine
Fyi server that act as monitoring are using debian squeeze, and the guest server are using centos 6.x,.
Any idea why this issue can't fix until now ?
Thanks
Code: Select all
# /usr/lib/nagios/plugins/check_nrpe -H serverxxx -c exim_queue
NRPE: Unable to read output
Code: Select all
ssh -i .ssh/id_dsa root@serverxxx /usr/lib64/nagios/plugins/eximqueue.sh 2>&1
stdin: is not a tty
OK - 12 of queue email
Any idea why this issue can't fix until now ?
Thanks
Re: Cant show exim queue
This problem has been fixed by editing my scripts and locate the path of sudo inside the scripts
Thanks all.
Code: Select all
SUDO=/usr/bin/sudo
exim_queue=`$SUDO -u root exim -bpc`
Code: Select all
~# /usr/lib/nagios/plugins/check_nrpe -H serverxxx -c exim_queue
OK - 14 of queue email