Closed dnlldl closed 3 years ago
I don't have the firmware parameter so quick fix for me is just to remove that last data.get
yield Result(state=State.OK, summary=", ".join([data['UPSNAME'], data.get('MODEL'), data.get('SERIALNO'), data.get('FIRMWARE')]))
I would suggest something a little bit more robust when parameters are missing. I don't think the SERIALNO is very relevant in my specific case either with my Cyberpower UPS.
I ended up with this:
if 'MODEL' in data: yield Result(state=State.OK,summary=data.get('MODEL')) else: yield Result(state=State.UNKNOWN, summary='Unkown UPS / no data')
I'm not overly familiar with how Checkmk plugins work, I would like to change the service name from "APC apcupsd.conf Status" to "UPS CP1500PFCLCD Status". Not sure how I can make %s
be the UPS MODEL, will do some more testings tomorrow.
I'm not overly familiar with how Checkmk plugins work, I would like to change the service name from "APC apcupsd.conf Status" to "UPS CP1500PFCLCD Status". Not sure how I can make
%s
be the UPS MODEL, will do some more testings tomorrow.
This will not work as this needs to be a unique name. You could have two of the same models attached to a host. That's why the check uses the configuration file name.
I'm not overly familiar with how Checkmk plugins work, I would like to change the service name from "APC apcupsd.conf Status" to "UPS CP1500PFCLCD Status". Not sure how I can make
%s
be the UPS MODEL, will do some more testings tomorrow.This will not work as this needs to be a unique name. You could have two of the same models attached to a host. That's why the check uses the configuration file name.
Granted, the serial number or something else could help here maybe. For my specific case however that would work, if you could point me in the right direction maybe.
I will work on a change that will introduce a discovery ruleset. This will allow you to choose what will be used in the service description.
Fixed by commit a7dcde105d392ef57090e86d241c2047887f6ac9
I just tested it, it works. Possibility to add a second setting to use the MODEL rather than the UPSNAME as the service name? UPSNAME isn't set on mine and it's USB so it just shows up as the HOSTNAME instead. Having the option to remove APC from the service name would be great as well (mine is from a different brand completely even though we access it with the APC daemon). Other than that, great work!
Hello, First thing first, thanks for working on this plugin.
I'm having an issue with my UPS being detected as "Unkown UPS / no data". There is a typo in "unknown", and something isn't parsed correctly in the output for me:
Anothing thing I could suggest as an improvement would be to name the service with the UPS model or some sort of ID, since I'm not sure this would work well with multiple UPS hooked up to the same host in Checkmk.