2

I have set up a Munin master node with the intent of monitoring different kinds of Unix machines. I have followed the instructions to the letter and found that while monitoring works flawless with all of the Linux nodes, I cannot get any meaningful output from the FreeBSD boxes.

All nodes are set up with a munin-node daemon running and a user called munin-async on Linux nodes and munin on the FreeBSD nodes. The users are set up like this, to allow SSH connections:

# /var/munin/.ssh/authorized_keys

no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,no-user-rc,from="1.2.3.4",command="/usr/local/share/munin/munin-async --spoolfetch" ssh-ed25519 AAAAC3Nza[...]

Manual connection via SSH works as expected, dropping directly into the munin-async helper.

PTY allocation request failed on channel 0
# munin node at example.home.lan
list
cpu df fail2ban if_bge0 if_bge1 if_bridge0 if_errcoll_bge0 if_errcoll_bge1 if_errcoll_bridge0 if_packets_bge0 if_packets_bge1 if_packets_bridge0 intr_cpu iostat ip_drops ip_forwarding ip_host ipinput load lpstat memory netirq_bge0 netisr_arp netisr_ether netisr_igmp netisr_ip netisr_ip6 netisr_rtsock netmem_clusters netmem_mbufs netmem_sendfile netstat ntp_kernel_err ntp_kernel_pll_freq ntp_kernel_pll_off ntp_offset ntp_states open_files pf_counters pf_source pf_source_act pf_state pf_state_act sendmail_mailqueue sendmail_mailstats sendmail_mailtraffic swap systat tcpstates udp_errors udp_traffic uptime users

By running spoolfetch 0, I can get data this way.

However, when running via munin-cron --debug, I get the following exceptions:

2017/07/23 15:14:05 [INFO] example.home.lan/ssh://munin@example.home.lan:4949 didn't send any data for spoolfetch. Ignoring it.
2017/07/23 15:14:05 [INFO] No spoofetch data for example.home.lan/ssh://example.home.lan:4949
2017/07/23 15:14:05 [DEBUG] Writing state for home.lan-example.home.lan in /var/munin/state-home.lan-example.home.lan.storable
2017/07/23 15:14:05 [DEBUG] about to write '/var/munin/state-home.lan-example.home.lan.storable'
2017/07/23 15:14:05 [ERROR] Munin::Master::UpdateWorker<home.lan;example.home.lan> failed to connect to node
2017/07/23 15:14:05 [DEBUG] Exit status 20 for worker Munin::Master::UpdateWorker<home.lan;example.home.lan>
2017/07/23 15:14:06 [DEBUG] In exception handler for failed worker home.lan;example.home.lan

The graphs however are created, while all values are output with nan.

Does anyone have a pointer for me what is amiss here?

herrbischoff
  • 160
  • 9

1 Answers1

2

I found the solution myself. As the munin-asyncd daemon defines a spool directory of /var/spool/munin/async, this needs to be specified in the command in authorized_keys:

/usr/local/share/munin/munin-async --spooldir /var/spool/munin/async --spoolfetch

This is not documented in a satisfactory fashion anywhere and must be deduced from the default locations. Hopefully this helps some poor soul searching for this issue.

herrbischoff
  • 160
  • 9
  • Upvoted because finding this kind of undocumented requisites deserves praise – Jenny D Jul 25 '17 at 10:25
  • 1
    Thanks. I'm happy it works now. I have also opened a bug report on the FreeBSD Bugzilla regarding another but related issue. Hopefully this will help to finally resolve this. – herrbischoff Jul 25 '17 at 12:43