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

Implement last ok in events #1034

Closed
amdprophet opened this issue Feb 16, 2018 · 2 comments
Closed

Implement last ok in events #1034

amdprophet opened this issue Feb 16, 2018 · 2 comments

Comments

@amdprophet
Copy link
Member

Add a last_ok field to events that will get updated with a timestamp every time an event with an exit status of 0 is received by a backend.

Sensu 1.x implementation: https://github.com/sensu/sensu/blob/master/lib/sensu/server/process.rb#L584-L586

@zbintliff
Copy link
Contributor

I imagine the best place for this is: https://github.com/sensu/sensu-go/blob/master/backend/eventd/flapping.go#L27

If so, I may try to take a stab later today

@palourde
Copy link
Contributor

Hi @zbintliff,

That's definitively the right place! If you have any question or need assistance with this, don't hesitate to join us in our Community Slack #sensu2 channel.

Thanks, this could really be an awesome functionality to add!

zbintliff added a commit to zbintliff/sensu-go that referenced this issue Feb 21, 2018
When Event's status is 0 set LastOk to the timestamp of the event

Signed-off-by: Zach Bintliff <zbintliff@gmail.com>
zbintliff added a commit to zbintliff/sensu-go that referenced this issue Feb 21, 2018
When Event's status is 0 set LastOk to the timestamp of the event

Signed-off-by: Zach Bintliff <zbintliff@gmail.com>
zbintliff added a commit to zbintliff/sensu-go that referenced this issue Feb 21, 2018
When Event's status is 0 set LastOk to the timestamp of the event

Signed-off-by: Zach Bintliff <zbintliff@gmail.com>
zbintliff added a commit to zbintliff/sensu-go that referenced this issue Feb 23, 2018
When Event's status is 0 set LastOk to the timestamp of the event

Signed-off-by: Zach Bintliff <zbintliff@gmail.com>
zbintliff added a commit to zbintliff/sensu-go that referenced this issue Feb 23, 2018
When a Check's status is 0 set LastOk to the timestamp of the event

Signed-off-by: Zach Bintliff <zbintliff@gmail.com>
grepory pushed a commit that referenced this issue Feb 23, 2018
When a Check's status is 0 set LastOk to the timestamp of the event

Signed-off-by: Zach Bintliff <zbintliff@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants