Look at the first reply:
For load5 he uses two comma because it is enclosed beetwen
them /, ([0-9.]+),/
and for the last the $ which means 'end of line'.
You use the same regex for the load15 than for the load5, it
is the result, of course ;-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: NO
I have managed to pull the first 2 as such :
"output:load1:/([0-9.]+)/" "output:load5:/, ([0-9.]+)/"
"output:load15:/, ([0-9.]+)/"
but that 3rd one just matches the second one.
Any help appreciated.
Logged In: NO
I would also as for some help on the following one:
OUTPUT="NTP OK: Offset -0.000033 secs, jitter 0.201 msec,
peer is stratum 3"
OUTPUT="NTP OK: Offset 0.000020 secs, jitter 0.070 msec,
peer is stratum 3"
Sometimes the offset is negative, but the following does not
pic it up:
"output:offset:/Offset ([0-9.]+) secs/"
How can I include negative numbers ?
And, once this is solved, can these regexp be added as
examples in the .conf ?
Logged In: NO
I would also as for some help on the following one:
OUTPUT="NTP OK: Offset -0.000033 secs, jitter 0.201 msec,
peer is stratum 3"
OUTPUT="NTP OK: Offset 0.000020 secs, jitter 0.070 msec,
peer is stratum 3"
Sometimes the offset is negative, but the following does not
pic it up:
"output:offset:/Offset ([0-9.]+) secs/"
How can I include negative numbers ?
And, once this is solved, can these regexp be added as
examples in the .conf ?
Logged In: NO
It took me a while, but here is the answer if any one is
interested:
ValueRegexTemplate ntp_offset_jitter
"output:offset:/Offset (-[0-9.]+)/" "output:jitter:/jitter
([0-9.]+) msec/
ValueRegexTemplate load
"output:load1:/([0-9.]+)/" "output:load5:/, ([0-9.]+),/"
"output:load15:/, ([0-9.]+)$/"
The formatting might be bad ... in here, but this works for me.
Logged In: YES
user_id=13623
Look at the first reply:
For load5 he uses two comma because it is enclosed beetwen
them /, ([0-9.]+),/
and for the last the $ which means 'end of line'.
You use the same regex for the load15 than for the load5, it
is the result, of course ;-)