Discussion:
[Nagios-users] Hey I was wondering about the check_ping from the newest stable plugins.
Eliezer Croitoru
2013-08-09 13:46:21 UTC
Permalink
I have compiled all nagios plugins many times but on the last time this
what happens:
nagios-plugins-1.4.16.tar.gz
I compile with no errors and then when nagios do a check it states:
CRITICAL - Network Unreachable (repo.ngtech.co.il)
while from command line linux ping everything works fine!
also I compiled my own script in ruby perl and python and all of them
are not stating anything about "Network Unreachable".

Is this a regression from older and newer versions of nagios_plugins??
Since they work at the same time I run my own script and it states the
everyting is OK which means 100% no packet loss I am a bit confused
about it.
How is it possible for the basic check_ping written in c to not work and
the scripting languages scripts to work fine?
it's not permissions since it states "Network Unreachable".
it's must be another issue either in nagios or the code somewhere.

Can anyone test it please and make sure that my assumptions are right?

Eliezer
Eliezer Croitoru
2013-08-09 13:59:40 UTC
Permalink
Forgot to show the command:
# /usr/local/nagios/libexec/check_ping -H repo.ngtech.co.il -w 100.0,20%
-c 500.0,60% -p 10
CRITICAL - Network Unreachable (repo.ngtech.co.il)

# /usr/local/nagios/libexec/check_ping -H www1.ngtech.co.il -w 100.0,20%
-c 500.0,60% -p 10
PING OK - Packet loss = 0%, RTA = 17.40
ms|rta=17.395000ms;100.000000;500.000000;0.000000 pl=0%;20;60;0

Which is odd in any way you can think off.

Eliezer
Post by Eliezer Croitoru
I have compiled all nagios plugins many times but on the last time this
nagios-plugins-1.4.16.tar.gz
CRITICAL - Network Unreachable (repo.ngtech.co.il)
while from command line linux ping everything works fine!
also I compiled my own script in ruby perl and python and all of them
are not stating anything about "Network Unreachable".
Is this a regression from older and newer versions of nagios_plugins??
Since they work at the same time I run my own script and it states the
everyting is OK which means 100% no packet loss I am a bit confused
about it.
How is it possible for the basic check_ping written in c to not work and
the scripting languages scripts to work fine?
it's not permissions since it states "Network Unreachable".
it's must be another issue either in nagios or the code somewhere.
Can anyone test it please and make sure that my assumptions are right?
Eliezer
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
Holger Weiß
2013-08-09 14:03:27 UTC
Permalink
Post by Eliezer Croitoru
I have compiled all nagios plugins many times but on the last time this
nagios-plugins-1.4.16.tar.gz
CRITICAL - Network Unreachable (repo.ngtech.co.il)
My guess would be that your IPv6 connectivity is broken. In that case,
using check_ping's "-4" flag should do the trick. If that _doesn't_
help, could you please paste the output of "check_ping -vvv [...]"?
Post by Eliezer Croitoru
Can anyone test it please and make sure that my assumptions are right?
For me, both of the following commands return OK:

$ check_ping -4 -H repo.ngtech.co.il -w '500.0,10%' -c '1000.0,50%'
$ check_ping -6 -H repo.ngtech.co.il -w '500.0,10%' -c '1000.0,50%'

Holger
Eliezer Croitoru
2013-08-09 14:23:17 UTC
Permalink
I have compiled all nagios plugins many times but on the last time=
this
nagios-plugins-1.4.16.tar.gz
I compile with no errors and then when nagios do a check it states=
CRITICAL - Network Unreachable (repo.ngtech.co.il)
=20
My guess would be that your IPv6 connectivity is broken. In that c=
ase,
using check_ping's "-4" flag should do the trick. If that _doesn't=
_
help, could you please paste the output of "check_ping -vvv [...]"?
=20
Can anyone test it please and make sure that my assumptions are ri=
ght?
=20
=20
$ check_ping -4 -H repo.ngtech.co.il -w '500.0,10%' -c '1000.0,50%'
$ check_ping -6 -H repo.ngtech.co.il -w '500.0,10%' -c '1000.0,50%'
=20
Holger
Hey Holger,
this is what I do have:
# /usr/local/nagios/libexec/check_ping -4 -H repo.ngtech.co.il -w
'500.0,10%' -c '1000.0,50%'
PING OK - Packet loss =3D 0%, RTA =3D 339.04
ms|rta=3D339.035004ms;500.000000;1000.000000;0.000000 pl=3D0%;10;50;0
# /usr/local/nagios/libexec/check_ping -6 -H repo.ngtech.co.il -w
'500.0,10%' -c '1000.0,50%'
CRITICAL - Network Unreachable (repo.ngtech.co.il)

which seems like the settings for the RT of the packets seems to be t=
he
main issue while parsing the ping command output.

/usr/local/nagios/libexec/check_ping -vvv -4 -H repo.ngtech.co.il -w
'500.0,10%' -c '1000.0,50%'
CMD: /bin/ping -n -U -w 10 -c 5 repo.ngtech.co.il
Output: PING cairo.treenetnz.com (58.28.153.233) 56(84) bytes of data=
.
Output: 64 bytes from 58.28.153.233: icmp_req=3D1 ttl=3D42 time=3D335=
ms
Output: 64 bytes from 58.28.153.233: icmp_req=3D2 ttl=3D42 time=3D339=
ms
Output: 64 bytes from 58.28.153.233: icmp_req=3D3 ttl=3D41 time=3D341=
ms
Output: 64 bytes from 58.28.153.233: icmp_req=3D4 ttl=3D41 time=3D341=
ms
Output: 64 bytes from 58.28.153.233: icmp_req=3D5 ttl=3D41 time=3D340=
ms
Output:
Output: --- cairo.treenetnz.com ping statistics ---
Output: 5 packets transmitted, 5 received, 0% packet loss, time 4003m=
s
Output: rtt min/avg/max/mdev =3D 335.751/339.767/341.602/2.251 ms
PING OK - Packet loss =3D 0%, RTA =3D 339.77
ms|rta=3D339.766998ms;500.000000;1000.000000;0.000000 pl=3D0%;10;50;0
500.000000:10% 1000.000000:50%

so the RT is more then 100ms which considered to be C\W but my output=
is:
# /usr/local/nagios/libexec/check_ping -vvv -H repo.ngtech.co.il -w
100.0,20% -c 500.0,60%
CMD: /bin/ping6 -n -U -w 10 -c 5 repo.ngtech.co.il
Got stderr: connect: Network is unreachable
CRITICAL - Network Unreachable (repo.ngtech.co.il)
and:
# /usr/local/nagios/libexec/check_ping -vvvv -H repo.ngtech.co.il -w
500.0,20% -c 1000.0,60%
CMD: /bin/ping6 -n -U -w 10 -c 5 repo.ngtech.co.il
Got stderr: connect: Network is unreachable
CRITICAL - Network Unreachable (repo.ngtech.co.il)

which is a bit weird why is it using ping6 for a simple ping by defau=
lt?
Hos is the check_ping recognises that there is a need for ping6 ??
the host dosn't even has ipv6 connectivity..

Eliezer
=20
-------------------------------------------------------------------=
-----------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.=
=20
Download for free and get started troubleshooting in minutes.=20
http://pubads.g.doubleclick.net/gampad/clk?id=3D48897031&iu=3D/4140=
/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when =
reporting any issue.=20
::: Messages without supporting info will risk being sent to /dev/n=
ull
=20
Giles Coochey
2013-08-09 14:32:46 UTC
Permalink
Post by Eliezer Croitoru
so the RT is more then 100ms which considered to be C\W but my output
is: # /usr/local/nagios/libexec/check_ping -vvv -H repo.ngtech.co.il
-w 100.0,20% -c 500.0,60% CMD: /bin/ping6 -n -U -w 10 -c 5
repo.ngtech.co.il Got stderr: connect: Network is unreachable CRITICAL
- Network Unreachable (repo.ngtech.co.il) and: #
/usr/local/nagios/libexec/check_ping -vvvv -H repo.ngtech.co.il -w
500.0,20% -c 1000.0,60% CMD: /bin/ping6 -n -U -w 10 -c 5
repo.ngtech.co.il Got stderr: connect: Network is unreachable CRITICAL
- Network Unreachable (repo.ngtech.co.il) which is a bit weird why is
it using ping6 for a simple ping by default? Hos is the check_ping
recognises that there is a need for ping6 ?? the host dosn't even has
ipv6 connectivity.. Eliezer
repo.ngtech.co.il
Server: 172.21.0.66
Address: 172.21.0.66#53

Non-authoritative answer:
repo.ngtech.co.il canonical name = proxy.treenet.co.nz.
proxy.treenet.co.nz canonical name = cairo.treenetnz.com.
cairo.treenetnz.com has AAAA address 2002:3a1c:99e9:0:230:f1ff:fe14:5d47
--
Regards,

