Hi,
In the directory doc/treasures/localchecks, there are examples that are outdated.
Since agent 2.0.0, word separator for <<<local>>> section is NUL (\0) :
Code in check_mk_agent :
echo '<<<local:sep(0)>>>'
So the code should be, e.g in bash :
echo -e "0\0Plugin_Name\0perfdata=42\0Long description of the plugin"
The documentation at https://docs.checkmk.com/latest/en/localchecks.html should be updated accordingly
Xavier