You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When webhook_format:json_bulk or json_lines is used there are cases in which matches and metric creation are not working correctly.
Additionally the whole request body is getting logged in
level=warning msg="Unable to find selector path" post_body="<request body>" webhook_json_selector=.requesterDN
What did you expect to see? grok_exporter_lines_total{status="ignored"} = 0 # discussable if it this metric should be increased if there is no JSON selector found grok_exporter_lines_total{status="matched"} = 1
What did you see instead? Under which circumstances? grok_exporter_lines_total{status="ignored"} = 0 grok_exporter_lines_total{status="matched"} = 0
What did you expect to see? grok_exporter_lines_total{status="ignored"} = 0 grok_exporter_lines_total{status="matched"} = 1
What did you see instead? Under which circumstances? grok_exporter_lines_total{status="ignored"} = 0 # discussable if it this metric should be increased if there is no JSON selector found grok_exporter_lines_total{status="matched"} = 1
Metrics are correctly increased in this case.
Same log as for Case 2 but correct increased metrics.
The text was updated successfully, but these errors were encountered:
thomas315
changed the title
JSON selector not found leads to excessive logging and incorrect metric generation
Bug: JSON selector not found leads to excessive logging and incorrect metric generation
Jun 25, 2021
When
webhook_format:
json_bulk
orjson_lines
is used there are cases in which matches and metric creation are not working correctly.Additionally the whole request body is getting logged in
Grok exporter version:
v1.0.0.RC5
configuration file:
Case 1:
What did you do?
or
What did you expect to see?
grok_exporter_lines_total{status="ignored"} = 1
grok_exporter_lines_total{status="matched"} = 1
What did you see instead? Under which circumstances?
this works as expected!
Case 2:
What did you do?
What did you expect to see?
grok_exporter_lines_total{status="ignored"} = 0
# discussable if it this metric should be increased if there is no JSON selector foundgrok_exporter_lines_total{status="matched"} = 1
What did you see instead? Under which circumstances?
grok_exporter_lines_total{status="ignored"} = 0
grok_exporter_lines_total{status="matched"} = 0
Log:
Case 3:
What did you do?
What did you expect to see?
grok_exporter_lines_total{status="ignored"} = 0
grok_exporter_lines_total{status="matched"} = 1
What did you see instead? Under which circumstances?
grok_exporter_lines_total{status="ignored"} = 0
# discussable if it this metric should be increased if there is no JSON selector foundgrok_exporter_lines_total{status="matched"} = 1
Metrics are correctly increased in this case.
Logs:
Same log as for Case 2 but correct increased metrics.
The text was updated successfully, but these errors were encountered: