moira-python-client 4.0.2__tar.gz → 4.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/CHANGELOG.md +51 -0
  2. {moira-python-client-4.0.2/moira_python_client.egg-info → moira-python-client-4.1.1}/PKG-INFO +2 -1
  3. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_client/models/trigger.py +27 -15
  4. {moira-python-client-4.0.2 → moira-python-client-4.1.1/moira_python_client.egg-info}/PKG-INFO +2 -1
  5. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/setup.py +2 -1
  6. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/LICENSE +0 -0
  7. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/MANIFEST.in +0 -0
  8. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/README.md +0 -0
  9. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_client/__init__.py +0 -0
  10. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_client/client.py +0 -0
  11. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_client/models/__init__.py +0 -0
  12. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_client/models/base.py +0 -0
  13. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_client/models/config.py +0 -0
  14. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_client/models/contact.py +0 -0
  15. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_client/models/event.py +0 -0
  16. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_client/models/health.py +0 -0
  17. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_client/models/notification.py +0 -0
  18. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_client/models/pattern.py +0 -0
  19. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_client/models/subscription.py +0 -0
  20. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_client/models/tag.py +0 -0
  21. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_client/models/user.py +0 -0
  22. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_client/moira.py +0 -0
  23. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_python_client.egg-info/SOURCES.txt +0 -0
  24. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_python_client.egg-info/dependency_links.txt +0 -0
  25. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_python_client.egg-info/requires.txt +0 -0
  26. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/moira_python_client.egg-info/top_level.txt +0 -0
  27. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/requirements.txt +0 -0
  28. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/setup.cfg +0 -0
  29. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/test-requirements.txt +0 -0
  30. {moira-python-client-4.0.2 → moira-python-client-4.1.1}/tests/test_client.py +0 -0
@@ -1,3 +1,54 @@
1
+ # 4.1.0
2
+
3
+ Add support for prometheus trigger creation.
4
+
5
+ Now you canuse `trigger_source` field in api that overrides `is_remote` field
6
+
7
+ # 4.0.2
8
+
9
+ Fix typo
10
+
11
+ # 4.0.1
12
+
13
+ Small refactor to satisfy users that use Python < 3.6
14
+
15
+ # 4.0.0
16
+
17
+ Make validation for Python-client like validation in Web Moira. It is need to make valiation right and unified for all Moira client sides.
18
+
19
+ [Use new validation for creating/updating triggers](https://github.com/moira-alert/python-moira-client/commit/3edb4c720d4b80ae8a4bd6117cb2b9cf0c5bec16)
20
+
21
+ [Return response object instead of string ID](https://github.com/moira-alert/python-moira-client/commit/5f2bccdd11d6ef6a2a548b9c7072037ebf0445c0)
22
+
23
+ # 3.0.0
24
+
25
+ ‼️ Remove underscore-prefixed fields that contained scheduling time settings:
26
+
27
+ - `_start_hour`
28
+ - `_start_minute`
29
+ - `_end_hour`
30
+ - `_end_minute`
31
+ - `_timezone_offset`
32
+ - `disabled_days`
33
+
34
+ Because they were duplicates of data from sched field.
35
+
36
+ Please use sched field for scheduling settings instead.
37
+
38
+ # 2.6.1
39
+
40
+ - Fix missed disabled_days
41
+ - Push only tags create
42
+
43
+ # 2.6.0
44
+ - Add "/setMaintenance" methods #8
45
+ - Set login equal to auth_user by default if last one is specified #9
46
+ - Add "/config" methods #10
47
+ - Add support for changing moira notification state #16
48
+
49
+ # 2.5.1
50
+ - Added ability to subscribe for all triggers without specifying tags (moira-alert/moira#236).
51
+
1
52
  # 2.4
2
53
 
3
54
  - Python Moira client is now MIT licensed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: moira-python-client
3
- Version: 4.0.2
3
+ Version: 4.1.1
4
4
  Summary: Client for Moira - Alerting system based on Graphite data
5
5
  Home-page: https://github.com/moira-alert/python-moira-client
6
6
  Author: Alexander Lukyanchenko
@@ -19,6 +19,7 @@ Classifier: Topic :: Utilities
19
19
  Classifier: Topic :: System :: Monitoring
20
20
  Classifier: License :: OSI Approved :: MIT License
21
21
  License-File: LICENSE
22
+ Requires-Dist: requests>=2.4.3
22
23
 
23
24
 
24
25
  Moira is a real-time alerting tool, based on Graphite data.
@@ -12,6 +12,9 @@ RISING_TRIGGER = 'rising'
12
12
  FALLING_TRIGGER = 'falling'
13
13
  EXPRESSION_TRIGGER = 'expression'
14
14
 
15
+ GRAPHITE_LOCAL = 'graphite_local'
16
+ GRAPHITE_REMOTE = 'graphite_remote'
17
+ PROMETHEUS_REMOTE = 'prometheus_remote'
15
18
 
16
19
  class Trigger(Base):
17
20
  QUERY_PARAM_VALIDATE_FLAG = 'validate'
@@ -33,6 +36,7 @@ class Trigger(Base):
33
36
  is_remote=False,
34
37
  mute_new_metrics=False,
35
38
  alone_metrics=None,
39
+ trigger_source=None,
36
40
  **kwargs):
37
41
  """
38
42
 
@@ -52,6 +56,7 @@ class Trigger(Base):
52
56
  :param mute_new_metrics: bool mute new metrics
53
57
  :param alone_metrics: dict with targets of alone metrics
54
58
  :param kwargs: additional parameters
59
+ :param trigger_source: str specify trigger source, overrides is_remote
55
60
  """
56
61
  self._client = client
57
62
 
@@ -69,6 +74,7 @@ class Trigger(Base):
69
74
  self.trigger_type = self.resolve_type(trigger_type)
70
75
 
71
76
  self.is_remote = is_remote
77
+ self.trigger_source = trigger_source
72
78
  self.mute_new_metrics = mute_new_metrics
73
79
  self.alone_metrics = alone_metrics
74
80
 
@@ -145,6 +151,9 @@ class Trigger(Base):
145
151
  'alone_metrics': self.alone_metrics,
146
152
  }
147
153
 
154
+ if self.trigger_source:
155
+ data['trigger_source'] = self.trigger_source
156
+
148
157
  if trigger_id:
149
158
  data['id'] = trigger_id
150
159
  api_response = TriggerManager(self._client).fetch_by_id(trigger_id)
@@ -519,6 +528,7 @@ class TriggerManager:
519
528
  is_remote=False,
520
529
  mute_new_metrics=False,
521
530
  alone_metrics=None,
531
+ trigger_source=None,
522
532
  **kwargs
523
533
  ):
