sensu-plugins / sensu-plugins-disk-checks

This plugin provides native disk instrumentation for monitoring and metrics collection, including: health, usage, and various metrics.
http://sensu-plugins.io
MIT License
27 stars 63 forks source link

updated to make metrics compatible with Solaris #92

Closed makaveli0129 closed 6 years ago

makaveli0129 commented 6 years ago

Pull Request Checklist

Is this in reference to an existing issue?

General

New Plugins

Purpose

Known Compatibility Issues

majormoses commented 6 years ago

Thanks for your contribution to Sensu plugins! Without people like you submitting PRs we couldn't run the project. I will review it shortly.

majormoses commented 6 years ago

I am not too familiar with solaris so thanks for putting this together. Just to be clear this does not include inode capacity metrics? Also could you please include a changelog entry and a manual or automated testing artifact for each of them to show me what the output looks like?

makaveli0129 commented 6 years ago
$  /opt/sensu/embedded/bin/ruby /opt/sensu/embedded/bin/metrics-disk-usage.rb -s tester
tester.root.used 30251565 1524050771
tester.root.avail 21554911 1524050771
tester.root.used_percentage 59 1524050771
tester.root.devices.used 0 1524050771
tester.root.devices.avail 0 1524050771
tester.root.devices.used_percentage 0 1524050771
tester.root.system.contract.used 0 1524050771
tester.root.system.contract.avail 0 1524050771
tester.root.system.contract.used_percentage 0 1524050771
tester.root.proc.used 0 1524050771
tester.root.proc.avail 0 1524050771
tester.root.proc.used_percentage 0 1524050771
tester.root.etc.mnttab.used 0 1524050771
tester.root.etc.mnttab.avail 0 1524050771
tester.root.etc.mnttab.used_percentage 0 1524050771
tester.root.etc.svc.volatile.used 528 1524050771
tester.root.etc.svc.volatile.avail 78182864 1524050771
tester.root.etc.svc.volatile.used_percentage 1 1524050771
tester.root.system.object.used 0 1524050771
tester.root.system.object.avail 0 1524050771
tester.root.system.object.used_percentage 0 1524050771
tester.root.etc.dfs.sharetab.used 0 1524050771
tester.root.etc.dfs.sharetab.avail 0 1524050771
tester.root.etc.dfs.sharetab.used_percentage 0 1524050771
tester.root.platform.sun4v.lib.libc_psr.so.1.used 30251565 1524050771
tester.root.platform.sun4v.lib.libc_psr.so.1.avail 21554911 1524050771
tester.root.platform.sun4v.lib.libc_psr.so.1.used_percentage 59 1524050771
tester.root.platform.sun4v.lib.sparcv9.libc_psr.so.1.used 30251565 1524050771
tester.root.platform.sun4v.lib.sparcv9.libc_psr.so.1.avail 21554911 1524050771
tester.root.platform.sun4v.lib.sparcv9.libc_psr.so.1.used_percentage 59 1524050771
tester.root.tmp.used 366032 1524050771
tester.root.tmp.avail 78182864 1524050771
tester.root.tmp.used_percentage 1 1524050771
tester.root.var.run.used 64 1524050771
tester.root.var.run.avail 78182864 1524050771
tester.root.var.run.used_percentage 1 1524050771
tester.root.policy.used 7990239 1524050771
tester.root.policy.avail 9050252 1524050771
tester.root.policy.used_percentage 47 1524050771
tester.root.ldap2.used 48638524 1524050771
tester.root.ldap2.avail 23070941 1524050771
tester.root.ldap2.used_percentage 68 1524050771
tester.root.ldap.used 52086239 1524050771
tester.root.ldap.avail 16473049 1524050771
tester.root.ldap.used_percentage 76 1524050771
tester.root.iam-nas.used 10565628 1524050771
tester.root.iam-nas.avail 2017284 1524050771
tester.root.iam-nas.used_percentage 84 1524050771
tester.root.archive.used 39235052 1524050771
tester.root.archive.avail 13193748 1524050771
tester.root.archive.used_percentage 75 1524050771
tester.root.rpool.used 97 1524050771
tester.root.rpool.avail 21554911 1524050771
tester.root.rpool.used_percentage 1 1524050771

EDIT: adding code formatting block with triple backticks

makaveli0129 commented 6 years ago
$  /opt/sensu/embedded/bin/ruby /opt/sensu/embedded/bin/metrics-disk-capacity.rb -s tester
tester.disk./devices.used 0 1524050980
tester.disk./devices.avail 0% 1524050980
tester.disk./devices.capacity /devices 1524050980
tester.disk.vx/dsk/vg/policy.used 9050252 1524050980
tester.disk.vx/dsk/vg/policy.avail 47% 1524050980
tester.disk.vx/dsk/vg/policy.capacity /policy 1524050980
tester.disk.vx/dsk/vg/ldap2.used 23070941 1524050980
tester.disk.vx/dsk/vg/ldap2.avail 68% 1524050980
tester.disk.vx/dsk/vg/ldap2.capacity /ldap2 1524050980
tester.disk.vx/dsk/vg/ldap.used 16473049 1524050980
tester.disk.vx/dsk/vg/ldap.avail 76% 1524050980
tester.disk.vx/dsk/vg/ldap.capacity /ldap 1524050980

EDIT: added code formatting block with tripe backticks

makaveli0129 commented 6 years ago

all any update on this PR?

makaveli0129 commented 6 years ago

@majormoses changes to changelog have been submitted

majormoses commented 6 years ago

released: https://rubygems.org/gems/sensu-plugins-disk-checks/versions/3.1.0