Merge ~woutervb/charm-graylog:master into ~graylog-charmers/charm-graylog:master

Proposed by Wouter van Bommel
Status: Merged
Merge reported by: Xav Paice
Merged at revision: 7907ba4702d5d4e4580e9d36509bb09604a0a10d
Proposed branch: ~woutervb/charm-graylog:master
Merge into: ~graylog-charmers/charm-graylog:master
Diff against target: 21 lines (+2/-1)
1 file modified
files/check_graylog_health.py (+2/-1)
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Canonical IS Reviewers Pending
Junien F Pending
Canonical IS Reviewers Pending
Review via email: mp+368739@code.launchpad.net

This proposal supersedes a proposal from 2019-05-17.

Commit message

Make an option to specify the lag-time

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote : Posted in a previous version of this proposal

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Tom Haddon (mthaddon) wrote : Posted in a previous version of this proposal

How would a charm operator use this option and/or be aware of it?

review: Needs Information
Revision history for this message
Junien F (axino) wrote : Posted in a previous version of this proposal

Just wanted to say that I'm +1 on the change from 1 day to 1 hour.

Revision history for this message
Tom Haddon (mthaddon) wrote : Posted in a previous version of this proposal

Looks good, but please fix the lint error before landing.

review: Approve
Revision history for this message
Junien F (axino) wrote : Posted in a previous version of this proposal

For the record, I don't agree that this should be a config option.

review: Disapprove
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Tom Haddon (mthaddon) wrote :

LGTM, but no need to split the line, per the comment.

review: Approve
Revision history for this message
Joe Guo (guoqiao) wrote : Posted in a previous version of this proposal

The current change is pretty simple now, looks good to me.

review: Approve
~woutervb/charm-graylog:master updated
d4d5efd... by Wouter van Bommel

Fix split of lines

Revision history for this message
Xav Paice (xavpaice) wrote :

Tested, lgtm, but merge has lint failures. Will adjust the commit for that.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/files/check_graylog_health.py b/files/check_graylog_health.py
2index 7fde420..d420347 100755
3--- a/files/check_graylog_health.py
4+++ b/files/check_graylog_health.py
5@@ -25,6 +25,7 @@ STATE_UNKNOWN = 3
6
7 OVERALL_STATE = STATE_OK
8
9+INDEX_LAG_HOURS = 1 # The amount of time we look back for indexing errors
10
11 def try_check(name, gapi_con, args, output):
12 global OVERALL_STATE
13@@ -86,7 +87,7 @@ def outstanding_notifications(gapi_con, args):
14
15
16 def indexer_failures(gapi_con, args):
17- since = datetime.datetime.utcnow() - datetime.timedelta(days=1)
18+ since = datetime.datetime.utcnow() - \ datetime.timedelta(hours=INDEX_LAG_HOURS)
19 failures = gapi_con.indexer_failures_count(since.isoformat())['count']
20 msg = 'Indexer failures: {}'.format(failures)
21 if failures == 0:

Subscribers

People subscribed via source and target branches