check_fping rta artificially high

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.
Locked
User avatar
nozlaf
Posts: 172
Joined: Sun Nov 09, 2014 9:50 pm
Location: Victoria, Australia

check_fping rta artificially high

Post by nozlaf »

so i'm rolling out a new nagios install for a new network and had some strange issues with check_ping so I have switched to check_fping

running the check command manually

Code: Select all

Status Information:
FPING WARNING - 192.168.1.1 (loss=0%, rta=2.590000 ms)

Code: Select all

Performance Data:
loss=0%;20;30;0;100 rta=0.002590s;0.002000;0.005000;0.000000
Manually executed

Code: Select all

/usr/local/nagios/libexec/check_fping 192.168.1.1 -w 20,2% -c 30,5% -n 5
As nagios user

Code: Select all

FPING OK - 172.17.37.30 (loss=0%, rta=5.760000 ms)|loss=0%;2;5;0;100 rta=0.005760s;0.020000;0.030000;0.000000
as root

Code: Select all

FPING OK - 172.17.37.30 (loss=0%, rta=2.050000 ms)|loss=0%;2;5;0;100 rta=0.002050s;0.020000;0.030000;0.000000
so to me the time it takes the command to elevate to root is included in the time calculation which is in my mind not right and its consistent, I could do it all day and running as the nagios user from the shell will always yield a 5ms minimum response and running as root i get 1.5-2ms response


if this has alwasy been discussed I apologise its 1am here
Last edited by nozlaf on Wed Aug 31, 2016 4:45 pm, edited 2 times in total.
Looking forward to seeing you all at #NagiosCon2019?
-Dedicated Lover of Nconf,PNP4Nagios and Nagvis
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_fping rta artificially high due

Post by ssax »

Looks like you should be able to specify the -T option:

Code: Select all

 -T, --target-timeout=INTEGER
    Target timeout (ms) (default: fping's default for -t)
From the fping man page:

Code: Select all

       -t n Initial target timeout in milliseconds (default 500). In the default mode, this is the amount of time that fping waits for a response to its first request.  Successive timeouts are multiplied by the
            backoff factor specified with -B.  Note that this option has no effect looping or counting modes (-l, -c, or -C).
User avatar
nozlaf
Posts: 172
Joined: Sun Nov 09, 2014 9:50 pm
Location: Victoria, Australia

Re: check_fping rta artificially high due

Post by nozlaf »

ssax wrote:Looks like you should be able to specify the -T option:
I don't think that has any relevance to this I am not having any issues with the timeout
Looking forward to seeing you all at #NagiosCon2019?
-Dedicated Lover of Nconf,PNP4Nagios and Nagvis
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_fping rta artificially high

Post by Box293 »

You should use check_icmp, its much faster. It's included with nagios plugins.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
nozlaf
Posts: 172
Joined: Sun Nov 09, 2014 9:50 pm
Location: Victoria, Australia

Re: check_fping rta artificially high

Post by nozlaf »

in the light of day I am now even more confused about what i am seeing

when nagios executes check_fping and gets a 2.5ms response I get a warning but perfdata shows a result which should be OK

but when I execute it manually i am getting an OK (both as nagios and as root despite my complaint about the few ms discrepancy)
Looking forward to seeing you all at #NagiosCon2019?
-Dedicated Lover of Nconf,PNP4Nagios and Nagvis
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_fping rta artificially high

Post by Box293 »

I could be wrong, but your warning of 2% and critical of 5% is the source of your problem.

THRESHOLD is <rta>,<pl>%% where <rta> is the round trip average travel time (ms)
which triggers a WARNING or CRITICAL state, and <pl> is the percentage of
packet loss to trigger an alarm state.

You are defining 5 packets with -n 5

1 packets is 20% (100/5 = 20)

Hence 2% or 5% are too small of values. Perhaps you need 20% and 40% or 40% and 60%.

As for speed, use check_icmp.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked