Skip to content

Commit

Permalink
Fix riemann-nginx checks selection
Browse files Browse the repository at this point in the history
The `riemann-nginx` tool accept a `--checks` parameter since it was
introduced in #33, but this parameter was never used to filter events.

Make sure we only return events that match the provided checks.
  • Loading branch information
smortex committed May 30, 2024
1 parent d2f64b3 commit a2814bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/riemann/tools/nginx_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def tick
values = @re.match(response).to_a[1, 7].map(&:to_i)

@keys.zip(values).each do |key, value|
next unless opts[:checks].include?(key)

report({
service: "nginx #{key}",
metric: value,
Expand Down

0 comments on commit a2814bc

Please sign in to comment.