From 829a2d12abb124fe6ca87f610d4d8e92f8276a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20L=C3=A4ssig?= Date: Tue, 5 Jul 2016 14:38:36 +0200 Subject: [PATCH] more readme for github --- README => README.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) rename README => README.md (72%) diff --git a/README b/README.md similarity index 72% rename from README rename to README.md index b8c0de4..61167d7 100644 --- a/README +++ b/README.md @@ -1,14 +1,17 @@ -Whats this? -=========== +# Whats this? + This script is intended for icinga/nagios/icinga2 to check the state of a systemd service. We check the ServiceState and the Substate. -optional features (future) --------------------------- +## install + + apt-get install python3-nagiosplugin python3-gi + +## optional features (future) + It is thinkable to check for every systemd service property. -example code ------------- +## example code from gi.repository import GLib, Gio @@ -18,8 +21,8 @@ apache2 = Gio.DBusProxy.new_for_bus_sync(Gio.BusType.SYSTEM, 0, None, 'org.free apache2.get_cached_property('ActiveState').unpack() -> 'active' - apache2.get_cached_property('SubState').unpack() - -> 'running' +apache2.get_cached_property('SubState').unpack() +-> 'running' - apache2.get_cached_property_names() - -> Liste all systemd-properties +apache2.get_cached_property_names() +-> Liste all systemd-properties