Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

Search on custom filed not working #674

Closed
yakirgb opened this issue Apr 2, 2017 · 4 comments
Closed

Search on custom filed not working #674

yakirgb opened this issue Apr 2, 2017 · 4 comments
Assignees
Labels
Milestone

Comments

@yakirgb
Copy link

yakirgb commented Apr 2, 2017

I created custom filed for event with key=env and value=environment name (env:production)
I see the filed in Sensu API and in uchiwa, for example:
~$ curl -s http://sensu-api.service.consul.tbl.com:4567/events/70e34.tbl.com/check_process | jq '.check.env'
"production"
but query of env:production in uchiwa search bar ( http://uchiwa:8080/#/events?q=env:production ) return 0 items

Expected Behavior

Query all events with key:value of env:production

Current Behavior

Query of env:production via search bar ( http://uchiwa:8080/#/events?q=env:production )
return 0 rows

Steps to Reproduce (for bugs)

  1. Create event with custom field
  2. Query on your field with http://uchiwa:8080/#/events?q=field:value

Context

We have multiple teams, and every team want to query and custom fields, for example: team name, env, OS, etc.

Your Environment

  • Uchiwa version used: 0.23.1
  • Sensu version used: 0.26.1
  • Operating System and version: CentOS 6.7
@cabecada
Copy link

cabecada commented Apr 12, 2017

same here.
it does not work for us, although it was working in 0.22

although the test passes?
https://github.com/sensu/uchiwa-web/blob/0.23.1/test/karma/filters-spec.js#L368

i guess https://github.com/sensu/uchiwa-web/blob/0.23.1/js/filters.js#L315
is the culprit :)
commenting out that continue, we get the desired key:value search

@palourde palourde added the Bug label Apr 12, 2017
@palourde palourde self-assigned this Apr 12, 2017
@palourde palourde added the ready label Apr 12, 2017
@palourde
Copy link
Contributor

Looks like this bug was introduced with https://github.com/sensu/uchiwa-web/pull/147 and only affects fields within check or client.

@palourde palourde removed the ready label Apr 12, 2017
@yakirgb
Copy link
Author

yakirgb commented Apr 12, 2017

@palourde but my version is 0.23.1, with your commit and it's still not working.

Our main problem is that we have many teams and a lot of events, each team want to see just alerts that related to itself, without alerts of other teams, i created filed with key of team and value of team name: DevOps / IT / R&D / DBA etc.
and it's not working well because i cannot query on team: devops .
Please advice.

@palourde
Copy link
Contributor

@yakirgb I just pushed the patch with https://github.com/sensu/uchiwa-web/pull/156. It will be available within the next release, which I hope to be able to release by tomorrow.

@palourde palourde added this to the 0.24.0 milestone Apr 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants