Class: Bipbip::Plugin::Postfix
- Inherits:
-
Bipbip::Plugin
- Object
- Bipbip::Plugin
- Bipbip::Plugin::Postfix
- Defined in:
- lib/bipbip/plugin/postfix.rb
Instance Attribute Summary
Attributes inherited from Bipbip::Plugin
#config, #frequency, #metric_group, #name, #tags
Instance Method Summary collapse
Methods inherited from Bipbip::Plugin
factory, factory_from_plugin, #initialize, #metrics_names, #run, #source_identifier
Methods included from InterruptibleSleep
#interrupt_sleep, #interruptible_sleep
Constructor Details
This class inherits a constructor from Bipbip::Plugin
Instance Method Details
#metrics_schema ⇒ Object
3 4 5 6 7 |
# File 'lib/bipbip/plugin/postfix.rb', line 3 def metrics_schema [ { name: 'mails_queued_total', type: 'gauge', unit: 'Mails' } ] end |
#monitor ⇒ Object
9 10 11 12 13 14 |
# File 'lib/bipbip/plugin/postfix.rb', line 9 def monitor queue_counter = /(\d+) Request+s?\.$/.match(postqueue) { 'mails_queued_total' => queue_counter.nil? ? 0 : queue_counter[1].to_i } end |