0

I am currently getting the following output while running check_http:

HTTP OK: HTTP/1.1 200 OK - 6654 bytes in 0.071 second response time |time=0.070809s;200.000000;1000.000000;0.000000 size=6654B;;;0

How can I get it as :

HTTP OK: HTTP/1.1 200 OK - 6654 bytes in 0.071 second response time |time=0.070809s;200.000000;1000.000000;0.000000

I know I can achieve this by writing a script using awk's and sed's.

But I want to know if there is a way to tweak the output as per the requirement.

Khaled
  • 35,688
  • 8
  • 69
  • 98
Ajov Crowe
  • 133
  • 1
  • 5
  • 12
  • Why do you want to remove that? Everything after the pipe get's filtered under performance data in nagios. – Danie Apr 15 '13 at 13:14
  • What's your *real* question? I've done some strange things with nagios plugins over the years, but I can't think of a reason why you'd possibly want to do this. – Keith Apr 16 '13 at 03:25
  • @Keith: The reason for this requirement is because I am having issues in plotting graphs (NaN) in Icinga. And the solution seems to be by having it in the above requested format.. This is just my view of things, which can be wrong. – Ajov Crowe Apr 16 '13 at 06:03
  • You should ask that question, then. This is an XY Problem. – Keith Apr 17 '13 at 20:05

1 Answers1

0

As check_http is ELF binary and it seems there is no option to disable "size=..." or even whole perf output, I think there are two solutions to get rid of it:

  • creating the wrapper script which you already mentioned about
  • editing and recompiling sources

The latter is probably a way better approach in terms of performance. The more servers you monitor, the more you should take it into account.

Mike
  • 598
  • 7
  • 16