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.
I have setup "check_http" "check_ssh"to monitor apache and ssh service on the server, but I have been getting CRITICAL - Socket timeout after 10/20/30 seconds error for both plugins. I have tried to increase the timer but still getting the same error. I also check the firewall and both services have been added.
Nagios Core is running on Centos 7
NRPE is running on Ubuntu
[root@dj-mon ~]# /usr/local/nagios/libexec/check_http -H 45.55.251.117
HTTP OK: HTTP/1.1 200 OK - 664 bytes in 0.007 second response time |time=0.007303s;;;0.000000 size=664B;;;0
ubuntuadmin@iusa-lin-db01:/usr/local/nagios/var$ sudo systemctl status nrpe
● nrpe.service - Nagios Remote Plugin Executor
Loaded: loaded (/lib/systemd/system/nrpe.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2018-02-09 19:41:40 CST; 7s ago
Docs: http://www.nagios.org/documentation
Process: 25027 ExecStopPost=/bin/rm -f /usr/local/nagios/var/nrpe.pid (code=exited, status=0/SUCCESS)
Process: 25022 ExecStart=/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -f (code=exited, status=2)
Main PID: 25022 (code=exited, status=2)
Feb 09 19:41:40 iusa-lin-db01 systemd[1]: Started Nagios Remote Plugin Executor.
Feb 09 19:41:40 iusa-lin-db01 systemd[1]: nrpe.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Feb 09 19:41:40 iusa-lin-db01 systemd[1]: nrpe.service: Unit entered failed state.
Feb 09 19:41:40 iusa-lin-db01 systemd[1]: nrpe.service: Failed with result 'exit-code'.
When I checked the logs (/usr/local/nagios/var/nrpe.log), it showed me this. There are three certificate errors, but not sure are those the reason to not able to check the services. One more weird thing that I am able to monitor other services on this server like Load, Partition, users and they all are working fine.
[1518226046] parse_allowed_hosts: parsing the allowed host string >127.0.0.1,::1,45.55.251.117< to add to ACL list
[1518226046] parse_allowed_hosts: ADDING this record (127.0.0.1) to ACL list!
[1518226046] add_ipv4_to_acl: checking ip-address >127.0.0.1<
[1518226046] add_ipv4_to_acl: ip-address >127.0.0.1< correct, adding.
[1518226046] parse_allowed_hosts: Record added to ACL list!
[1518226046] parse_allowed_hosts: ADDING this record (::1) to ACL list!
[1518226046] parse_allowed_hosts: Record added to ACL list!
[1518226046] parse_allowed_hosts: ADDING this record (45.55.251.117) to ACL list!
[1518226046] add_ipv4_to_acl: checking ip-address >45.55.251.117<
[1518226046] add_ipv4_to_acl: ip-address >45.55.251.117< correct, adding.
[1518226046] parse_allowed_hosts: Record added to ACL list!
[1518226046] Showing ACL lists for both IP and DOMAIN acl's:
[1518226046] IP ACL: 127.0.0.1/32 16777343
[1518226046] IP ACL: 0.0.0.0/20 0
[1518226046] IP ACL: 45.55.251.117/32 1979397933
[1518226046] Added command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
[1518226046] Added command[check_load]=/usr/local/nagios/libexec/check_load -r -w .15,.10,.05 -c .30,.25,.20
[1518226046] Added command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1
[1518226046] Added command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
[1518226046] Added command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200
[1518226046] Error: could not use certificate file /etc/letsencrypt/live/monitor.theismailiusa.org/cert.pem : error:02001002:system library:fopen:No such file or directory
[1518226046] Error: could not use certificate file /etc/letsencrypt/live/monitor.theismailiusa.org/cert.pem : error:20074002:BIO routines:FILE_CTRL:system lib
[1518226046] Error: could not use certificate file /etc/letsencrypt/live/monitor.theismailiusa.org/cert.pem : error:140AD002:SSL routines:SSL_CTX_use_certificate_file:system lib
[1518226900] parse_allowed_hosts: parsing the allowed host string >127.0.0.1,::1,45.55.251.117< to add to ACL list
[1518226900] parse_allowed_hosts: ADDING this record (127.0.0.1) to ACL list!
[1518226900] add_ipv4_to_acl: checking ip-address >127.0.0.1<
[1518226900] add_ipv4_to_acl: ip-address >127.0.0.1< correct, adding.
[1518226900] parse_allowed_hosts: Record added to ACL list!
[1518226900] parse_allowed_hosts: ADDING this record (::1) to ACL list!
[1518226900] parse_allowed_hosts: Record added to ACL list!
[1518226900] parse_allowed_hosts: ADDING this record (45.55.251.117) to ACL list!
[1518226900] add_ipv4_to_acl: checking ip-address >45.55.251.117<
[1518226900] add_ipv4_to_acl: ip-address >45.55.251.117< correct, adding.
[1518226900] parse_allowed_hosts: Record added to ACL list!
[1518226900] Showing ACL lists for both IP and DOMAIN acl's:
[1518226900] IP ACL: 127.0.0.1/32 16777343
[1518226900] IP ACL: 0.0.0.0/20 0
[1518226900] IP ACL: 45.55.251.117/32 1979397933
[1518226900] Added command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
[1518226900] Added command[check_load]=/usr/local/nagios/libexec/check_load -r -w .15,.10,.05 -c .30,.25,.20
[1518226900] Added command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1
[1518226900] Added command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
[1518226900] Added command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200
[1518226900] Error: could not use certificate file /etc/letsencrypt/live/monitor.theismailiusa.org/cert.pem : error:02001002:system library:fopen:No such file or directory
[1518226900] Error: could not use certificate file /etc/letsencrypt/live/monitor.theismailiusa.org/cert.pem : error:20074002:BIO routines:FILE_CTRL:system lib
[1518226900] Error: could not use certificate file /etc/letsencrypt/live/monitor.theismailiusa.org/cert.pem : error:140AD002:SSL routines:SSL_CTX_use_certificate_file:system lib
ubuntuadmin@iusa-lin-db01:/usr/local/nagios/var$ ^C