You are here

Monitoring NRPE in Centos 7 Client

10 posts / 0 new
Last post
Soporte IM
soporte_6's picture
Monitoring NRPE in Centos 7 Client

I have install Opsview SERVER with the automatical Script and in th client i install whit this command:

wget https://s3.amazonaws.com/opsview-agents/centos7/opsview-agent-5.4.0.1713...

yum localinstall opsview-agent-5.4.0.171370838-1.ct7.x86_64.rpm

I have already added the host client in Opsview server, What do I need to do to get the NRPE data from the server?

 

Duncan Ferguson
dferguson's picture
After ospview-agent is

After ospview-agent is isntalled, ensure it is running with 'pe -ef | grep nrpe'.  The daemon can be started with '/etc/init.d/ospview-agent' or 'service opsview-agent start'

In the Opsview UI all you need to do is assign some Host Templates int he 'edit host' section, just as 'OS - Unix Base' (to add in a set number of checks) or go to the 'Service Checks' tab and assign individual checks, depending on your needs.

  Duncs

Duncan Ferguson
dferguson's picture
We have more info in our docs

We have more info in our docs at https://knowledge.opsview.com/docs/host

  Duncs

Soporte IM
soporte_6's picture
NRPE already running

NRPE already running

[~]# service opsview-agent status

NRPE is running as process 32654

 

In the server says:

Comando:check_nrpe -H 'host.client.com' -c check_cpu_stats -C '' -k '' -r '' -y 'ADH-AES256-SHA:ADH-AES128-SHA'

Código devuelto:2

Salida:Connection refused by host

Firewall ports in client:

# Allow incoming TCP portsTCP_IN = "3306,20,21,22,25,2255,53,80,26,110,143,443,465,587,585,993,995,2077,2078,2082,2083,2086,2087,2095,2096,2080,45000:65000,12975,82,8082,6082,5666"

# Allow outgoing TCP ports

TCP_OUT = "11599,3306,2255,20,21,22,25,26,37,43,53,80,110,113,443,585,587,873,465,2087,2089,2703,5038,1157,2049,5666"

Duncan Ferguson
dferguson's picture
NRPE listens on port 5666 so

NRPE listens on port 5666 so you will need to add that to the incoming port list

  Duncs

Soporte IM
soporte_6's picture
The Port 5666 are open in the

The Port 5666 are open in the client:

 

# Allow incoming TCP ports

TCP_IN = "...,5666"

 

# Allow outgoing TCP ports

TCP_OUT = "...,5666"

Duncan Ferguson
dferguson's picture
Are the two machines on

Are the two machines on diffrent subnets?  From a host on the same subnet as the target machine can you get to port 5666?  Do you have any other firewalls between the opsview server and the target machine? 

Do you have SELinux or apparmor on the server that might be blocking access to the port?

  Duncs

Soporte IM
soporte_6's picture
The two machines are on and

The two machines are on and yes, they are on two different subnets, the firewall is allowed in and out port 5666 on both machines.

I can not put a test machine on the same subnet as they are production services (bare metal)

What can I do?

Duncan Ferguson
dferguson's picture
Are you able to use a packet

Are you able to use a packet sniffer on both the client and the server (such as tcpdump) for port 5666 to see where the traffic is being stopped?

  Duncs

Soporte IM
soporte_6's picture
Says:

Says:

 

10:56:21.089155 IP SERVERIP.33918 > ClientIP.5666: Flags [S], seq 211560917, win 29200, options [mss 1460,sackOK,TS val 5923389 ecr 0,nop,wscale 7], length 0

10:56:22.913431 IP 1SERVERIP.33924 > ClientIP5666: Flags [S], seq 2625306527, win 29200, options [mss 1460,sackOK,TS val 5925213 ecr 0,nop,wscale 7], length 0