Check_Eximailqueue query returned no output!

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Re: Check_Eximailqueue query returned no output!

Postby rlinux57 » Mon Feb 29, 2016 2:49 pm

In my case i.e "/usr/sbin/exim" , i have already set that path in script.
rlinux57
 
Posts: 291
Joined: Mon Dec 08, 2014 12:03 am

Re: Check_Eximailqueue query returned no output!

Postby ssax » Mon Feb 29, 2016 2:52 pm

Ok, let's check sudoers and make sure it's a valid configuration:

Code: Select all
sudo -v
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 2902
Joined: Wed Feb 11, 2015 12:54 pm

Re: Check_Eximailqueue query returned no output!

Postby rlinux57 » Mon Feb 29, 2016 2:53 pm

Getting no output.
rlinux57
 
Posts: 291
Joined: Mon Dec 08, 2014 12:03 am

Re: Check_Eximailqueue query returned no output!

Postby ssax » Mon Feb 29, 2016 2:55 pm

Ah, I think I see, change your /etc/sudoers entry from this:

Code: Select all
nagios          ALL=NOPASSWD:/usr/sbin/exim


To this:

Code: Select all
nagios          ALL=(ALL) NOPASSWD:/usr/sbin/exim


It's because it's trying to sudo -u (run it as a different user).
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 2902
Joined: Wed Feb 11, 2015 12:54 pm

Re: Check_Eximailqueue query returned no output!

Postby rlinux57 » Mon Feb 29, 2016 3:01 pm

I have change it as per your direction but no effect.

Moreover i have using xinetd on client machine:
Code: Select all
cat /etc/xinetd.d/nrpe
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
        flags           = REUSE
        socket_type     = stream
        port            = 5666
        wait            = no
        user            = nagios
        group           = nagios
        server          = /usr/sbin/nrpe
        server_args     = -c /etc/nagios/nrpe.cfg --inetd
        log_on_failure  += USERID
        disable         = no
        only_from       = NMS IP Address
}


I have also restart both services nrpe and xinetd after any change.
rlinux57
 
Posts: 291
Joined: Mon Dec 08, 2014 12:03 am

Re: Check_Eximailqueue query returned no output!

Postby ssax » Mon Feb 29, 2016 3:15 pm

Try running these commands on the remote server and see what the output gives you:

Code: Select all
su - nagios
/usr/bin/sudo -u root /usr/sbin/exim -bpc


Essentially, what it does is it runs that command and puts the output into a variable, it then checks the variable to see if the output is NULL and if it is it throws the error you are seeing.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 2902
Joined: Wed Feb 11, 2015 12:54 pm

Re: Check_Eximailqueue query returned no output!

Postby rlinux57 » Mon Feb 29, 2016 11:38 pm

Code: Select all
root@server [~]# su - nagios
Last login: Mon Feb 29 20:36:43 CET 2016 on pts/0
This account is currently not available.
root@server [~]# cat /etc/passwd | grep nagios
nagios:x:988:984::/var/spool/nagios:/sbin/nologin



Code: Select all
root@server [/usr/lib64/nagios/plugins]# sudo -u nagios exim -bpc
exim: permission denied
rlinux57
 
Posts: 291
Joined: Mon Dec 08, 2014 12:03 am

Re: Check_Eximailqueue query returned no output!

Postby ssax » Tue Mar 01, 2016 10:57 am

What is the output of this:

Code: Select all
chage -l nagios


Thank you
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 2902
Joined: Wed Feb 11, 2015 12:54 pm

Re: Check_Eximailqueue query returned no output!

Postby rlinux57 » Wed Mar 02, 2016 11:28 pm

Code: Select all
chage -l nagios
Last password change               : Feb 24, 2016
Password expires               : never
Password inactive               : never
Account expires                  : never
Minimum number of days between password change      : -1
Maximum number of days between password change      : -1
Number of days of warning before password expires   : -1
rlinux57
 
Posts: 291
Joined: Mon Dec 08, 2014 12:03 am

Re: Check_Eximailqueue query returned no output!

Postby ssax » Thu Mar 03, 2016 10:23 am

Can you try changing your /etc/passwd for nagios to:
- Note: You may need to change /bin/bash to whatver the location is of the executable.

Code: Select all
nagios:x:988:984::/var/spool/nagios:/bin/bash
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 2902
Joined: Wed Feb 11, 2015 12:54 pm

PreviousNext

Return to Nagios Core

Who is online

Users browsing this forum: Bing [Bot] and 10 guests