Giles Coochey, CCNP, CCNA, CCNAS
NetSecSpec Ltd
+44 (0) 8444 780677
+44 (0) 7983 877438
http://www.netsecspec.co.uk
***@netsecspec.co.uk
--
Regards,

Giles Coochey, CCNP, CCNA, CCNAS
NetSecSpec Ltd
+44 (0) 8444 780677
+44 (0) 7983 877438
http://www.coochey.net
http://www.netsecspec.co.uk
***@coochey.net
Eliezer Croitoru
2013-08-09 14:51:30 UTC
Permalink
Post by Giles Coochey
Post by Eliezer Croitoru
repo.ngtech.co.il
Server: 172.21.0.66
Address: 172.21.0.66#53
repo.ngtech.co.il canonical name = proxy.treenet.co.nz.
proxy.treenet.co.nz canonical name = cairo.treenetnz.com.
cairo.treenetnz.com has AAAA address
2002:3a1c:99e9:0:230:f1ff:fe14:5d47
This is the domain DNS answers
# dig cairo.treenetnz.com @ns1.treenetnz.com.

; <<>> DiG 9.9.2-P1 <<>> cairo.treenetnz.com @ns1.treenetnz.com.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24830
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 4
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;cairo.treenetnz.com. IN A

;; ANSWER SECTION:
cairo.treenetnz.com. 60 IN A 58.28.153.233

;; AUTHORITY SECTION:
treenetnz.com. 60 IN NS ns1.treenetnz.com.
treenetnz.com. 60 IN NS ns2.treenetnz.com.
treenetnz.com. 60 IN NS ns3.treenetnz.com.

;; ADDITIONAL SECTION:
ns1.treenetnz.com. 60 IN A 58.28.153.233
ns2.treenetnz.com. 60 IN AAAA 2002:3a1c:99e9:0:225:11ff:fe05:6cb3
ns3.treenetnz.com. 60 IN A 58.28.153.233

;; Query time: 343 msec
;; SERVER: 58.28.153.233#53(58.28.153.233)
;; WHEN: Fri Aug 9 17:47:13 2013
;; MSG SIZE rcvd: 178

# dig cairo.treenetnz.com @ns2.treenetnz.com.

; <<>> DiG 9.9.2-P1 <<>> cairo.treenetnz.com @ns2.treenetnz.com.
;; global options: +cmd
;; connection timed out; no servers could be reached
# dig cairo.treenetnz.com @ns3.treenetnz.com.

; <<>> DiG 9.9.2-P1 <<>> cairo.treenetnz.com @ns3.treenetnz.com.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51977
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 4
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;cairo.treenetnz.com. IN A

;; ANSWER SECTION:
cairo.treenetnz.com. 60 IN A 58.28.153.233

;; AUTHORITY SECTION:
treenetnz.com. 60 IN NS ns3.treenetnz.com.
treenetnz.com. 60 IN NS ns1.treenetnz.com.
treenetnz.com. 60 IN NS ns2.treenetnz.com.

;; ADDITIONAL SECTION:
ns1.treenetnz.com. 60 IN A 58.28.153.233
ns2.treenetnz.com. 60 IN AAAA 2002:3a1c:99e9:0:225:11ff:fe05:6cb3
ns3.treenetnz.com. 60 IN A 58.28.153.233

;; Query time: 340 msec
;; SERVER: 58.28.153.233#53(58.28.153.233)
;; WHEN: Fri Aug 9 17:48:24 2013
;; MSG SIZE rcvd: 178

The above happens since the ns2 is IPV6 only server and it might has the
record you are talking about.
my forwarders cannot even contact it yet.

Eliezer

Holger Weiß
2013-08-09 14:38:31 UTC
Permalink
which is a bit weird why is it using ping6 for a simple ping by default?
Hos is the check_ping recognises that there is a need for ping6 ??
the host dosn't even has ipv6 connectivity..
There's no sensible way to detect the availability of IPv6. The plugin
could auto-fallback to IPv4 if IPv6 fails, but so far users are expected
to simply add the "-4" flag in IPv4-only environments (or to use
check_icmp).

Holger
Continue reading on narkive:
Search results for '[Nagios-users] Hey I was wondering about the check_ping from the newest stable plugins.' (Questions and Answers)
18
replies
Why does everyone use this? Why not google search?
started 2006-05-14 04:04:41 UTC
society & culture
Loading...