Check for own special agent, check_mk 2.0

In your plugin the “register.agent_section” is missing.
With your special agent and the shown section header it should look like

register.agent_section(
    name="my_rest_api",
    parse_function=parse_my_rest_api,
)

def parse_my_rest_api(string_table):
    parsed = {}
    for line in string_table:
        parsed[line[0]] = line[1]
    return parsed

The parse function can also something different but it is easier to have the output data in a well defined data structure.

Inside the “register.check_plugin” you should insert the line “sections=[“my_rest_api”],”

1 Like