524
534
  """
@@ -538,24 +548,26 @@ class TriggerManager:
538
548
  :param mute_new_metrics: bool mute new metrics
539
549
  :param alone_metrics: dict with targets of alone metrics
540
550
  :param kwargs: additional trigger params
551
+ :param trigger_source: str specify trigger source, overrides is_remote
541
552
  :return: Trigger
542
553
  """
543
554
  return Trigger(
544
- self._client,
545
- name,
546
- tags,
547
- targets,
548
- warn_value,
549
- error_value,
550
- desc,
551
- ttl,
552
- ttl_state,
553
- sched,
554
- expression,
555
- trigger_type,
556
- is_remote,
557
- mute_new_metrics,
558
- alone_metrics,
555
+ client=self._client,
556
+ name=name,
557
+ tags=tags,
558
+ targets=targets,
559
+ warn_value=warn_value,
560
+ error_value=error_value,
561
+ desc=desc,
562
+ ttl=ttl,
563
+ ttl_state=ttl_state,
564
+ sched=sched,
565
+ expression=expression,
566
+ trigger_type=trigger_type,
567
+ is_remote=is_remote,
568
+ mute_new_metrics=mute_new_metrics,
569
+ alone_metrics=alone_metrics,
570
+ trigger_source=trigger_source,
559
571
  **kwargs
560
572
  )
561
573
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: moira-python-client
3
- Version: 4.0.2
3
+ Version: 4.1.1
4
4
  Summary: Client for Moira - Alerting system based on Graphite data
5
5
  Home-page: https://github.com/moira-alert/python-moira-client
6
6
  Author: Alexander Lukyanchenko
@@ -19,6 +19,7 @@ Classifier: Topic :: Utilities
19
19
  Classifier: Topic :: System :: Monitoring
20
20
  Classifier: License :: OSI Approved :: MIT License
21
21
  License-File: LICENSE
22
+ Requires-Dist: requests>=2.4.3
22
23
 
23
24
 
24
25
  Moira is a real-time alerting tool, based on Graphite data.
@@ -1,11 +1,12 @@
1
1
  from distutils.core import setup
2
+ import os
2
3
 
3
4
  with open('requirements.txt') as f:
4
5
  required = f.read().splitlines()
5
6
 
6
7
  setup(
7
8
  name='moira-python-client',
8
- version='4.0.2',
9
+ version=os.environ['PYTHON_MOIRA_CLIENT_VERSION'],
9
10
  description='Client for Moira - Alerting system based on Graphite data',
10
11
  keywords='moira monitoring client metrics alerting',
11
12
  long_description="""