check_systemd 2.0.3__tar.gz → 2.0.4__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.
- {check_systemd-2.0.3 → check_systemd-2.0.4}/PKG-INFO +12 -1
- {check_systemd-2.0.3 → check_systemd-2.0.4}/README.md +11 -0
- {check_systemd-2.0.3 → check_systemd-2.0.4}/check_systemd.egg-info/PKG-INFO +12 -1
- {check_systemd-2.0.3 → check_systemd-2.0.4}/check_systemd.py +25 -5
- {check_systemd-2.0.3 → check_systemd-2.0.4}/LICENSE +0 -0
- {check_systemd-2.0.3 → check_systemd-2.0.4}/MANIFEST.in +0 -0
- {check_systemd-2.0.3 → check_systemd-2.0.4}/check_systemd.egg-info/SOURCES.txt +0 -0
- {check_systemd-2.0.3 → check_systemd-2.0.4}/check_systemd.egg-info/dependency_links.txt +0 -0
- {check_systemd-2.0.3 → check_systemd-2.0.4}/check_systemd.egg-info/entry_points.txt +0 -0
- {check_systemd-2.0.3 → check_systemd-2.0.4}/check_systemd.egg-info/requires.txt +0 -0
- {check_systemd-2.0.3 → check_systemd-2.0.4}/check_systemd.egg-info/top_level.txt +0 -0
- {check_systemd-2.0.3 → check_systemd-2.0.4}/setup.cfg +0 -0
- {check_systemd-2.0.3 → check_systemd-2.0.4}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: check_systemd
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.4
|
|
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
|
|
@@ -31,6 +31,9 @@ Description: [](https
|
|
|
31
31
|
```
|
|
32
32
|
usage: nosetests [-h] [-c SECONDS] [-e UNIT | -u UNIT] [-v] [-V] [-w SECONDS]
|
|
33
33
|
|
|
34
|
+
Copyright (c) 2014-18 Andrea Briganti a.k.a 'Kbyte' <kbytesys@gmail.com>
|
|
35
|
+
Copyright (c) 2019 Josef Friedrich <josef@friedrich.rocks>
|
|
36
|
+
|
|
34
37
|
Nagios / Icinga monitoring plugin to check systemd for failed units.
|
|
35
38
|
|
|
36
39
|
optional arguments:
|
|
@@ -47,6 +50,14 @@ Description: [](https
|
|
|
47
50
|
-w SECONDS, --warning SECONDS
|
|
48
51
|
Startup time in seconds to result in warning status.
|
|
49
52
|
|
|
53
|
+
Performance data:
|
|
54
|
+
- count_units
|
|
55
|
+
- startup_time
|
|
56
|
+
- units_activating
|
|
57
|
+
- units_active
|
|
58
|
+
- units_failed
|
|
59
|
+
- units_inactive
|
|
60
|
+
|
|
50
61
|
```
|
|
51
62
|
|
|
52
63
|
## Project pages
|
|
@@ -23,6 +23,9 @@ pip3 install check_systemd
|
|
|
23
23
|
```
|
|
24
24
|
usage: nosetests [-h] [-c SECONDS] [-e UNIT | -u UNIT] [-v] [-V] [-w SECONDS]
|
|
25
25
|
|
|
26
|
+
Copyright (c) 2014-18 Andrea Briganti a.k.a 'Kbyte' <kbytesys@gmail.com>
|
|
27
|
+
Copyright (c) 2019 Josef Friedrich <josef@friedrich.rocks>
|
|
28
|
+
|
|
26
29
|
Nagios / Icinga monitoring plugin to check systemd for failed units.
|
|
27
30
|
|
|
28
31
|
optional arguments:
|
|
@@ -39,6 +42,14 @@ optional arguments:
|
|
|
39
42
|
-w SECONDS, --warning SECONDS
|
|
40
43
|
Startup time in seconds to result in warning status.
|
|
41
44
|
|
|
45
|
+
Performance data:
|
|
46
|
+
- count_units
|
|
47
|
+
- startup_time
|
|
48
|
+
- units_activating
|
|
49
|
+
- units_active
|
|
50
|
+
- units_failed
|
|
51
|
+
- units_inactive
|
|
52
|
+
|
|
42
53
|
```
|
|
43
54
|
|
|
44
55
|
## Project pages
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: check-systemd
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.4
|
|
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
|
|
@@ -31,6 +31,9 @@ Description: [](https
|
|
|
31
31
|
```
|
|
32
32
|
usage: nosetests [-h] [-c SECONDS] [-e UNIT | -u UNIT] [-v] [-V] [-w SECONDS]
|
|
33
33
|
|
|
34
|
+
Copyright (c) 2014-18 Andrea Briganti a.k.a 'Kbyte' <kbytesys@gmail.com>
|
|
35
|
+
Copyright (c) 2019 Josef Friedrich <josef@friedrich.rocks>
|
|
36
|
+
|
|
34
37
|
Nagios / Icinga monitoring plugin to check systemd for failed units.
|
|
35
38
|
|
|
36
39
|
optional arguments:
|
|
@@ -47,6 +50,14 @@ Description: [](https
|
|
|
47
50
|
-w SECONDS, --warning SECONDS
|
|
48
51
|
Startup time in seconds to result in warning status.
|
|
49
52
|
|
|
53
|
+
Performance data:
|
|
54
|
+
- count_units
|
|
55
|
+
- startup_time
|
|
56
|
+
- units_activating
|
|
57
|
+
- units_active
|
|
58
|
+
- units_failed
|
|
59
|
+
- units_inactive
|
|
60
|
+
|
|
50
61
|
```
|
|
51
62
|
|
|
52
63
|
## Project pages
|
|
@@ -15,7 +15,7 @@ import re
|
|
|
15
15
|
import nagiosplugin
|
|
16
16
|
from nagiosplugin import Metric
|
|
17
17
|
|
|
18
|
-
__version__ = '2.0.
|
|
18
|
+
__version__ = '2.0.4'
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class SystemdctlListUnitsResource(nagiosplugin.Resource):
|
|
@@ -136,10 +136,18 @@ class SystemdAnalyseResource(nagiosplugin.Resource):
|
|
|
136
136
|
raise nagiosplugin.CheckError(stderr)
|
|
137
137
|
|
|
138
138
|
if stdout:
|
|
139
|
+
stdout = stdout.decode('utf-8')
|
|
140
|
+
# First line:
|
|
141
|
+
# Startup finished in 1.672s (kernel) + 21.378s (userspace) =
|
|
142
|
+
# 23.050s
|
|
143
|
+
|
|
144
|
+
# On raspian no second line
|
|
139
145
|
# Second line:
|
|
140
146
|
# graphical.target reached after 1min 2.154s in userspace
|
|
141
|
-
match = re.search(r'reached after (.+) in userspace',
|
|
142
|
-
|
|
147
|
+
match = re.search(r'reached after (.+) in userspace', stdout)
|
|
148
|
+
|
|
149
|
+
if not match:
|
|
150
|
+
match = re.search(r' = (.+)\n', stdout)
|
|
143
151
|
|
|
144
152
|
yield Metric(name='startup_time',
|
|
145
153
|
value=format_timespan_to_seconds(match.group(1)),
|
|
@@ -261,8 +269,20 @@ class SystemdSummary(nagiosplugin.Summary):
|
|
|
261
269
|
|
|
262
270
|
def get_argparser():
|
|
263
271
|
parser = argparse.ArgumentParser(
|
|
264
|
-
|
|
265
|
-
|
|
272
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
273
|
+
description= # noqa: E251
|
|
274
|
+
'Copyright (c) 2014-18 Andrea Briganti a.k.a \'Kbyte\' <kbytesys@gmail.com>\n' # noqa: E501
|
|
275
|
+
'Copyright (c) 2019 Josef Friedrich <josef@friedrich.rocks>\n'
|
|
276
|
+
'\n'
|
|
277
|
+
'Nagios / Icinga monitoring plugin to check systemd for failed units.\n', # noqa: E501
|
|
278
|
+
epilog= # noqa: E251
|
|
279
|
+
'Performance data:\n'
|
|
280
|
+
' - count_units\n'
|
|
281
|
+
' - startup_time\n'
|
|
282
|
+
' - units_activating\n'
|
|
283
|
+
' - units_active\n'
|
|
284
|
+
' - units_failed\n'
|
|
285
|
+
' - units_inactive\n',
|
|
266
286
|
)
|
|
267
287
|
|
|
268
288
|
exclusive_group = parser.add_mutually_exclusive_group()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|