{"repo":"sensu-plugins/sensu-plugin","free":true,"listed":false,"github":"https://github.com/sensu-plugins/sensu-plugin","clone":"git clone https://github.com/sensu-plugins/sensu-plugin.git","description":"A framework for writing Sensu plugins & handlers with Ruby.","language":"Ruby","stars":126,"topics":["monitoring","ruby","library"],"license":"MIT","category":"analytics","readme_excerpt":"Sensu Plugin This is a framework for writing your own Sensu plugins and handlers. It's not required to write a plugin (most Nagios plugins will work without modification); it just makes it easier. Examples of plugins written with and without it can be found in the sensu-plugins organization. Checks and Metrics To implement your own check, subclass Sensu::Plugin::Check::CLI , like this: This will output the string \"my awesome check OK: All is well\" (like a Nagios plugin), and exit with a code of 0. The available exit methods, which will immediately end the process, are: ok warning critical unknown You can also call message first to set the message, then call an exit method without any arguments (for example, if you want to choose between WARNING and CRITICAL based on a threshold, but use the same message in both cases). For a metric, you can subclass one of the following: Sensu::Plugin::Metric::CLI::JSON Sensu::Plugin::Metric::CLI::Graphite Sensu::Plugin::Metric::CLI::Statsd Sensu::Plugin::Metric::CLI::Dogstatsd Sensu::Plugin::Metric::CLI::Influxdb Sensu::Plugin::Metric::CLI::Generic Instead of outputting a Nagios-style line of text, these classes will output differently formated messages depending on the class you chose. JSON output takes one argument (the object), and adds a 'timestamp' key if missing. Graphite output takes two arguments, the metric path and the value, and optionally the timestamp as a third argument. Time.now.to i is used for the timestamp if it is not spec","default_branch":null,"files":null,"tree":[],"storefront":"/r/sensu-plugins","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sensu-plugins/sensu-plugin/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}