Class: PulseToolbox::Server::Monitoring

Inherits:
PulseMeter::Visualize::App
  • Object
show all
Defined in:
lib/pulse_toolbox/server/monitoring.rb

Instance Method Summary collapse

Constructor Details

#initializeMonitoring

Returns a new instance of Monitoring.



5
6
7
# File 'lib/pulse_toolbox/server/monitoring.rb', line 5

def initialize
  super(layout)
end

Instance Method Details

#layoutObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/pulse_toolbox/server/monitoring.rb', line 9

def layout
  PulseToolbox::Sensor::Manager.layout do |l|
    l.use_utc false

    l.page "Requests" do |p|
      PulseToolbox::Sensor::Manager.each_group_with_title do |group, title, values_label|
        p.line title do |w|
          PulseToolbox::Sensor::Manager.each_sensor_in_group(group) do |s|
            w.sensor s.name, :color => s.color
          end

          w.timespan 60 * 60 * 3
          w.redraw_interval 10

          w.show_last_point true
          w.values_label values_label
          w.width 5
        end
      end
    end
  end.to_data
end