amon icon indicating copy to clipboard operation
amon copied to clipboard

Feature request: ZFS, BTRFS Volume monitoring by amon agent

Open DerDanilo opened this issue 7 years ago • 7 comments

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 avatar Jan 30 '18 19:01 DerDanilo

@DerDanilo You can do that right now with this plugin: https://github.com/sensu-plugins/sensu-plugins-zfs

martinrusev avatar Jan 30 '18 19:01 martinrusev

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 avatar Jan 30 '18 19:01 DerDanilo

@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?

martinrusev avatar Jan 31 '18 12:01 martinrusev

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 avatar Jan 31 '18 19:01 DerDanilo

@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

martinrusev avatar Jan 31 '18 19:01 martinrusev

Maybe it's also useful to mention the default path for sensu metrics and check files. Have had to search them first. Thanks though.

ghost avatar Feb 01 '18 18:02 ghost

@dschwabeS11 The default path is not consistent across distros - it is different with the embedded Sensu Ruby install, on CentOS and Ubuntu/Debian

martinrusev avatar Feb 01 '18 20:02 martinrusev