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

Re: mail queue error

Post by RubenLatorre »

Ok I have done that:

1st) I have gone to nrpe.cfg file and I add the remote host ip on the part of allowed_hosts.

2nd) I have defined the check_mailq command on the nrpe.cfg file.

3rd) I have definded the command nrpe, on the commands.cfg.

4th) I have defined de service, on the services.cfg file.

5th) I have done a service nagios restart.

And finaly on my web monitoring interface says to me, that the command is not definded.
Attachments
Captura3.PNG
Captura3.PNG (7.44 KiB) Viewed 2053 times
Captura1.PNG
Captura.PNG
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: mail queue error

Post by rkennedy »

To clarify, what server did you add the command[check_mailq]= part (the part you highlighted)?

If it was on the client machine, did you restart the NRPE / xinetd service?
Former Nagios Employee
RubenLatorre
Posts: 20
Joined: Thu Feb 04, 2016 5:26 pm

Re: mail queue error

Post by RubenLatorre »

rkennedy wrote:To clarify, what server did you add the command[check_mailq]= part (the part you highlighted)?

If it was on the client machine, did you restart the NRPE / xinetd service?

I put that on the nagios host, Have I put it on the remote host I want to monitor?

The thing is that if I log me on the remote server via putty, and y put the mailq command on the command line, it returns me the correct information, but I want to see that information on the nagios web interface
Attachments
Captura5.PNG
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: mail queue error

Post by rkennedy »

RubenLatorre wrote:
rkennedy wrote:To clarify, what server did you add the command[check_mailq]= part (the part you highlighted)?

If it was on the client machine, did you restart the NRPE / xinetd service?

I put that on the nagios host, Have I put it on the remote host I want to monitor?

The thing is that if I log me on the remote server via putty, and y put the mailq command on the command line, it returns me the correct information, but I want to see that information on the nagios web interface
Yes, put it on the remote host you'd like to monitor. Then restart the NRPE / xinetd service.

What will then happen is Nagios will call the check_mailq command on your client machine, then the client machine will execute the check_mailq plugin and send the data back to the Nagios server.
Former Nagios Employee
RubenLatorre
Posts: 20
Joined: Thu Feb 04, 2016 5:26 pm

Re: mail queue error

Post by RubenLatorre »

Have I to put it only on the nrpe.cfg host remote file or in someone else?

Because there are other files about nrpe
Attachments
Captura6.PNG
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: mail queue error

Post by rkennedy »

What is in the folder above? This looks like the sample config folder.
Former Nagios Employee
RubenLatorre
Posts: 20
Joined: Thu Feb 04, 2016 5:26 pm

Re: mail queue error

Post by RubenLatorre »

rkennedy wrote:What is in the folder above? This looks like the sample config folder.
On the second file for example, there is a part that seems like that
Attachments
Captura7.PNG
Captura7.PNG (11.44 KiB) Viewed 2032 times
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: mail queue error

Post by rkennedy »

Those are the sample files, not the actual configuration. That is why I asked what is in the directory above.
Former Nagios Employee
RubenLatorre
Posts: 20
Joined: Thu Feb 04, 2016 5:26 pm

Re: mail queue error

Post by RubenLatorre »

rkennedy wrote:Those are the sample files, not the actual configuration. That is why I asked what is in the directory above.
The directory above is this, and I was on the yellow directory
Attachments
Captura8.PNG
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: mail queue error

Post by rkennedy »

It doesn't look like NRPE is compiled - did you compile it yet?

Here's a document that explains how to configure / compile NRPE -
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Former Nagios Employee
Locked