Issues with APC PDU / transfer switch (check_mk-apc_ats_output)

I’m monitoring my APC PDUs with Checkmk using SNMP and the integrated check_mk-apc_ats_output plugin. Here is the output for the service “Phase 1 output”:

Voltage: 121.00 V, Power: 157.00 W, Current: 1.30 A, Load: -1.00 %

There are 2 charts available: Voltage and Load. Load is always at -1.00% which is basically useless, I’d rather have the Current chart instead. I’m not sure how these values are calculated, when I log in to the APC web interface this is how it looks:

image

Here is a full SNMP bulkwalk output: ----------------------- New Test -----------------------Paessler SNMP Tester - - Pastebin.com

I guess it’s a bug with the plugin and the APC AP4450 SNMP output. I also noted that the apc_ats_status plugin doesn’t detect anything, why?

If you take a look at the “atsOutputPhaseTable” of your walk, you will see that it reports mostly unsupported (-1) values.

2023-09-07 23:30:08 (10643 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.1.1.1.1 = "1" [ASN_INTEGER]
2023-09-07 23:30:08 (10658 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.2.1.1.1 = "1" [ASN_INTEGER]
2023-09-07 23:30:08 (10672 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.3.1.1.1 = "122" [ASN_INTEGER]
2023-09-07 23:30:08 (10685 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.4.1.1.1 = "17" [ASN_INTEGER]
2023-09-07 23:30:08 (10699 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.5.1.1.1 = "-1" [ASN_INTEGER]
2023-09-07 23:30:08 (10714 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.6.1.1.1 = "-1" [ASN_INTEGER]
2023-09-07 23:30:08 (10728 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.7.1.1.1 = "-1" [ASN_INTEGER]
2023-09-07 23:30:09 (10742 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.8.1.1.1 = "-1" [ASN_INTEGER]
2023-09-07 23:30:09 (10756 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.9.1.1.1 = "-1" [ASN_INTEGER]
2023-09-07 23:30:09 (10770 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.10.1.1.1 = "-1" [ASN_INTEGER]
2023-09-07 23:30:09 (10787 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.11.1.1.1 = "-1" [ASN_INTEGER]
2023-09-07 23:30:09 (10801 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.12.1.1.1 = "-1" [ASN_INTEGER]
2023-09-07 23:30:09 (10815 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.13.1.1.1 = "207" [ASN_INTEGER]
2023-09-07 23:30:09 (10830 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.14.1.1.1 = "-1" [ASN_INTEGER]
2023-09-07 23:30:09 (10844 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.15.1.1.1 = "-1" [ASN_INTEGER]
2023-09-07 23:30:09 (10858 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.16.1.1.1 = "14" [ASN_INTEGER]
2023-09-07 23:30:09 (10872 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.17.1.1.1 = "-1" [ASN_INTEGER]
2023-09-07 23:30:09 (10886 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.18.1.1.1 = "-1" [ASN_INTEGER]
2023-09-07 23:30:09 (10901 ms) : 1.3.6.1.4.1.318.1.1.8.5.4.3.1.19.1.1.1 = "1" [ASN_INTEGER]

That means your device is not a fully fledged ATS only a partially one :wink:
This is also the reason for the ats_status check. Here your device provides not enough data to work.

Fair enough. Could you point me to the right file if I want to edit this plugin to remove the load value when it’s negative and to add perfdata for the current instead? It can be a link to the git as well, I couldn’t find the file when searching for the plugin name, only the translation but it didn’t help me.

This should be the file you search.

Thank you. If I recall correctly I can just copy that file in a local directory where that new version will take over the default one, correct?

Yes, that’s the way you can do it.

I’m trying to find that local directory to overwrite the original without editing it. I tried ~/local/share/check_mk/checks/apc_ats_output without success. The original file is located in /opt/omd/versions/2.2.0p9.cre/share/check_mk/checks/apc_ats_output.

Edit: nevermind, it works, had to go into discovery and rediscover the same service for some reason…

For anyone interested…

It removes the load % altogether when it’s -1 and I added rrd for current and power instead.

And a quick note about apc_ats_status for any other AP4450 users… the info is actually there with SNMP, just edit the snmp_scan_function to make it the same as apc_ats_output.

From:

    "snmp_scan_function": lambda oid: ".1.3.6.1.4.1.318.1.3.11" in oid(".1.3.6.1.2.1.1.2.0"),

To:

    "snmp_scan_function": lambda oid: oid(".1.3.6.1.2.1.1.2.0")
    in [
        ".1.3.6.1.4.1.318.1.3.11",
        ".1.3.6.1.4.1.318.1.3.32",
    ],

You may have to toy around the plugin a little bit for the 5V PSU that is absent from these units (and add the 3.3V and 1V PSUs instead), but you will otherwise get the selected power source and an alert if it changes. I created a PR: