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 »

rkennedy wrote: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

It is complied because I'm monitorig the check_total_procs service with check_nrpe of this remote host
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: mail queue error

Post by rkennedy »

Check out this configuration file, can you post it for us to review?

Code: Select all

/usr/local/nagios/etc/nrpe.cfg
Former Nagios Employee
RubenLatorre
Posts: 20
Joined: Thu Feb 04, 2016 5:26 pm

Re: mail queue error

Post by RubenLatorre »

rkennedy wrote:Check out this configuration file, can you post it for us to review?

Code: Select all

/usr/local/nagios/etc/nrpe.cfg
There are the two nrpe.cnf files, the nrpe.cfg nagios host and the nrpe.cfg remote host.
Attachments
nrperemotehost.cfg
(7.88 KiB) Downloaded 270 times
nrpenagioshost.cfg
(7.9 KiB) Downloaded 276 times
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: mail queue error

Post by rkennedy »

Are you running NRPE standalone, or through xinetd?

Were those files found on the Nagios machine, or the client machine?

The command that needs to be added to the proper config file is -

Code: Select all

command[check_mailq]=/usr/local/nagios/libexec/check_mailq -w 15 -c 20
Former Nagios Employee
RubenLatorre
Posts: 20
Joined: Thu Feb 04, 2016 5:26 pm

Re: mail queue error

Post by RubenLatorre »

rkennedy wrote:Are you running NRPE standalone, or through xinetd?

Were those files found on the Nagios machine, or the client machine?

The command that needs to be added to the proper config file is -

Code: Select all

command[check_mailq]=/usr/local/nagios/libexec/check_mailq -w 15 -c 20
In nagios machine I have two files about nrpe, the first one is on the /usr/local/nagios/etc/nrpe.cfg.

And the second one is on /etc/xinetd.d/nrpe, and the contain of that file is what I have puted on the screenshot.
Attachments
Captura9.PNG
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: mail queue error

Post by rkennedy »

This is getting a bit confusing, the only one we need to modify at this point is the remote (client machine) one.

Please post the output of these two commands -

Code: Select all

cat /usr/local/nagios/etc/nrpe.cfg
cat /etc/xinetd.d/nrpe
Former Nagios Employee
RubenLatorre
Posts: 20
Joined: Thu Feb 04, 2016 5:26 pm

Re: mail queue error

Post by RubenLatorre »

rkennedy wrote:This is getting a bit confusing, the only one we need to modify at this point is the remote (client machine) one.

Please post the output of these two commands -

Code: Select all

cat /usr/local/nagios/etc/nrpe.cfg
cat /etc/xinetd.d/nrpe
I have modified the /usr/local/nagios/etc/nrpe.cfg file, in which I have defined the check_mailq command and I have allowed the nagios host ip.

In the /etc/xinetd.d/nrpe, What I have to modify? Only to add the nagios ip host, in this case "192.168.0.4" I attach a screenshot with the content of the file.

When I finish of modify that file, Have I to do a "service nrpe restart"?
Attachments
Captura10.PNG
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: mail queue error

Post by jolson »

When I finish of modify that file, Have I to do a "service nrpe restart"?
You may have to restart xinetd to get the new configuration to apply. Give the following a try:

Code: Select all

service xinetd restart
Also, I'm interested in the following:

Code: Select all

grep nrpe /etc/services
ps -ef | egrep "xinetd|nrpe"
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
RubenLatorre
Posts: 20
Joined: Thu Feb 04, 2016 5:26 pm

Re: mail queue error

Post by RubenLatorre »

jolson wrote:
When I finish of modify that file, Have I to do a "service nrpe restart"?
You may have to restart xinetd to get the new configuration to apply. Give the following a try:

Code: Select all

service xinetd restart
Also, I'm interested in the following:

Code: Select all

grep nrpe /etc/services
ps -ef | egrep "xinetd|nrpe"
Attachments
Captura12.PNG
Captura12.PNG (7.5 KiB) Viewed 2269 times
Captura11.PNG
Captura11.PNG (5.81 KiB) Viewed 2276 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 »

That looks all right.
jolson wrote:You may have to restart xinetd to get the new configuration to apply.
After you did this step, did the problem get resolved?
Former Nagios Employee.
me.
Locked