Page 1 of 4

mail queue error

Posted: Fri Feb 05, 2016 1:30 pm
by RubenLatorre
Hi everyone, I have a nagios core 4.0.5 and my problem is that when I try to configure the mail queue service and I go to de monitoring web panel,

it always shows me than mail queue is empty, what is not true. It happens with an ubuntu, and a windows server 2012

Is there anybody that can help me with this problem?

Thanks

Re: mail queue error

Posted: Fri Feb 05, 2016 1:33 pm
by hsmith
Can you provide screenshots of the issue?

Re: mail queue error

Posted: Fri Feb 05, 2016 1:45 pm
by RubenLatorre
There are some screenshots, if you need anymore, tell me please.

Re: mail queue error

Posted: Fri Feb 05, 2016 1:46 pm
by hsmith
What interface is that? Are you using just Nagios Core...?

Re: mail queue error

Posted: Mon Feb 08, 2016 10:30 am
by RubenLatorre
These are three diferents screenshots, one is about the commands.cfg file, the other one is about the services.cnf and the other is about what I see on the web interface.

And here is another screenshot, to prove that the mail queue server is not empty.

And the O.S server is ubuntu 12.04.

I tried to write the local IP (192.168.9.110) instead of $HOSTADDRESS$ and the web interface apears also with the mail queue is empty message.

Re: mail queue error

Posted: Mon Feb 08, 2016 11:21 am
by rkennedy
What is the result if you run it over the command line?

If you are having issues, I did find another plugin that may work for you -
https://exchange.nagios.org/directory/P ... ue/details

With that one, it will need to be run on the remote machine using an agent.

Re: mail queue error

Posted: Mon Feb 08, 2016 12:17 pm
by RubenLatorre
That's the result...

Do you know if I must save the script with a .sh extension or with what extension?

Re: mail queue error

Posted: Mon Feb 08, 2016 12:38 pm
by rkennedy
The plugin check_mailq does not support checking a remote host, it's made to run on the remote machine. You will need to use a remote agent such as NRPE to execute this script on your remote machine.

Re: mail queue error

Posted: Mon Feb 08, 2016 1:07 pm
by RubenLatorre
Like that?

define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$
}

define service {
use generic-service,srv-pnp
host_name srvplesk2
service_description Cola SMTP
check_command check_nrpe!check_postfix_queue
}

Re: mail queue error

Posted: Mon Feb 08, 2016 1:25 pm
by rkennedy
The NRPE command will need an $ARG1$ value so that it can pass the check_postfix_queue command as well. This is how mine is defined -

Code: Select all

define command {
       command_name                             check_nrpe
       command_line                             $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
}
You will then need to define the 'check_postfix_queue' command in your NRPE configuration to execute /usr/local/nagios/libexec/check_mailq -w 100 -c 150 -M postfix