Page 2 of 4
Re: mail queue error
Posted: Tue Feb 09, 2016 12:02 pm
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.
Re: mail queue error
Posted: Tue Feb 09, 2016 12:04 pm
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?
Re: mail queue error
Posted: Tue Feb 09, 2016 12:08 pm
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
Re: mail queue error
Posted: Tue Feb 09, 2016 12:46 pm
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.
Re: mail queue error
Posted: Tue Feb 09, 2016 12:59 pm
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
Re: mail queue error
Posted: Tue Feb 09, 2016 2:39 pm
by rkennedy
What is in the folder above? This looks like the sample config folder.
Re: mail queue error
Posted: Wed Feb 10, 2016 10:29 am
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
Re: mail queue error
Posted: Wed Feb 10, 2016 11:07 am
by rkennedy
Those are the sample files, not the actual configuration. That is why I asked what is in the directory above.
Re: mail queue error
Posted: Wed Feb 10, 2016 11:24 am
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
Re: mail queue error
Posted: Wed Feb 10, 2016 11:32 am
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