check_systemd 2.0.7__tar.gz → 2.0.9__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: check_systemd
3
- Version: 2.0.7
3
+ Version: 2.0.9
4
4
  Summary: Nagios / Icinga monitoring plugin to check systemd for failed units.
5
5
  Home-page: https://github.com/Josef-Friedrich/check_systemd
6
6
  Author: Josef Friedrich
@@ -29,7 +29,8 @@ Description: [![pypi.org](http://img.shields.io/pypi/v/check_systemd.svg)](https
29
29
  ## Command line interface
30
30
 
31
31
  ```
32
- usage: nosetests [-h] [-c SECONDS] [-e UNIT | -u UNIT] [-v] [-V] [-w SECONDS]
32
+ usage: check_systemd [-h] [-c SECONDS] [-e UNIT | -u UNIT] [-v] [-V]
33
+ [-w SECONDS]
33
34
 
34
35
  Copyright (c) 2014-18 Andrea Briganti a.k.a 'Kbyte' <kbytesys@gmail.com>
35
36
  Copyright (c) 2019 Josef Friedrich <josef@friedrich.rocks>
@@ -44,7 +45,7 @@ Description: [![pypi.org](http://img.shields.io/pypi/v/check_systemd.svg)](https
44
45
  Exclude a systemd unit from the checks. This option
45
46
  can be applied multiple times. For example: -e mnt-
46
47
  data.mount -e task.service.
47
- -u UNIT, --unit UNIT Name of the systemd unit that is beeing tested.
48
+ -u UNIT, --unit UNIT Name of the systemd unit that is being tested.
48
49
  -v, --verbose Increase output verbosity (use up to 3 times).
49
50
  -V, --version show program's version number and exit
50
51
  -w SECONDS, --warning SECONDS
@@ -64,7 +65,7 @@ Description: [![pypi.org](http://img.shields.io/pypi/v/check_systemd.svg)](https
64
65
 
65
66
  * https://github.com/Josef-Friedrich/check_systemd
66
67
  * https://exchange.icinga.com/joseffriedrich/check_systemd
67
- * https://exchange.nagios.org/directory/Plugins/System-Metrics/Processes/check_systemd
68
+ * https://exchange.nagios.org/directory/Plugins/System-Metrics/Processes/check_systemd/details
68
69
 
69
70
  ## Testing
70
71
 
@@ -72,6 +73,7 @@ Description: [![pypi.org](http://img.shields.io/pypi/v/check_systemd.svg)](https
72
73
  pip3 install tox
73
74
  tox
74
75
  ```
76
+
75
77
  Keywords: nagios,systemd
76
78
  Platform: UNKNOWN
77
79
  Classifier: Development Status :: 5 - Production/Stable
@@ -21,7 +21,8 @@ pip3 install check_systemd
21
21
  ## Command line interface
22
22
 
23
23
  ```
24
- usage: nosetests [-h] [-c SECONDS] [-e UNIT | -u UNIT] [-v] [-V] [-w SECONDS]
24
+ usage: check_systemd [-h] [-c SECONDS] [-e UNIT | -u UNIT] [-v] [-V]
25
+ [-w SECONDS]
25
26
 
26
27
  Copyright (c) 2014-18 Andrea Briganti a.k.a 'Kbyte' <kbytesys@gmail.com>
27
28
  Copyright (c) 2019 Josef Friedrich <josef@friedrich.rocks>
@@ -36,7 +37,7 @@ optional arguments:
36
37
  Exclude a systemd unit from the checks. This option
37
38
  can be applied multiple times. For example: -e mnt-
38
39
  data.mount -e task.service.
39
- -u UNIT, --unit UNIT Name of the systemd unit that is beeing tested.
40
+ -u UNIT, --unit UNIT Name of the systemd unit that is being tested.
40
41
  -v, --verbose Increase output verbosity (use up to 3 times).
41
42
  -V, --version show program's version number and exit
42
43
  -w SECONDS, --warning SECONDS
@@ -56,11 +57,11 @@ Performance data:
56
57
 
57
58
  * https://github.com/Josef-Friedrich/check_systemd
58
59
  * https://exchange.icinga.com/joseffriedrich/check_systemd
59
- * https://exchange.nagios.org/directory/Plugins/System-Metrics/Processes/check_systemd
60
+ * https://exchange.nagios.org/directory/Plugins/System-Metrics/Processes/check_systemd/details
60
61
 
61
62
  ## Testing
62
63
 
63
64
  ```
64
65
  pip3 install tox
65
66
  tox
66
- ```
67
+ ```
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: check-systemd
3
- Version: 2.0.7
3
+ Version: 2.0.9
4
4
  Summary: Nagios / Icinga monitoring plugin to check systemd for failed units.
5
5
  Home-page: https://github.com/Josef-Friedrich/check_systemd
6
6
  Author: Josef Friedrich
@@ -29,7 +29,8 @@ Description: [![pypi.org](http://img.shields.io/pypi/v/check_systemd.svg)](https
29
29
  ## Command line interface
30
30
 
31
31
  ```
32
- usage: nosetests [-h] [-c SECONDS] [-e UNIT | -u UNIT] [-v] [-V] [-w SECONDS]
32
+ usage: check_systemd [-h] [-c SECONDS] [-e UNIT | -u UNIT] [-v] [-V]
33
+ [-w SECONDS]
33
34
 
34
35
  Copyright (c) 2014-18 Andrea Briganti a.k.a 'Kbyte' <kbytesys@gmail.com>
35
36
  Copyright (c) 2019 Josef Friedrich <josef@friedrich.rocks>
@@ -44,7 +45,7 @@ Description: [![pypi.org](http://img.shields.io/pypi/v/check_systemd.svg)](https
44
45
  Exclude a systemd unit from the checks. This option
45
46
  can be applied multiple times. For example: -e mnt-
46
47
  data.mount -e task.service.
47
- -u UNIT, --unit UNIT Name of the systemd unit that is beeing tested.
48
+ -u UNIT, --unit UNIT Name of the systemd unit that is being tested.
48
49
  -v, --verbose Increase output verbosity (use up to 3 times).
49
50
  -V, --version show program's version number and exit
50
51
  -w SECONDS, --warning SECONDS
@@ -64,7 +65,7 @@ Description: [![pypi.org](http://img.shields.io/pypi/v/check_systemd.svg)](https
64
65
 
65
66
  * https://github.com/Josef-Friedrich/check_systemd
66
67
  * https://exchange.icinga.com/joseffriedrich/check_systemd
67
- * https://exchange.nagios.org/directory/Plugins/System-Metrics/Processes/check_systemd
68
+ * https://exchange.nagios.org/directory/Plugins/System-Metrics/Processes/check_systemd/details
68
69
 
69
70
  ## Testing
70
71
 
@@ -72,6 +73,7 @@ Description: [![pypi.org](http://img.shields.io/pypi/v/check_systemd.svg)](https
72
73
  pip3 install tox
73
74
  tox
74
75
  ```
76
+
75
77
  Keywords: nagios,systemd
76
78
  Platform: UNKNOWN
77
79
  Classifier: Development Status :: 5 - Production/Stable
@@ -15,7 +15,7 @@ import re
15
15
  import nagiosplugin
16
16
  from nagiosplugin import Metric
17
17
 
18
- __version__ = '2.0.7'
18
+ __version__ = '2.0.9'
19
19
 
20
20
 
21
21
  class SystemdctlListUnitsResource(nagiosplugin.Resource):
@@ -103,6 +103,7 @@ def format_timespan_to_seconds(fmt_timespan):
103
103
  'h': 60 * 60,
104
104
  'min': 60,
105
105
  's': 1,
106
+ 'ms': 0.001,
106
107
  }
107
108
  result = 0
108
109
  for span in fmt_timespan.split():
@@ -311,7 +312,7 @@ def get_argparser():
311
312
  '-u', '--unit',
312
313
  type=str,
313
314
  dest='unit',
314
- help='Name of the systemd unit that is beeing tested.',
315
+ help='Name of the systemd unit that is being tested.',
315
316
  )
316
317
 
317
318
  parser.add_argument(
@@ -349,8 +350,13 @@ def main():
349
350
  objects += [
350
351
  SystemdctlListUnitsResource(excludes=args.exclude),
351
352
  PerformanceDataContext(),
352
- SystemdAnalyseResource(),
353
+
353
354
  ]
355
+ analyse = subprocess.run(['systemd-analyze'], stderr=subprocess.PIPE,
356
+ stdin=subprocess.PIPE, stdout=subprocess.PIPE)
357
+ # systemd-analyze: boot not finshed exists with 1
358
+ if analyse.returncode == 0:
359
+ objects.append(SystemdAnalyseResource())
354
360
 
355
361
  objects += [
356
362
  UnitContext(),
File without changes
File without changes
File without changes
File without changes