Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equals condition does not support Booleans #4637

Closed
alkuzad opened this issue Jul 10, 2017 · 2 comments
Closed

Equals condition does not support Booleans #4637

alkuzad opened this issue Jul 10, 2017 · 2 comments

Comments

@alkuzad
Copy link

alkuzad commented Jul 10, 2017

As continuation of forum topic: https://discuss.elastic.co/t/drop-event-when-up-is-false/92046

Equals filter does not support Booleans - it makes using Hearbeat < 6.0 harder as user has to check for same conditions as provided in check instead of simply checking up status for filtering.

Reproduce:

  1. Save configuration
heartbeat.monitors:
- type: http
  schedule: '@every 2m'
  urls: ["http://service.example.com"]
  check.response.status: 200
heartbeat.scheduler:
  limit: 25
output.logstash:
  hosts: ["logstash.example.com:5044"]
processors:
 - drop_event:
     when:
      equals: 
       up: true
  1. Run configuration ./heartbeat -path.config $PWD -c heartbeat.test.yml -v -e
  2. Output:
2017/07/10 08:25:07.635778 beat.go:285: INFO Home path: [/home/sweet/home/heartbeat-5.5.0-linux-x86_64] Config path: [/home/sweet/home/heartbeat-5.5.0-linux-x86_64] Data path: [/home/sweet/home/heartbeat-5.5.0-linux-x86_64/data] Logs path: [/home/sweet/home/heartbeat-5.5.0-linux-x86_64/logs]
2017/07/10 08:25:07.635807 beat.go:186: INFO Setup Beat: heartbeat; Version: 5.5.0
2017/07/10 08:25:07.635855 condition.go:455: ERR Failed to initialize lookup condition: unknown type bool passed to extractString
2017/07/10 08:25:07.635867 beat.go:339: CRIT Exiting: error initializing processors: unknown type bool passed to extractString
Exiting: error initializing processors: unknown type bool passed to extractString

Heartbeat version: 5.4.3, 5.5.0

@ewgRa
Copy link
Contributor

ewgRa commented Feb 5, 2018

Possible fixed in PR #5954, and #5659 is describe same problem as here.

@ruflin
Copy link
Member

ruflin commented Feb 12, 2018

Closing this as #5954 was merged.

@ruflin ruflin closed this as completed Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants