I want to query a present Munin plugin from Nagios. As I would like to do some calculations and aggregations (the plugin reports data over a period of time) and not just look at the last values, the available plugins querying Munin data like check_munin seem unsuitable. So my idea was to get the entire fetch
output and parse it. This however seems to present a problem for a reason I cannot understand.
If I enter fetch my-plugin
manually after issuing nc my-munin-node 4949
, I get the expected data output. If I try to script it, it does not work out as expected:
echo "fetch my-plugin" | nc my-munin-node 4949
just returns nothing while
(sleep 1 && echo "fetch my-plugin") | nc my-munin-node 4949
only returns the munin-node banner
# munin node at my-munin-node
without any trailing data. Running a network trace shows that the remote Munin node indeed starts sending data but is getting a TCP RST
from the requester's end immediately.