Installing NRPE
Installing NRPE
I installed CentOS 6.5 and the NRPE agent on an old laptop for testing. I ran the NRPE monitoring wizard, but except for ping, all the services error with connection refused.
I got the right IP entered during the agent install, however, when I looked in nrpe.cfg the only allowed host was 127.0.0.1. I added a second line allowed hosts=xxx.xxx.xxx.xxx, but I'm thinking I should have just added a space and the ip on the same line. I get a little nervous editing these config files so I thought I would stop and ask and the pros before I go any further.
Mahalo
I got the right IP entered during the agent install, however, when I looked in nrpe.cfg the only allowed host was 127.0.0.1. I added a second line allowed hosts=xxx.xxx.xxx.xxx, but I'm thinking I should have just added a space and the ip on the same line. I get a little nervous editing these config files so I thought I would stop and ask and the pros before I go any further.
Mahalo
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Installing NRPE
When NRPE runs as the xinetd service, the allowed hosts is defined in the following file:
It's the line "only_from".
As a test, execute the following command
If NRPE is listening and your Nagios Host is allowed, then it should report something like:
Code: Select all
/etc/xinetd.d/nrpeAs a test, execute the following command
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <centos_laptop>Code: Select all
NRPE v2.14As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Installing NRPE
Yep, get the response back as you indicated. I went ahead and removed that entry from nrpe.cfg.
Still get "Connection refused or timed out".
Do I need to install anything else on the CentOS laptop other than just the agent?
Still get "Connection refused or timed out".
Do I need to install anything else on the CentOS laptop other than just the agent?
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
Re: Installing NRPE
Interesting development.
Saw a post about the same issue, suggested turning the firewall off, so I did, now I get "Connection refused by host" whereas before, with the firewall on, I was getting "Connection refused or timed out".
Not sure if that means anything, but thought I would mention it.
Saw a post about the same issue, suggested turning the firewall off, so I did, now I get "Connection refused by host" whereas before, with the firewall on, I was getting "Connection refused or timed out".
Not sure if that means anything, but thought I would mention it.
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
Re: Installing NRPE
This is strange, I saw a post here that gives you the command to get the nrpe pid. netstat -at | grep nrpe
When I run that from the laptop, I don't get a pid, I get:
tcp 0 0 *:nrpe *:* LISTEN
Is anything in there the pid?
When I run that from the laptop, I don't get a pid, I get:
tcp 0 0 *:nrpe *:* LISTEN
Is anything in there the pid?
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Installing NRPE
NRPE is clearly listening, we just need to work out why the checks aren't
Can you attach your nrpe.cfg file and also show your test command from the CLI.
Can you attach your nrpe.cfg file and also show your test command from the CLI.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Installing NRPE
Thanks, here's the command:
[root@hhscnagios ~]# /usr/local/nagios/libexec/check_nrpe -H 10.5.190.51 -t 600 -p 15677 -c check_load
Connection refused by host
Just FYI, Ping does work.
I double checked with our network team and we don't block any ports on the internal network, but while troubleshooting, I turned the firewall off on both the Nagios XI server and the laptop, but that didn't fix the problem.
The config wizard prompts for SSL, says it's set by default, I tried it both ways but neither worked either. I suspect if that were the problem though I would get a different error message.
Nrpe.cfg is attached.
Mahalo
[root@hhscnagios ~]# /usr/local/nagios/libexec/check_nrpe -H 10.5.190.51 -t 600 -p 15677 -c check_load
Connection refused by host
Just FYI, Ping does work.
I double checked with our network team and we don't block any ports on the internal network, but while troubleshooting, I turned the firewall off on both the Nagios XI server and the laptop, but that didn't fix the problem.
The config wizard prompts for SSL, says it's set by default, I tried it both ways but neither worked either. I suspect if that were the problem though I would get a different error message.
Nrpe.cfg is attached.
Mahalo
You do not have the required permissions to view the files attached to this post.
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
Re: Installing NRPE
You are specifying port 15677 in your check_nrpe command, but the nrpe.cfg you sent uses port 5666.
1) Are you using xinetd?
1b) If so, did you configure it to use port 15677?
2) Lets run a port scan on the remote nrpe host from the XI server:
1) Are you using xinetd?
1b) If so, did you configure it to use port 15677?
2) Lets run a port scan on the remote nrpe host from the XI server:
Code: Select all
nmap <remote host ip> -p 5666,15677 Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Installing NRPE
I didn't do anything with the ports, that port 15677 is in check_nrpe command. I ran nmap like you suggested and it shows port 5666 open and 15677 closed so I changed the port number in the command to 5666. Now it connects, but it looks like I have a plugin issue. I ran the standard nrpe monitoring wizard and just selected load, users, and processes, just the defaults that come up in the wizard and I get:
Load says: Status Unknown check_load: Could not parse arguments.
Usage:check_load [-r] -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15
Users says: Status Unknown (No output returned from plugin)
Processes says: Status Critical NRPE:Command 'check_total_procs' not defined.
To back up here, all I originally set out to do what test installing the client for your Linux servers. So with that in mind, is this best way to install a Linux client, or is there a better way to set up monitoring on a Linux server?
Mahalo;
Load says: Status Unknown check_load: Could not parse arguments.
Usage:check_load [-r] -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15
Users says: Status Unknown (No output returned from plugin)
Processes says: Status Critical NRPE:Command 'check_total_procs' not defined.
To back up here, all I originally set out to do what test installing the client for your Linux servers. So with that in mind, is this best way to install a Linux client, or is there a better way to set up monitoring on a Linux server?
Mahalo;
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
Re: Installing NRPE
The best method is to install our linux agent on the linux host (you can download the agent tarball/install from the second page of the linux wizard).
http://assets.nagios.com/downloads/nagi ... _Agent.pdf
http://assets.nagios.com/downloads/nagi ... _Agent.pdf
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.