hi, I am trying to use check_mailq plugin for one of my postfix mail server(rhel7). The plugin is executing locally on the mail server but throwing error from Nagios XI GUI or Nagios Server . Please let me know what needs to be done to use it.
Please note nagios user has sudo rights on the VM.
[nagios-prod@oc-monitoring-prod libexec]$ ./check_mailq -w 20 -c 50
ERROR: is not executable by (uid 1000:gid(1000 1000))
Thanks in advance..
check_mailq plugin is not working
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_mailq plugin is not working
from the help for the plugin
You may not have appropriate permission on mailq
Code: Select all
This plugin uses the system mailq command (sendmail) or qmail-stat (qmail)
to look at the queues. Mailq can usually only be accessed by root or
a TrustedUser. You will have to set appropriate permissions for the plugin to work.Code: Select all
ls -l /usr/bin/mailqRe: check_mailq plugin is not working
hi ,
I do understand this is permission problem but I am not sure what needs to beset up . Could you help me in this.
lrwxrwxrwx. 1 root root 27 Oct 25 15:17 /usr/bin/mailq -> /etc/alternatives/mta-mailq
thanks..
I do understand this is permission problem but I am not sure what needs to beset up . Could you help me in this.
lrwxrwxrwx. 1 root root 27 Oct 25 15:17 /usr/bin/mailq -> /etc/alternatives/mta-mailq
thanks..
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_mailq plugin is not working
What are the permissions here
Code: Select all
ls -l /etc/alternatives/mta-mailqRe: check_mailq plugin is not working
hi,
lrwxrwxrwx. 1 root root 23 Oct 25 15:17 /etc/alternatives/mta-mailq -> /usr/bin/mailq.sendmail
lrwxrwxrwx. 1 root root 23 Oct 25 15:17 /etc/alternatives/mta-mailq -> /usr/bin/mailq.sendmail
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_mailq plugin is not working
and then
we need to follow the symlinks to the actual binary
Code: Select all
ls -l /usr/bin/mailq.sendmailRe: check_mailq plugin is not working
thanks ..this worked..
but I had to install NRPE agent on client machine and define below command in nrpe.cfg
command[check_mailq]=/usr/local/nagios/libexec/check_mailq -w 50 -c 100
This is also very useful link for future reference.
http://uppayinix.blogspot.com/2010/09/n ... iling.html
but I had to install NRPE agent on client machine and define below command in nrpe.cfg
command[check_mailq]=/usr/local/nagios/libexec/check_mailq -w 50 -c 100
This is also very useful link for future reference.
http://uppayinix.blogspot.com/2010/09/n ... iling.html
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_mailq plugin is not working
great glad you got it resolved!amit9876 wrote:thanks ..this worked..
but I had to install NRPE agent on client machine and define below command in nrpe.cfg
command[check_mailq]=/usr/local/nagios/libexec/check_mailq -w 50 -c 100
This is also very useful link for future reference.
http://uppayinix.blogspot.com/2010/09/n ... iling.html
Locking thread