Survey: Agent improvements

Some nice ideas came up in this old thread Restructure the nix agents

I liked the idea that the agent would output JSON.

This would make it much easier to troubleshoot and compare, and filter agent outputs.

The current format with the <<<section>>> and <<<<piggibacked-host>>>>
still feels strange, even after years of working with them.

Some sections can appear mutliple times with the same name,
but with different sep() section attribute, it can be confusing e.g.:

$ check_mk_agent | grep '^<<<docker' | sort | uniq -c
     10 <<<docker_container_labels:sep(0):cached(1780471138,60)>>>
     10 <<<docker_container_labels:sep(124):cached(1780471138,60)>>>
     10 <<<docker_container_network:sep(0):cached(1780471138,60)>>>
     10 <<<docker_container_network:sep(124):cached(1780471138,60)>>>
     10 <<<docker_container_node_name:sep(0):cached(1780471138,60)>>>
     10 <<<docker_container_node_name:sep(124):cached(1780471138,60)>>>
     10 <<<docker_container_status:sep(0):cached(1780471138,60)>>>
     10 <<<docker_container_status:sep(124):cached(1780471138,60)>>>

Troubleshooting e.g. the agent output of the kubernetes special agent is a challange because of that, if you want to compare it with outputs from other clusters or versions.

1 Like