Hi,
I am using the check_http plugin to monitor a web site’s performance and store the result in a RRD database.
My configuration is : FAN 2.0 (Nagios 3.0.6, Centreon 2.0.2).
I get the following output at the command line : HTTP OK: HTTP/1.1 200 OK - 20377 bytes in 0.076 second response time |time=0.076264s;;;0.000000 size=20377B;;;0
The problem is that only the “size” information (unuseful) is displayed on the graph and not the “time” one.
How can I keep track of only the second one ?
Thx in advance for your help
Misterpo,
You didn’t provide much information. I’m fairly certain that check_http will monitor a web site’s performance, but it does not store the result in a RRD database. Are you using Nagiosgrapher?
Nagiosgrapher has configuration files that dictate what it will pull out of the data stream it receives from Nagios. The first thing to check is that Nagios is configured correctly to pass the data as you would like or think to Nagiosgrapher. You should be able to strace the Nagiosgrapher process and verify it’s receiving the data correctly. Then you should check the configuration of Nagiosgrapher, pay close attention to where the '()'s are placed in it’s Regular Expressions. My guess is you will need to make the following change:
From:
time=[0-9.]+s;;;0.000000 size=([0-9]+)B;;;0
To:
time=([0-9.]+)s;;;0.000000 size=[0-9]+B;;;0
Also note that RRD need(s) integers, so Nagiosgrapher will need to take care and apply some for of scale to the data… say Seconds to Nanoseconds(* 1000000). You should be aware of the accuracy of your computers clock at such short intervals, when making these types of measurements I find it’s better to see how many iterations can be made over 3 seconds, then do the math to determine how long on average one iteration took.
I know Nagios is not particularly suited to this task, so perhaps what you should do is ignore any values smaller then a given limit. Say 300 Microseconds(0.3 Seconds).