check_systemd 2.0.6__tar.gz → 2.0.8__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.6
3
+ Version: 2.0.8
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: check-systemd
3
- Version: 2.0.6
3
+ Version: 2.0.8
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
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env python
1
+ #!/usr/bin/env python3
2
2
  # -*- coding: utf-8 -*-
3
3
  """
4
4
  You can redistribute it and/or modify it under the terms of the GNU General
@@ -15,7 +15,7 @@ import re
15
15
  import nagiosplugin
16
16
  from nagiosplugin import Metric
17
17
 
18
- __version__ = '2.0.6'
18
+ __version__ = '2.0.8'
19
19
 
20
20
 
21
21
  class SystemdctlListUnitsResource(nagiosplugin.Resource):
@@ -349,8 +349,13 @@ def main():
349
349
  objects += [
350
350
  SystemdctlListUnitsResource(excludes=args.exclude),
351
351
  PerformanceDataContext(),
352
- SystemdAnalyseResource(),
352
+
353
353
  ]
354
+ analyse = subprocess.run(['systemd-analyze'], stderr=subprocess.PIPE,
355
+ stdin=subprocess.PIPE, stdout=subprocess.PIPE)
356
+ # systemd-analyze: boot not finshed exists with 1
357
+ if analyse.returncode == 0:
358
+ objects.append(SystemdAnalyseResource())
354
359
 
355
360
  objects += [
356
361
  UnitContext(),
File without changes
File without changes
File without changes
File without changes
File without changes