NRPE Socket timeout

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

NRPE Socket timeout

Post by fsodah »

I tried today again, trying to figure the nrpe ... went all ok during installation, however i made all necessary steps but still getting time out socket ... thanks in advance

Code: Select all

Oct 03 20:09:23 xxxxxxxxxx systemd[1]: Started Nagios Remote Program Executor.
Oct 03 20:09:23 xxxxxxx nrpe[24047]: Starting up daemon
Oct 03 20:09:23 xxxxxxx nrpe[24047]: Server listening on 0.0.0.0 port 5666.
Oct 03 20:09:23 xxxxxxx nrpe[24047]: Server listening on :: port 5666.
Oct 03 20:09:23 xxxxx nrpe[24047]: Listening for connections on port 5666
Oct 03 20:09:23 xxxxxxxxxx nrpe[24047]: Allowing connections from: 127.0.0.1, 10.xxxxx

Code: Select all

bash: iptable: command not found...
[root@xxxxxxxx1 ~]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:5666
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootps
You do not have the required permissions to view the files attached to this post.
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: NRPE Socket timeout

Post by fsodah »

nmap 10.x.x.x -Pn -p 5666

Starting Nmap 6.47 ( http://nmap.org ) at 2019-10-03 20:43 EEST
Nmap scan report for 10.x.x.x
Host is up.
PORT STATE SERVICE
5666/tcp filtered nrpe

Nmap done: 1 IP address (1 host up) scanned in 2.13 seconds
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: NRPE Socket timeout

Post by mbellerue »

Good catch on the port being filtered. It definitely should not be filtered. That means there is something between Nagios and the NRPE agent. Are the Nagios server and the server running NRPE on the same subnet? Are there any network security appliances that may be interfering with communication?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: NRPE Socket timeout

Post by fsodah »

I will check next week any firewall setting between the vlan .... i will keep you updated master
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: NRPE Socket timeout

Post by mbellerue »

Okay, perfect! We will keep the thread open and wait to hear back from you.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: NRPE Socket timeout

Post by fsodah »

I did open the ports through the firewall was able to get the socket ... but still this getting the unknown message
You do not have the required permissions to view the files attached to this post.
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: NRPE Socket timeout

Post by fsodah »

on the remote server I checked the following

Code: Select all

Starting Nmap 6.40 ( http://nmap.org ) at 2019-10-06 20:12 EEST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000014s latency).
Other addresses for localhost (not scanned): 127.0.0.1 127.0.0.1
Not shown: 994 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
25/tcp   open  smtp
80/tcp   open  http
111/tcp  open  rpcbind
631/tcp  open  ipp
5666/tcp open  nrpe

nrpe.cfg

Code: Select all


# The following examples use hardcoded command arguments...
# This is by far the most secure method of using NRPE

command[check_users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib64/nagios/plugins/check_load -r -w .15,.10,.05 -c .30,.25,.20
command[check_hda1]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 150 -c 200


# The following examples allow user-supplied arguments and can
# only be used if the NRPE daemon was compiled with support for
# command arguments *AND* the dont_blame_nrpe directive in this
# config file is set to '1'.  This poses a potential security risk, so
# make sure you read the SECURITY file before doing this.

### MISC SYSTEM METRICS ###
#command[check_users]=/usr/lib64/nagios/plugins/check_users $ARG1$
#command[check_load]=/usr/lib64/nagios/plugins/check_load $ARG1$
#command[check_disk]=/usr/lib64/nagios/plugins/check_disk $ARG1$
#command[check_swap]=/usr/lib64/nagios/plugins/check_swap $ARG1$
#command[check_cpu_stats]=/usr/lib64/nagios/plugins/check_cpu_stats.sh $ARG1$
#command[check_mem]=/usr/lib64/nagios/plugins/custom_check_mem -n $ARG1$

### GENERIC SERVICES ###
#command[check_init_service]=sudo /usr/lib64/nagios/plugins/check_init_service $ARG1$
#command[check_services]=/usr/lib64/nagios/plugins/check_services -p $ARG1$

### SYSTEM UPDATES ###
#command[check_yum]=/usr/lib64/nagios/plugins/check_yum
#command[check_apt]=/usr/lib64/nagios/plugins/check_apt

### PROCESSES ###
#command[check_all_procs]=/usr/lib64/nagios/plugins/custom_check_procs
#command[check_procs]=/usr/lib64/nagios/plugins/check_procs $ARG1$

### OPEN FILES ###
rpm epel

Code: Select all

 rpm -aq | grep epel
epel-release-7-11.noarch

Code: Select all

[root@xxxxxx nrpe.d]# cd /usr/lib64/nagios/plugins/
[root@xxxxxxx plugins]# cd ..
[root@xxxxxxx nagios]# ls -al
total 128
drwxr-xr-x    3 root root    21 Oct  3 16:59 .
dr-xr-xr-x. 148 root root 86016 Oct  3 16:59 ..
drwxr-xr-x    3 root root    71 Oct  3 16:59 plugins
[root@xxxxx nagios]# cd plugins/
[root@xxxx plugins]# pwd
/usr/lib64/nagios/plugins
[root@xxxxx plugins]# ls -al
total 84
drwxr-xr-x 3 root root    71 Oct  3 16:59 .
drwxr-xr-x 3 root root    21 Oct  3 16:59 ..
drwxr-xr-x 2 root root     6 Jan 17  2019 eventhandlers
-rwxr-xr-x 1 root root 41136 Aug 30 00:57 negate
-rwxr-xr-x 1 root root 36840 Aug 30 00:57 urlize
-rwxr-xr-x 1 root root  2791 Aug 30 00:56 utils.sh
[root@xxx plugins]# cd eventhandlers/
[root@xxxx eventhandlers]# ls -al
total 0
drwxr-xr-x 2 root root  6 Jan 17  2019 .
drwxr-xr-x 3 root root 71 Oct  3 16:59 ..
[root@xxxxxxx eventhandlers]# cd ..

Code: Select all

uname -a
Linux xxxxxxxx 3.10.0-862.el7.x86_64 #1 SMP Wed Mar 21 18:14:51 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: NRPE Socket timeout

Post by mbellerue »

From your nrpe.cfg file, it looks like these are the only commands that are available to you.

Code: Select all

command[check_users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib64/nagios/plugins/check_load -r -w .15,.10,.05 -c .30,.25,.20
command[check_hda1]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 150 -c 200
Can you try your command with check_hda1, and see what it returns?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: NRPE Socket timeout

Post by fsodah »

i will do it tomorrow
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: NRPE Socket timeout

Post by fsodah »

check_hda1
bash: check_hda1: command not found...
Locked