【HELP】It can not be monitored

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.
P3_25
Posts: 35
Joined: Mon Jan 25, 2016 8:44 pm

Re: 【HELP】It can not be monitored

Post by P3_25 »

Hello.

Sorry in clumsy English.

I understood the matter to install NSClient of a new version.
However, server B wants to watch server C in this old version because server A can watch server C in NSClient of an old version

I want to carry out the update of NSClient as the last means.
Is there the point that you should confirm other methods?

The fire wall of server C is fixed as invalidity.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: 【HELP】It can not be monitored

Post by tgriep »

There has been a log of updates over the last 6 years for the NSCLient agent.
Upgrading could help in this issue.

Can you login to the Windows host and restart the NSCLient++ service?
Then login to the Nagios system that you are having issues with, run the following commands and post the output.

Code: Select all

traceroute 192.168.4.254
ping 192.168.4.254
nmap 192.168.4.254 -p 5666
/usr/local/nagios/libexec/check_nrpe -H 192.168.4.254 -t 60
/usr/local/nagios/libexec/check_nrpe -H 192.168.4.254 -t 60 -n
Be sure to check out our Knowledgebase for helpful articles and solutions!
P3_25
Posts: 35
Joined: Mon Jan 25, 2016 8:44 pm

Re: 【HELP】It can not be monitored

Post by P3_25 »

Hello.

Sorry in clumsy English.

I understood the matter of the update.
will consider it.

I send the practice result of the command that I do NSCLient++ service of server C after reboot and executed in server B.

[root@server B ~]# traceroute 192.168.4.254
traceroute to 192.168.4.254 (192.168.4.254), 30 hops max, 40 byte packets
1 192.168.3.240 (192.168.3.240) 0.488 ms 0.461 ms 0.447 ms
2 192.168.4.254 (192.168.4.254) 0.427 ms 0.444 ms 0.411 ms
[root@server B ~]# ping 192.168.4.254
PING 192.168.4.254 (192.168.4.254) 56(84) bytes of data.
64 bytes from 192.168.4.254: icmp_seq=1 ttl=128 time=0.513 ms
64 bytes from 192.168.4.254: icmp_seq=2 ttl=128 time=0.340 ms
64 bytes from 192.168.4.254: icmp_seq=3 ttl=128 time=0.283 ms
64 bytes from 192.168.4.254: icmp_seq=4 ttl=128 time=0.380 ms

