mirror of
https://github.com/bashclub/check-opnsense.git
synced 2024-11-07 16:31:58 +01:00
Update opnsense_checkmk_agent.py
This commit is contained in:
parent
26d0cb9738
commit
cb934cf625
@ -22,7 +22,7 @@
|
|||||||
## copy to /usr/local/etc/rc.syshook.d/start/99-checkmk_agent and chmod +x
|
## copy to /usr/local/etc/rc.syshook.d/start/99-checkmk_agent and chmod +x
|
||||||
##
|
##
|
||||||
|
|
||||||
__VERSION__ = "0.82"
|
__VERSION__ = "0.83"
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
@ -500,7 +500,10 @@ class checkmk_checker(object):
|
|||||||
|
|
||||||
def checklocal_gateway(self):
|
def checklocal_gateway(self):
|
||||||
_ret = []
|
_ret = []
|
||||||
_gateway_items = self._config_reader().get("gateways").get("gateway_item",[])
|
_gateways = self._config_reader().get("gateways")
|
||||||
|
if not _gateways:
|
||||||
|
return []
|
||||||
|
_gateway_items = _gateways.get("gateway_item",[])
|
||||||
if type(_gateway_items) != list:
|
if type(_gateway_items) != list:
|
||||||
_gateway_items = [_gateway_items] if _gateway_items else []
|
_gateway_items = [_gateway_items] if _gateway_items else []
|
||||||
_interfaces = self._config_reader().get("interfaces",{})
|
_interfaces = self._config_reader().get("interfaces",{})
|
||||||
|
Loading…
Reference in New Issue
Block a user