bashclub / checkmk-opnsense-agent

75 stars 18 forks source link

Feature request to support apcupsd by agent #26

Closed mapietru closed 1 year ago

mapietru commented 1 year ago

Might be intressting for those who have an ups from APC (Schneider). There is a plugin for checkmk with some nice output. https://exchange.checkmk.com/p/apcaccess

On opnsense side you just need to install the plugin os-apcupsd.

For checkmk there is some mkp to parse the information from the client. https://exchange.checkmk.com/packages/apcaccess/914/apcaccess-5.0.mkp

the only thing missing is a small change in opnsense_checkmk_agent.py

I am not a coding guy, but this is my current solution:

def check_apcupsd(self):
        _ret = ["<<<apcaccess:sep(58)>>>"]
        _ret.append("[[apcupsd.conf]]")
        _ret.append(self._run_prog("apcaccess").strip())
        return _ret

The output of the checkmk service looks like this:

image

image

thorstenspille commented 1 year ago

Please check testing branch, should be fixed with https://github.com/bashclub/check-opnsense/commit/e1c5d1a121059f61eaab5db6954f778e59b41693

mapietru commented 1 year ago

Please check testing branch, should be fixed with e1c5d1a

Updated this morning, looks good!