mail queue error

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
RubenLatorre
Posts: 20
Joined: Thu Feb 04, 2016 5:26 pm

mail queue error

Post 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
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: mail queue error

Post by hsmith »

Can you provide screenshots of the issue?
Former Nagios Employee.
me.
RubenLatorre
Posts: 20
Joined: Thu Feb 04, 2016 5:26 pm

Re: mail queue error

Post by RubenLatorre »

There are some screenshots, if you need anymore, tell me please.
Attachments
Captura2.PNG
Captura2.PNG (5.27 KiB) Viewed 3298 times
Captura1.PNG
Captura1.PNG (3.96 KiB) Viewed 3298 times
Captura.PNG
Captura.PNG (5.26 KiB) Viewed 3298 times
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: mail queue error

Post by hsmith »

What interface is that? Are you using just Nagios Core...?
Former Nagios Employee.
me.
RubenLatorre
Posts: 20
Joined: Thu Feb 04, 2016 5:26 pm

Re: mail queue error

Post 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.
Attachments
Captura6.PNG
Captura5.PNG
Captura4.PNG
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: mail queue error

Post 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.
Former Nagios Employee
RubenLatorre
Posts: 20
Joined: Thu Feb 04, 2016 5:26 pm

Re: mail queue error

Post by RubenLatorre »

That's the result...

Do you know if I must save the script with a .sh extension or with what extension?
Attachments
Captura7.PNG
Captura7.PNG (7.75 KiB) Viewed 3274 times
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: mail queue error

Post 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.
Former Nagios Employee
RubenLatorre
Posts: 20
Joined: Thu Feb 04, 2016 5:26 pm

Re: mail queue error

Post 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
}
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: mail queue error

Post 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
Former Nagios Employee
Locked