Merge ~peppepetra/charm-nagios:lp1987039 into charm-nagios:master

Proposed by Giuseppe Petralia
Status: Merged
Approved by: Eric Chen
Approved revision: 614541ed38000d0c834ba3c3309e9e354aa34532
Merged at revision: 51390f6acb7ab326e74e01aa149abce42a38a446
Proposed branch: ~peppepetra/charm-nagios:lp1987039
Merge into: charm-nagios:master
Diff against target: 43 lines (+4/-1)
3 files modified
files/pagerduty_nagios.py (+2/-1)
tests/functional/conftest.py (+1/-0)
tests/functional/test_config.py (+1/-0)
Reviewer Review Type Date Requested Status
Eric Chen Approve
Robert Gildein Approve
BootStack Reviewers Pending
Review via email: mp+428598@code.launchpad.net

Commit message

Allow PD to accept pd_nagios_object=host events

Closes-Bug: 1987039

To post a comment you must log in.
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
Robert Gildein (rgildein) wrote :

LGTM

The lint and unit tests are not working, but it's not related to these changes.

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

Change must be approved by a member of one of the following teams:
 - bootstack-reviewers
Setting status to needs review.

Revision history for this message
Eric Chen (eric-chen) :
review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 51390f6acb7ab326e74e01aa149abce42a38a446

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/files/pagerduty_nagios.py b/files/pagerduty_nagios.py
2index 1dfe673..1f41438 100755
3--- a/files/pagerduty_nagios.py
4+++ b/files/pagerduty_nagios.py
5@@ -189,6 +189,7 @@ def configure_logging(verbose):
6 REQUIRED_KEYS = [
7 "CONTACTPAGER", # The nagios key is provided here.
8 "HOSTNAME",
9+ "HOSTSTATE", # LP#1987039
10 "NOTIFICATIONTYPE", # Value is RECOVERY or PROBLEM.
11 # PROBLEM creates alerts, RECOVERY clears them.
12 "SERVICESTATE",
13@@ -317,4 +318,4 @@ def get_queue_from_dir(args):
14
15
16 if __name__ == "__main__":
17- main()
18+ main()
19\ No newline at end of file
20diff --git a/tests/functional/conftest.py b/tests/functional/conftest.py
21index 7bf1591..937f496 100644
22--- a/tests/functional/conftest.py
23+++ b/tests/functional/conftest.py
24@@ -11,6 +11,7 @@ from juju.errors import JujuError
25 from juju.model import Model
26
27 import pytest
28+
29 import pytest_asyncio
30
31 STAT_FILE = "python3 -c \"import json; import os; s=os.stat('%s'); print(json.dumps({'uid': s.st_uid, 'gid': s.st_gid, 'mode': oct(s.st_mode), 'size': s.st_size}))\"" # noqa: E501
32diff --git a/tests/functional/test_config.py b/tests/functional/test_config.py
33index d8a780e..9f2259b 100644
34--- a/tests/functional/test_config.py
35+++ b/tests/functional/test_config.py
36@@ -1,6 +1,7 @@
37 from async_generator import asynccontextmanager
38
39 import pytest
40+
41 import pytest_asyncio
42
43 import requests

Subscribers

People subscribed via source and target branches

to all changes: