From 30bbf18a2fb9e105017998c227f783a29b3558fc Mon Sep 17 00:00:00 2001 From: Robert Sander Date: Tue, 25 Jun 2024 10:36:02 +0200 Subject: [PATCH] adds get_host_status() and get_service_status() --- check_mk_api/check_mk_api-5.7.0.mkp | Bin 9477 -> 0 bytes check_mk_api/check_mk_api-5.8.0.mkp | Bin 0 -> 9979 bytes check_mk_api/checkmkapi.html | 21 +++++++ check_mk_api/lib/python3/checkmkapi.py | 76 +++++++++++++++++++++++++ 4 files changed, 97 insertions(+) delete mode 100644 check_mk_api/check_mk_api-5.7.0.mkp create mode 100644 check_mk_api/check_mk_api-5.8.0.mkp diff --git a/check_mk_api/check_mk_api-5.7.0.mkp b/check_mk_api/check_mk_api-5.7.0.mkp deleted file mode 100644 index 66bc182554fe9ef020ad9fe64d5ccf0df2e98b64..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9477 zcmbuFQ$r;TqlK%TJ=vJ-nrz#)ZBDlB+S!va*`93MuAS}ke!t<|t#z@kpNsVn$H0P3 zas0G^_`c--blu=+_*@Hss+0>?v6XE}q2%;FnVz7q&h9K7BcI-yY~-V7P{zWKS|p?C z6xg_S4CstOfgqPU=N%KbGra|9fyE5@8-qjcF~3<1u8`^}5($-|a|Kx>K<`w1Di!*j3;;Xji@!+!EZk>?c_Zes!eEp=z93ueK;WGv}w*92_cu` zNgDu1Ab0^8f8E@lkPpQBcuI<&g@Ph8!y{Pd6@PkBPVWBFC+5}3GUbmG_(dYmg`coT zcM_Ii`NKeJbruKx_$0Ps<;=Re0(c_NkMDZ^!{Z$8Y4PIlRsjST-DVHw6TH(HZluVc zBFH{{eSPsxY}Dio=KJe4;34(O_2Bzu%;CfFs3E##>hXJSK~nMcI>mJETM!JKPyI9C z1u#1_S4^BIux0Vh`ZU$o%Og-LrTP4c&`spKkxAiv@)MTV-*X6(8^mt}vqQ)%2$BpT z=>j!q^YFb)1oWSTfUO#35Qz;M@0aO6;htVEa=lsZ8d5QUHML^PmCsWP7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Lg46R3WG#K}_pt!rlICdpXWK#<j Jz(m2p{s(pVih=+D literal 0 HcmV?d00001 diff --git a/check_mk_api/checkmkapi.html b/check_mk_api/checkmkapi.html index 2f6f676f..4212d423 100644 --- a/check_mk_api/checkmkapi.html +++ b/check_mk_api/checkmkapi.html @@ -512,6 +512,16 @@ Returns:
    (host group, etag) +
get_host_status(self, sites=[], query='', columns=[])
Get host status

+Args:
+    sites: Restrict the query to this particular site.
+    query: An query expression of the Livestatus 'hosts' table in nested dictionary form.
+    columns: The desired columns of the hosts table. If left empty, a default set of columns is used.

+Returns:
+    (list of dicts in "value", etag)
+
get_host_tag_group(self, name)
Show a host tag group
 
Args:
@@ -557,6 +567,17 @@     list of rulesets
    etag
+
get_service_status(self, sites=[], query='', columns=[], host_name='')
Get service status

+Args:
+    sites: Restrict the query to this particular site.
+    query: An query expression of the Livestatus 'services' table in nested dictionary form.
+    columns: The desired columns of the services table. If left empty, a default set of columns is used.
+    host_name: A hostname.

+Returns:
+    (list of dicts in "value", etag)
+
get_timeperiod(self, name)
Show a time period
 
Args:
diff --git a/check_mk_api/lib/python3/checkmkapi.py b/check_mk_api/lib/python3/checkmkapi.py index 52fa5d00..5cc1cbdf 100644 --- a/check_mk_api/lib/python3/checkmkapi.py +++ b/check_mk_api/lib/python3/checkmkapi.py @@ -1561,6 +1561,82 @@ def edit_host_group(self, name, title, etag="*"): data={ "alias": title, }) + +# .--Host Status---------------------------------------------------------. +# | _ _ _ ____ _ _ | +# | | | | | ___ ___| |_ / ___|| |_ __ _| |_ _ _ ___ | +# | | |_| |/ _ \/ __| __| \___ \| __/ _` | __| | | / __| | +# | | _ | (_) \__ \ |_ ___) | || (_| | |_| |_| \__ \ | +# | |_| |_|\___/|___/\__| |____/ \__\__,_|\__|\__,_|___/ | +# | | +# +----------------------------------------------------------------------+ +# | | +# '----------------------------------------------------------------------' +#. + + def get_host_status(self, sites=[], query="", columns=[]): + """Get host status + + Args: + sites: Restrict the query to this particular site. + query: An query expression of the Livestatus 'hosts' table in nested dictionary form. + columns: The desired columns of the hosts table. If left empty, a default set of columns is used. + + Returns: + (list of dicts in "value", etag) + """ + data = {} + if sites: + data["sites"] = sites + if query: + data["query"] = query + if columns: + data["columns"] = columns + return self._request( + self._get_url, + "/domain-types/host/collections/all", + data = data, + ) + +# .--Service Status------------------------------------------------------. +# | ____ _ ____ _ _ | +# | / ___| ___ _ ____ _(_) ___ ___ / ___|| |_ __ _| |_ _ _ ___ | +# | \___ \ / _ \ '__\ \ / / |/ __/ _ \ \___ \| __/ _` | __| | | / __| | +# | ___) | __/ | \ V /| | (_| __/ ___) | || (_| | |_| |_| \__ \ | +# | |____/ \___|_| \_/ |_|\___\___| |____/ \__\__,_|\__|\__,_|___/ | +# | | +# +----------------------------------------------------------------------+ +# | | +# '----------------------------------------------------------------------' +#. + + def get_service_status(self, sites=[], query="", columns=[], host_name=""): + """Get service status + + Args: + sites: Restrict the query to this particular site. + query: An query expression of the Livestatus 'services' table in nested dictionary form. + columns: The desired columns of the services table. If left empty, a default set of columns is used. + host_name: A hostname. + + Returns: + (list of dicts in "value", etag) + """ + + data = {} + if sites: + data["sites"] = sites + if query: + data["query"] = query + if columns: + data["columns"] = columns + if hsot_name: + data["host_name"] = host_name + return self._request( + self._get_url, + "/domain-types/service/collections/all", + data = data, + ) #