--- 192.168.4.254 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.283/0.379/0.513/0.084 ms
[root@server B ~]# nmap 192.168.4.254 -p 5666

Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2016-05-10 09:48 JST
Failed to find device eth0 which was referenced in /proc/net/route
Failed to find device eth0 which was referenced in /proc/net/route
nexthost: failed to determine route to 192.168.4.254
QUITTING!
[root@server B ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.4.254 -t 60
CHECK_NRPE: Socket timeout after 60 seconds.
[root@server B ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.4.254 -t 60 -n
CHECK_NRPE: Socket timeout after 60 seconds.
[root@server B ~]#

Could you check it?
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: 【HELP】It can not be monitored

Post by tgriep »

This message from the nmap command has me concerned that there is a issue with
the ethernet settings for the new server and that is causing the issue.
Failed to find device eth0 which was referenced in /proc/net/route
Failed to find device eth0 which was referenced in /proc/net/route
nexthost: failed to determine route to 192.168.4.254
Can you verify that routing is setup correctly on the new server?
Can you run the following commands and post the output here?

Code: Select all

ip addr
ip route
If you have multiple IP addresses assigned to the ethernet interface on the new host, you would have to add them to the nsc.ini file on the Windows host.
Be sure to check out our Knowledgebase for helpful articles and solutions!
P3_25
Posts: 35
Joined: Mon Jan 25, 2016 8:44 pm

Re: 【HELP】It can not be monitored

Post by P3_25 »

Hello.

Sorry in clumsy English.

The following becomes the practice result.

[root@server B ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:56:91:1a:91 brd ff:ff:ff:ff:ff:ff
inet 192.168.3.6/24 brd 192.168.3.255 scope global eth0:0
inet6 fe80::250:56ff:fe91:1a91/64 scope link
valid_lft forever preferred_lft forever
3: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
[root@server B ~]# ip route
192.168.3.0/24 dev eth0 proto kernel scope link src 192.168.3.6
default via 192.168.3.240 dev eth0
[root@server B ~]#

Could you check it?
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: 【HELP】It can not be monitored

Post by tgriep »

The last thing to try is to force IPv4 in the check_nrpe command.
Run this on the new server and see if it works.

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 192.168.4.254 -t 60 -4
If it does, it is probably the sit0 interface which is used for tunneling IPv6 through an IPv4 connection.
If the sit0 interface isn't needed, you can remove it or you will have to add the -4 command on the new server.
Be sure to check out our Knowledgebase for helpful articles and solutions!
P3_25
Posts: 35
Joined: Mon Jan 25, 2016 8:44 pm

Re: 【HELP】It can not be monitored

Post by P3_25 »

Hello.

Sorry in clumsy English.

The following becomes the practice result.

[root@server B ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.4.254 -t 60 -4
/usr/local/nagios/libexec/check_nrpe: invalid option -- 4

NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 2.12
Last Modified: 03-10-2008
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required

Usage: check_nrpe -H <host> [-n] [-u] [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist...>]

Options:
-n = Do no use SSL
-u = Make socket timeouts return an UNKNOWN state instead of CRITICAL
<host> = The address of the host running the NRPE daemon
[port] = The port on which the daemon is running (default=5666)
[timeout] = Number of seconds before connection times out (default=10)
[command] = The name of the command that the remote daemon should run
[arglist] = Optional arguments that should be passed to the command. Multiple
arguments should be separated by a space. If provided, this must be
the last option supplied on the command line.

Note:
This plugin requires that you have the NRPE daemon running on the remote host.
You must also have configured the daemon to associate a specific plugin command
with the [command] option you are specifying here. Upon receipt of the
[command] argument, the NRPE daemon will run the appropriate plugin command and
send the plugin output and return code back to *this* plugin. This allows you
to execute plugins on remote hosts and 'fake' the results to make Nagios think
the plugin is being run locally.

[root@server B ~]#

Options "-4" is correct?
Is my operation wrong?

There is it with addition, but which server should I add "-4" to to a new server?
Is it server B or server C?

How do I add method .

Could you check it?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: 【HELP】It can not be monitored

Post by rkennedy »

Can you update your NRPE plugin? Here is the output from 2.15, which allows you to use -4 and -6.

Code: Select all

NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 2.15
Last Modified: 09-06-2013
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required

Usage: check_nrpe -H <host> [ -b <bindaddr> ] [-4] [-6] [-n] [-u] [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist...>]

Options:
 -n         = Do no use SSL
 -u         = Make socket timeouts return an UNKNOWN state instead of CRITICAL
 <host>     = The address of the host running the NRPE daemon
 <bindaddr> = bind to local address
 -4         = user ipv4 only
 -6         = user ipv6 only
 [port]     = The port on which the daemon is running (default=5666)
 [timeout]  = Number of seconds before connection times out (default=10)
 [command]  = The name of the command that the remote daemon should run
 [arglist]  = Optional arguments that should be passed to the command.  Multiple
              arguments should be separated by a space.  If provided, this must be
              the last option supplied on the command line.

Former Nagios Employee
P3_25
Posts: 35
Joined: Mon Jan 25, 2016 8:44 pm

Re: 【HELP】It can not be monitored

Post by P3_25 »

Hello.

Sorry in clumsy English.

No. I cannot update it now.

Are there other methods?
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: 【HELP】It can not be monitored

Post by tgriep »

Nope, the only option is if you cannot update any software, disable IPv6 on the new server.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked