Special Agent Summary/Detail Output

Checkmk ME 2.3p24.

Looking for some help with my first attempt at writing a special agent under 2.3.

When I run the check command on the command line, the summary and detail output display correctly in the host service summary and service detail screen. When the checks are running “normally”, the web ui the detail and summary page display only the first field of the agent output - not the summary and detail as intended in the check function.

When run default through the UI:

Note how the summary is displaying the output of the first field name from the parse function only. This is the same for the summary and detail.

When running “cmk -vvvv hostname” from the command line the intended output is shown until the next check cycle:

I’m not sure if i’m missing something with the way the special agent has been coded or this is intended functionality.

Check function:

def check_bv(item: str, params: Mapping[str, Any], section: Section) -> CheckResult:
    attr = section.items()
    for key, _ in attr:
        item_data = json.loads(key)
        bv_name = item_data.get("bv_name", "UNKNOWN")
        bv_vpus = item_data.get("vpus", "UNKNOWN")
        yield Result(
            state=State.OK,
            summary=f"BV Name: {bv_name} VPUS: {bv_vpus}",
            details=f"BV Name: {bv_name} VPUS: {bv_vpus}\n",
        )

Any help or suggestions with this would be greatly appreciated.

1 Like

In case anyone else comes across this I think the solution is to restart apache at minimum, if not the whole Checkmk stack. There appears to be caching that uses a past version of the plugin file.