Feature request: ZFS, BTRFS Volume monitoring by amon agent
It would be great if the amon agent can monitor ZFS and BTRFS pools and if it could also monitor the state of such pools.
@DerDanilo You can do that right now with this plugin: https://github.com/sensu-plugins/sensu-plugins-zfs
I followed the guide and got the following error:
root@host:/opt/amonagent# echo '["metrics-iostat-extended.rb"]' > /etc/opt/amonagent/plugins-enabled/sensu.conf
root@host:/opt/amonagent# echo '["check-zpool.rb"]' >> /etc/opt/amonagent/plugins-enabled/sensu.conf
root@host:/opt/amonagent# systemctl restart amonagent
root@host:/opt/amonagent# /opt/amonagent/amonagent -test-plugin=sensu
ERRO[0000] Can't decode JSON file error=invalid character '[' after top-level value plugin=sensu
map[]
I have had the same with nagios plugins. When defining multiple plugins how to define them? List or array? Can you make an example in your documentation.
Update: Did I just miss reading the part regarding the list of config files or was it added just now?
@DerDanilo Something I definitely need to make much clearer - Amon supports Sensu plugins in 2 place. First - we have metrics plugins, which send metric data and these are processes in the sensu plugin and then we have checks, which cover both Nagios and Sensu health check type of plugins - these generate CRITICAL / WARNING / OK statuses
What I see from the error above is maybe some sort of typo in the JSON config, but not 100%, can you /etc/opt/amonagent/plugins-enabled/sensu.conf?
Thanks for that info. Now they appear in the health check overview.
As you said already it would be good to make the difference between Metrics/Checks clear.
Do you have a useful overview for metrics vs check plugins? I am new to ruby code.
@DerDanilo At least in sensu you can differentiate them by the name: this is how checks look like bin/check-mongodb.rb and the metrics are bin/metrics-mongodb.rb. Nagios is 100% check plugins
Maybe it's also useful to mention the default path for sensu metrics and check files. Have had to search them first. Thanks though.
@dschwabeS11 The default path is not consistent across distros - it is different with the embedded Sensu Ruby install, on CentOS and Ubuntu/Debian