Class: Sensu::Extension::SystemProfile
- Inherits:
-
Check
- Object
- Check
- Sensu::Extension::SystemProfile
- Defined in:
- lib/sensu/extensions/system-profile.rb
Instance Method Summary collapse
Instance Method Details
#definition ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/sensu/extensions/system-profile.rb', line 14 def definition { type: 'metric', name: name, interval: [:interval], standalone: true, handler: [:handler] } end |
#description ⇒ Object
10 11 12 |
# File 'lib/sensu/extensions/system-profile.rb', line 10 def description 'collects system metrics, using the graphite plain-text format' end |
#name ⇒ Object
6 7 8 |
# File 'lib/sensu/extensions/system-profile.rb', line 6 def name 'system_profile' end |
#post_init ⇒ Object
24 25 26 |
# File 'lib/sensu/extensions/system-profile.rb', line 24 def post_init @metrics = [] end |
#run ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/sensu/extensions/system-profile.rb', line 28 def run proc_stat_metrics do proc_loadavg_metrics do proc_net_dev_metrics do proc_meminfo_metrics do yield flush_metrics, 0 end end end end end |