opstat-plugins 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/.gitlab-ci.yml +17 -0
  4. data/LICENSE +675 -0
  5. data/lib/app/models/apache2.rb +192 -0
  6. data/lib/app/models/bsdnet/bytes_in_out.rb +54 -0
  7. data/lib/app/models/bsdnet/current_entries.rb +34 -0
  8. data/lib/app/models/bsdnet.rb +12 -0
  9. data/lib/app/models/cpu.rb +86 -0
  10. data/lib/app/models/disk.rb +51 -0
  11. data/lib/app/models/disk_io.rb +53 -0
  12. data/lib/app/models/facts.rb +30 -0
  13. data/lib/app/models/fpm.rb +138 -0
  14. data/lib/app/models/haproxy.rb +57 -0
  15. data/lib/app/models/jvm.rb +51 -0
  16. data/lib/app/models/load.rb +99 -0
  17. data/lib/app/models/memory.rb +55 -0
  18. data/lib/app/models/nagios.rb +51 -0
  19. data/lib/app/models/network.rb +58 -0
  20. data/lib/app/models/oracle_fras_sizes.rb +41 -0
  21. data/lib/app/models/oracle_sessions.rb +43 -0
  22. data/lib/app/models/oracle_tablespaces_sizes.rb +51 -0
  23. data/lib/app/models/temper.rb +51 -0
  24. data/lib/app/models/webobjects.rb +83 -0
  25. data/lib/app/models/xen.rb +99 -0
  26. data/lib/data/hp_pdu.yml +191 -0
  27. data/lib/logging.rb +29 -0
  28. data/lib/opstat-plugins.rb +44 -0
  29. data/lib/parsers/apache2.rb +19 -0
  30. data/lib/parsers/bsdnet.rb +29 -0
  31. data/lib/parsers/cpu.rb +42 -0
  32. data/lib/parsers/disk.rb +49 -0
  33. data/lib/parsers/facts.rb +12 -0
  34. data/lib/parsers/fpm.rb +31 -0
  35. data/lib/parsers/freeswitch_fifos.rb +63 -0
  36. data/lib/parsers/haproxy.rb +34 -0
  37. data/lib/parsers/haproxy_tables.rb +25 -0
  38. data/lib/parsers/hp_pdu.rb +36 -0
  39. data/lib/parsers/jvm.rb +22 -0
  40. data/lib/parsers/load.rb +20 -0
  41. data/lib/parsers/memory.rb +29 -0
  42. data/lib/parsers/nagios.rb +39 -0
  43. data/lib/parsers/network.rb +37 -0
  44. data/lib/parsers/oracle_fras_sizes.rb +25 -0
  45. data/lib/parsers/oracle_sessions.rb +20 -0
  46. data/lib/parsers/oracle_tablespaces_sizes.rb +22 -0
  47. data/lib/parsers/temper.rb +17 -0
  48. data/lib/parsers/webobjects.rb +33 -0
  49. data/lib/parsers/xen.rb +39 -0
  50. data/lib/plugins/apache2.rb +76 -0
  51. data/lib/plugins/bsdnet.rb +13 -0
  52. data/lib/plugins/cpu.rb +13 -0
  53. data/lib/plugins/custom_sql_statement.rb +24 -0
  54. data/lib/plugins/disk.rb +31 -0
  55. data/lib/plugins/facts.rb +30 -0
  56. data/lib/plugins/fpm.rb +33 -0
  57. data/lib/plugins/freeswitch_fifos.rb +27 -0
  58. data/lib/plugins/haproxy.rb +24 -0
  59. data/lib/plugins/haproxy_tables.rb +28 -0
  60. data/lib/plugins/hp_pdu.rb +28 -0
  61. data/lib/plugins/jvm.rb +23 -0
  62. data/lib/plugins/load.rb +20 -0
  63. data/lib/plugins/memory.rb +18 -0
  64. data/lib/plugins/nagios.rb +39 -0
  65. data/lib/plugins/network.rb +21 -0
  66. data/lib/plugins/oracle_fras_sizes.rb +48 -0
  67. data/lib/plugins/oracle_sessions.rb +47 -0
  68. data/lib/plugins/oracle_tablespaces_sizes.rb +59 -0
  69. data/lib/plugins/temper.rb +21 -0
  70. data/lib/plugins/webobjects.rb +42 -0
  71. data/lib/plugins/xen.rb +22 -0
  72. data/opstat-plugins.gemspec +20 -0
  73. data/spec/cpu_spec.rb +39 -0
  74. data/spec/disk_io_spec.rb +31 -0
  75. data/spec/disk_spec.rb +31 -0
  76. data/spec/fixtures/parser_cpu_16_core.txt +24 -0
  77. data/spec/fixtures/parser_cpu_16_core_corrupted.txt +24 -0
  78. data/spec/fixtures/parser_cpu_single_core.txt +10 -0
  79. data/spec/fixtures/parser_cpu_single_core_corrupted.txt +9 -0
  80. data/spec/fixtures/parser_disk_3_mounts.txt +9 -0
  81. data/spec/fixtures/parser_disk_corrupted.txt +9 -0
  82. data/spec/fixtures/parser_disk_io.txt +2 -0
  83. data/spec/fixtures/parser_disk_io_corrupted.txt +2 -0
  84. data/spec/fixtures/parser_haproxy_correct.txt +2 -0
  85. data/spec/fixtures/parser_haproxy_corrupted.txt +2 -0
  86. data/spec/fixtures/parser_haproxy_many_frontend_many_backend.txt +6 -0
  87. data/spec/fixtures/parser_haproxy_single_frontend_single_backend_with_single_svname.txt +5 -0
  88. data/spec/fixtures/parser_load.txt +1 -0
  89. data/spec/fixtures/parser_load_corrupted.txt +2 -0
  90. data/spec/fixtures/parser_memory.txt +43 -0
  91. data/spec/fixtures/parser_memory_corrupted.txt +43 -0
  92. data/spec/fixtures/parser_network.txt +5 -0
  93. data/spec/fixtures/parser_network_corrupted.txt +5 -0
  94. data/spec/fixtures/parser_webobjects_many_apps_many_instances.result.yml +590 -0
  95. data/spec/fixtures/parser_webobjects_many_apps_many_instances.txt +2 -0
  96. data/spec/fixtures/parser_webobjects_one_app_many_instances.result.yml +305 -0
  97. data/spec/fixtures/parser_webobjects_one_app_many_instances.txt +395 -0
  98. data/spec/haproxy_spec.rb +68 -0
  99. data/spec/load_spec.rb +21 -0
  100. data/spec/memory_spec.rb +21 -0
  101. data/spec/network_spec.rb +21 -0
  102. data/spec/spec_helper.rb +102 -0
  103. data/spec/webobjects_spec.rb +28 -0
  104. metadata +189 -0
@@ -0,0 +1,23 @@
1
+ module Opstat
2
+ module Plugins
3
+ class Jvm < Task
4
+ def initialize (name, queue, config)
5
+ super(name, queue, config)
6
+ @snmp_host = config['snmp_host']
7
+ @snmp_port = config['snmp_port']
8
+ @snmp_cmd = "snmpget -c public -v2c #{@snmp_host}:#{@snmp_port} 1.3.6.1.4.1.42.2.145.3.163.1.1.3.1.0 1.3.6.1.4.1.42.2.145.3.163.1.1.3.2.0 1.3.6.1.4.1.42.2.145.3.163.1.1.3.3.0|cut -f2 -d="
9
+ end
10
+
11
+ def parse
12
+ snmpIO = IO.popen(@snmp_cmd)
13
+ report = snmpIO.readlines.join
14
+ snmpIO.close
15
+ return report
16
+ end
17
+
18
+ end
19
+ end
20
+ end
21
+ #for test
22
+ # check snmp is installed
23
+ # check port is open - snmp is accessible
@@ -0,0 +1,20 @@
1
+ module Opstat
2
+ module Plugins
3
+ class Load < Task
4
+ STAT_FILE = "/proc/loadavg"
5
+
6
+ def initialize (name, queue, config)
7
+ super(name, queue, config)
8
+ self
9
+ end
10
+
11
+ def parse
12
+ @count_number += 1
13
+ #TODO do i have to do it in array way?
14
+ report = Array.new
15
+ report << File.foreach(STAT_FILE).first
16
+ return report
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,18 @@
1
+ module Opstat
2
+ module Plugins
3
+ class Memory < Task
4
+ STAT_FILE = "/proc/meminfo"
5
+
6
+ def initialize (name, queue, config)
7
+ super(name, queue, config)
8
+ self
9
+ end
10
+
11
+ def parse
12
+ @count_number += 1
13
+ report = File.open(STAT_FILE).readlines
14
+ return report
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,39 @@
1
+ module Opstat
2
+ module Parsers
3
+ class Nagios
4
+ include Opstat::Logging
5
+
6
+ def parse_data(data)
7
+ report = {}
8
+ begin
9
+ data.compact.each do |elem|
10
+ v = elem.strip.split(':')
11
+ next if v.length == 0
12
+ next if v.count != 2
13
+ key = v[0].strip
14
+ val = v[1].strip
15
+ report[key] = val
16
+ end
17
+ report["Hosts Up"], report["Hosts Down"], report["Hosts Unreachable"] = report["Hosts Up/Down/Unreach"].split('/')
18
+ report["Services Ok"], report["Services Warning"], report["Services Unknown"], report["Services Critical"] = report["Services Ok/Warn/Unk/Crit"].split('/')
19
+ rescue
20
+ #TODO add errors to gui - bad data
21
+ return
22
+ end
23
+ return [{
24
+ :services_total => report["Total Services"],
25
+ :hosts_total => report["Total Hosts"],
26
+ :services_checked => report["Services Checked"],
27
+ :hosts_checked => report["Hosts Checked"],
28
+ :services_ok => report["Services Ok"],
29
+ :services_warning => report["Services Warning"],
30
+ :services_critical => report["Services Critical"],
31
+ :services_unknown => report["Services Unknown"],
32
+ :hosts_up => report["Hosts Up"],
33
+ :hosts_down => report["Hosts Down"],
34
+ :hosts_unreachable => report ["Hosts Unreachable"]
35
+ }]
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,21 @@
1
+ module Opstat
2
+ module Plugins
3
+ class Network < Task
4
+ STAT_FILE = "/proc/net/dev"
5
+
6
+ def initialize (name, queue, config)
7
+ super(name, queue, config)
8
+ self
9
+ end
10
+
11
+ def parse
12
+ report = []
13
+ File.open(STAT_FILE).each do |line|
14
+ report << line
15
+ end
16
+ return report
17
+ end
18
+
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,48 @@
1
+ require 'erb'
2
+
3
+ module Opstat
4
+ module Plugins
5
+ class OracleFrasSizes < Task
6
+
7
+ def initialize (name, queue, config)
8
+ super(name, queue, config)
9
+ self
10
+ @su_user = config['su_user']
11
+ @db_user = config['db_user']
12
+ @db_password = config['db_password']
13
+ end
14
+
15
+ def sql_cmd
16
+ @query ||= ERB.new <<-EOF
17
+ su - <%= @su_user %> -c 'echo " set pagesize 10000
18
+ set heading on
19
+ set linesize 150
20
+ column dummy noprint
21
+ column name format a60 heading \\\"Path\\\"
22
+ column space_limit format 999999999999999 heading \"Total\"
23
+ column space_used format 999999999999999 heading \"Used\"
24
+ column number_of_files format 999999999999999 heading \"Files\"
25
+
26
+ select name,
27
+ space_limit,
28
+ space_used,
29
+ number_of_files
30
+ from v\\\$recovery_file_dest;
31
+ "|sqlplus -S <%= @db_user %>/<%= @db_password %>'
32
+ EOF
33
+ end
34
+
35
+ def parse
36
+ report = []
37
+ @cmd ||= sql_cmd.result(binding)
38
+ oracle_output = IO.popen(@cmd)
39
+ report = oracle_output.readlines.join
40
+ oracle_output.close
41
+ return report
42
+ end
43
+
44
+ end
45
+ end
46
+ end
47
+ #TODO check if it has privileges?
48
+ #grant select on v_$recovery_file_dest to nagios;
@@ -0,0 +1,47 @@
1
+ require 'erb'
2
+
3
+ module Opstat
4
+ module Plugins
5
+ class OracleSessions < Task
6
+
7
+ def initialize (name, queue, config)
8
+ super(name, queue, config)
9
+ self
10
+ @su_user = config['su_user']
11
+ @db_user = config['db_user']
12
+ @db_password = config['db_password']
13
+ end
14
+
15
+ def sql_cmd
16
+ @query ||= ERB.new <<-EOF
17
+ su - <%= @su_user %> -c 'echo " set pagesize 10000
18
+ set heading on
19
+ column dummy noprint
20
+ column used format 999999999999 heading \"Used\"
21
+ column free format 999999999999 heading \"Free\"
22
+
23
+ SELECT
24
+ (SELECT COUNT(*) FROM V\\\$SESSION) as used,
25
+ (VP\.VALUE - (select count(*) from v\\\$Session)) as free
26
+ FROM
27
+ V\\\$PARAMETER VP
28
+ WHERE VP\.NAME = '"'sessions'"';
29
+ "|sqlplus -S <%= @db_user %>/<%= @db_password %>'
30
+ EOF
31
+ end
32
+
33
+ def parse
34
+ report = []
35
+ @cmd ||= sql_cmd.result(binding)
36
+ oracle_output = IO.popen(@cmd)
37
+ report = oracle_output.readlines.join
38
+ oracle_output.close
39
+ return report
40
+ end
41
+
42
+ end
43
+ end
44
+ end
45
+ #need:
46
+ #access to v_$parameter
47
+ #access to v_$session
@@ -0,0 +1,59 @@
1
+ require 'erb'
2
+
3
+ module Opstat
4
+ module Plugins
5
+ class OracleTablespacesSizes < Task
6
+
7
+ def initialize (name, queue, config)
8
+ super(name, queue, config)
9
+ self
10
+ @su_user = config['su_user']
11
+ @db_user = config['db_user']
12
+ @db_password = config['db_password']
13
+ end
14
+
15
+ def sql_cmd
16
+ @query ||= ERB.new <<-EOF
17
+ su - <%= @su_user %> -c 'echo " set pagesize 10000
18
+ set heading on
19
+ column dummy noprint
20
+ column name format a19 heading \\\"Tablespace Name\\\"
21
+ column bytes format 999999999999 heading \"Total\"
22
+ column used format 999999999999 heading \"Used\"
23
+ column free format 999999999999 heading \"Free\"
24
+
25
+ select nvl(b.tablespace_name, nvl(a.tablespace_name,'"'UNKOWN'"')) name,
26
+ bytes_alloc bytes,
27
+ bytes_alloc-nvl(bytes_free,0) used,
28
+ nvl(bytes_free,0) free
29
+ from ( select sum(bytes) bytes_free,
30
+ tablespace_name
31
+ from sys.dba_free_space
32
+ group by tablespace_name ) a,
33
+ ( select sum(bytes) bytes_alloc,
34
+ tablespace_name
35
+ from sys.dba_data_files
36
+ group by tablespace_name
37
+ union all
38
+ select sum(bytes) bytes_alloc,
39
+ tablespace_name
40
+ from sys.dba_temp_files
41
+ group by tablespace_name )b
42
+ where a.tablespace_name (+) = b.tablespace_name;
43
+ "|sqlplus -S <%= @db_user %>/<%= @db_password %>'
44
+ EOF
45
+ end
46
+
47
+ def parse
48
+ report = []
49
+ @cmd ||= sql_cmd.result(binding)
50
+ oracle_output = IO.popen(@cmd)
51
+ report = oracle_output.readlines.join
52
+ oracle_output.close
53
+ oplogger.debug report
54
+ return report
55
+ end
56
+
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,21 @@
1
+ module Opstat
2
+ module Plugins
3
+ class Temper < Task
4
+
5
+ def initialize (name, queue, config)
6
+ super(name, queue, config)
7
+ self
8
+ end
9
+
10
+ def parse
11
+ temperIO = IO.popen('/usr/bin/temper')
12
+ report = temperIO.readlines
13
+ temperIO.close
14
+ return report[0].to_s
15
+ end
16
+
17
+ end
18
+ end
19
+ end
20
+ #TO CHECK - temper cmd
21
+
@@ -0,0 +1,42 @@
1
+ module Opstat
2
+ module Plugins
3
+ class Webobjects < Task
4
+
5
+ def initialize (name, queue, config)
6
+ merged_config = default_config.merge(config)
7
+ super(name, queue, merged_config)
8
+ oplogger.debug "Plugin config #{merged_config}"
9
+ @wo_monitor_password = merged_config['wo_monitor_password']
10
+ @wo_monitor_host = merged_config['wo_monitor_host']
11
+ @wo_monitor_url = merged_config['wo_monitor_url']
12
+ @wo_monitor_port = merged_config['wo_monitor_port']
13
+ self
14
+ end
15
+
16
+ def parse
17
+ report = []
18
+ curl_cmd ||= '/usr/bin/curl \'http://' + @wo_monitor_host + ':' + @wo_monitor_port + @wo_monitor_url + '?pw=' + @wo_monitor_password + '&type=all\'' + ' 2>/dev/null'
19
+ output_io = IO.popen(curl_cmd)
20
+ report = output_io.readlines.join
21
+ oplogger.debug report
22
+ output_io.close
23
+ return report
24
+ end
25
+
26
+ def default_config
27
+ {
28
+ 'interval' => 60,
29
+ 'wo_monitor_password' => "password",
30
+ 'wo_monitor_host' => "127.0.0.1",
31
+ 'wo_monitor_port' => "666",
32
+ 'wo_monitor_url' => "/cgi-bin/WebObjects/JavaMonitor.woa/admin/info",
33
+ }
34
+ end
35
+
36
+ def check_prerequisities
37
+ #NEEDED - curl
38
+ end
39
+
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,22 @@
1
+ module Opstat
2
+ module Plugins
3
+ class Xen < Task
4
+
5
+ def initialize (name, queue, config)
6
+ super(name, queue, config)
7
+ self
8
+ end
9
+
10
+ def parse
11
+ report = {}
12
+ xenIO = IO.popen('xentop -i 1 -b -f')
13
+ report = xenIO.readlines.join
14
+ xenIO.close
15
+ return report
16
+ end
17
+
18
+ end
19
+ end
20
+ end
21
+ #TO CHECK
22
+ #xl xentop
@@ -0,0 +1,20 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require '../version'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = 'opstat-plugins'
8
+ s.version = Opstat::VERSION
9
+ s.summary = "Opstat plugins"
10
+ s.description = "All opstat plugins"
11
+ s.authors = ["Krzysztof Tomczyk"]
12
+ s.email = 'ktomczyk@power.com.pl'
13
+ s.homepage = 'http://rubygems.org/gems/opstat-plugins'
14
+ s.license = "GPL-3.0"
15
+ s.files = `git ls-files`.split($/)
16
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
18
+ s.require_paths = ["lib"]
19
+ s.add_dependency "log4r", '~> 1'
20
+ end
data/spec/cpu_spec.rb ADDED
@@ -0,0 +1,39 @@
1
+ describe 'Cpu' do
2
+ describe 'Parsers' do
3
+ describe 'Single core cpu' do
4
+ before :each do
5
+ Opstat::Plugins.load_parser("cpu")
6
+ @cpu_parser = Opstat::Parsers::Cpu.new
7
+ end
8
+
9
+ it 'returns report with all parsed params when input data are correct' do
10
+ cpu_data = File.readlines('./spec/fixtures/parser_cpu_single_core.txt')
11
+ result_expected = [{:cpu_id=>"cpu", :user=>1250728, :nice=>0, :system=>12334059, :idle=>1072246656, :iowait=>2258392, :irq=>1882, :softirq=>16720396}, {:cpu_id=>"cpu0", :user=>1250728, :nice=>0, :system=>12334059, :idle=>1072246656, :iowait=>2258392, :irq=>1882, :softirq=>16720396}]
12
+ expect(@cpu_parser.parse_data(cpu_data)).to eq result_expected
13
+ end
14
+
15
+ it 'returns empty array for where input data are corrupted' do
16
+ cpu_data = File.readlines('./spec/fixtures/parser_cpu_single_core_corrupted.txt')
17
+ expect(@cpu_parser.parse_data(cpu_data)).to eq []
18
+ end
19
+ end
20
+ describe '16 core cpu' do
21
+ before :each do
22
+ Opstat::Plugins.load_parser("cpu")
23
+ @cpu_parser = Opstat::Parsers::Cpu.new
24
+ end
25
+
26
+ it 'returns report with all parsed params when input data are correct' do
27
+ cpu_data = File.readlines('./spec/fixtures/parser_cpu_16_core.txt')
28
+ result_expected = [{:cpu_id=>"cpu", :user=>343892052, :nice=>391591, :system=>179686992, :idle=>8255449896, :iowait=>176732547, :irq=>2779, :softirq=>11746154}, {:cpu_id=>"cpu0", :user=>94360332, :nice=>13194, :system=>25311161, :idle=>427954242, :iowait=>978710, :irq=>2763, :softirq=>10162361}, {:cpu_id=>"cpu1", :user=>19935742, :nice=>41131, :system=>9993729, :idle=>522847312, :iowait=>7471141, :irq=>0, :softirq=>76227}, {:cpu_id=>"cpu2", :user=>17431399, :nice=>19328, :system=>14027854, :idle=>516211416, :iowait=>12705909, :irq=>2, :softirq=>273247}, {:cpu_id=>"cpu3", :user=>19038390, :nice=>27211, :system=>10018441, :idle=>520554583, :iowait=>10788150, :irq=>2, :softirq=>33547}, {:cpu_id=>"cpu4", :user=>15210833, :nice=>21154, :system=>11990063, :idle=>517126821, :iowait=>16467095, :irq=>1, :softirq=>234627}, {:cpu_id=>"cpu5", :user=>18045912, :nice=>20675, :system=>9443090, :idle=>525876198, :iowait=>7063354, :irq=>0, :softirq=>33500}, {:cpu_id=>"cpu6", :user=>12909877, :nice=>16220, :system=>11508389, :idle=>516537343, :iowait=>19837969, :irq=>4, :softirq=>194260}, {:cpu_id=>"cpu7", :user=>16407672, :nice=>27254, :system=>9052205, :idle=>528906318, :iowait=>6309171, :irq=>0, :softirq=>34728}, {:cpu_id=>"cpu8", :user=>18507758, :nice=>41695, :system=>10483060, :idle=>515592285, :iowait=>15762144, :irq=>3, :softirq=>124925}, {:cpu_id=>"cpu9", :user=>17172074, :nice=>27679, :system=>9711178, :idle=>526408234, :iowait=>7228540, :irq=>0, :softirq=>50753}, {:cpu_id=>"cpu10", :user=>17662446, :nice=>16685, :system=>10462168, :idle=>513984988, :iowait=>18241095, :irq=>0, :softirq=>124343}, {:cpu_id=>"cpu11", :user=>15999291, :nice=>25596, :system=>9703005, :idle=>524560628, :iowait=>10247820, :irq=>2, :softirq=>50592}, {:cpu_id=>"cpu12", :user=>16366487, :nice=>24498, :system=>9901209, :idle=>518913461, :iowait=>15164664, :irq=>0, :softirq=>124311}, {:cpu_id=>"cpu13", :user=>14705950, :nice=>17703, :system=>9216785, :idle=>529464299, :iowait=>7107057, :irq=>0, :softirq=>51000}, {:cpu_id=>"cpu14", :user=>15866777, :nice=>25752, :system=>9765441, :idle=>520015817, :iowait=>14723151, :irq=>2, :softirq=>125789}, {:cpu_id=>"cpu15", :user=>14271112, :nice=>25816, :system=>9099214, :idle=>530495951, :iowait=>6636577, :irq=>0, :softirq=>51944}]
29
+ expect(@cpu_parser.parse_data(cpu_data)).to eq result_expected
30
+ end
31
+
32
+ it 'returns empty array where input data are corrupted' do
33
+ cpu_data = File.readlines('./spec/fixtures/parser_cpu_16_core_corrupted.txt')
34
+ expect(@cpu_parser.parse_data(cpu_data)).to eq []
35
+ end
36
+ end
37
+ end
38
+
39
+ end
@@ -0,0 +1,31 @@
1
+ module Opstat
2
+ class Config
3
+ include Singleton
4
+ def get(x)
5
+ {'log_level' => 'INFO'}
6
+ end
7
+ end
8
+ end
9
+
10
+ describe 'DiskIo' do
11
+ describe 'Parsers' do
12
+ describe 'load parser' do
13
+ before :each do
14
+ Opstat::Plugins.load_parser("disk_io")
15
+ @parser = Opstat::Parsers::DiskIo.new
16
+ end
17
+
18
+ it 'returns report with all parsed params when input data are correct' do
19
+ data = File.readlines('./spec/fixtures/parser_disk_io.txt')
20
+ result_expected = [{"major_number"=>"202", "minor_number"=>"1", "device_name"=>"xvda1", "reads_completed"=>"31695", "reads_merged"=>"3739", "sector_read"=>"1009346", "time_spent_reading_ms"=>"153560", "writes_completed"=>"1410152", "writes_merged"=>"271602", "sectors_written"=>"56969384", "time_spent_writing"=>"5198748", "io_in_progress"=>"0", "time_spent_doing_io_ms"=>"196968", "weighted_time_doing_io"=>"5351724"}, {"major_number"=>"202", "minor_number"=>"3", "device_name"=>"xvda3", "reads_completed"=>"526558", "reads_merged"=>"1581", "sector_read"=>"19944866", "time_spent_reading_ms"=>"512092", "writes_completed"=>"11071923", "writes_merged"=>"13466442", "sectors_written"=>"301940744", "time_spent_writing"=>"13944204", "io_in_progress"=>"0", "time_spent_doing_io_ms"=>"4646648", "weighted_time_doing_io"=>"14462220"}]
21
+ expect(@parser.parse_data(data)).to eq result_expected
22
+ end
23
+
24
+ it 'returns empty array for where input data are corrupted' do
25
+ data = File.readlines('./spec/fixtures/parser_disk_io_corrupted.txt')
26
+ expect(@parser.parse_data(data)).to eq []
27
+ end
28
+ end
29
+ end
30
+ end
31
+
data/spec/disk_spec.rb ADDED
@@ -0,0 +1,31 @@
1
+ module Opstat
2
+ class Config
3
+ include Singleton
4
+ def get(x)
5
+ {'log_level' => 'INFO'}
6
+ end
7
+ end
8
+ end
9
+
10
+ describe 'Disk' do
11
+ describe 'Parsers' do
12
+ describe 'load parser' do
13
+ before :each do
14
+ Opstat::Plugins.load_parser("disk")
15
+ @parser = Opstat::Parsers::Disk.new
16
+ end
17
+
18
+ it 'returns report with all parsed params when input data are correct' do
19
+ data = File.readlines('./spec/fixtures/parser_disk_3_mounts.txt')
20
+ result_expected = [{:device=>"/dev/xvda1", :inode_total=>655360, :inode_used=>188338, :inode_free=>467022, :block_total=>9649464, :block_used=>3628152, :block_free=>6021312, :fstype=>"ext4", :mount=>"/"}, {:device=>"/dev/xvda3", :inode_total=>1638400, :inode_used=>339852, :inode_free=>1298548, :block_total=>24344892, :block_used=>6555088, :block_free=>17789804, :fstype=>"ext4", :mount=>"/var"}]
21
+ expect(@parser.parse_data(data)).to eq result_expected
22
+ end
23
+
24
+ it 'returns empty array for where input data are corrupted' do
25
+ data = File.readlines('./spec/fixtures/parser_disk_corrupted.txt')
26
+ expect(@parser.parse_data(data)).to eq []
27
+ end
28
+ end
29
+ end
30
+ end
31
+
@@ -0,0 +1,24 @@
1
+ cpu 343892052 391591 179686992 8255449896 176732547 2779 11746154 0 0 0
2
+ cpu0 94360332 13194 25311161 427954242 978710 2763 10162361 0 0 0
3
+ cpu1 19935742 41131 9993729 522847312 7471141 0 76227 0 0 0
4
+ cpu2 17431399 19328 14027854 516211416 12705909 2 273247 0 0 0
5
+ cpu3 19038390 27211 10018441 520554583 10788150 2 33547 0 0 0
6
+ cpu4 15210833 21154 11990063 517126821 16467095 1 234627 0 0 0
7
+ cpu5 18045912 20675 9443090 525876198 7063354 0 33500 0 0 0
8
+ cpu6 12909877 16220 11508389 516537343 19837969 4 194260 0 0 0
9
+ cpu7 16407672 27254 9052205 528906318 6309171 0 34728 0 0 0
10
+ cpu8 18507758 41695 10483060 515592285 15762144 3 124925 0 0 0
11
+ cpu9 17172074 27679 9711178 526408234 7228540 0 50753 0 0 0
12
+ cpu10 17662446 16685 10462168 513984988 18241095 0 124343 0 0 0
13
+ cpu11 15999291 25596 9703005 524560628 10247820 2 50592 0 0 0
14
+ cpu12 16366487 24498 9901209 518913461 15164664 0 124311 0 0 0
15
+ cpu13 14705950 17703 9216785 529464299 7107057 0 51000 0 0 0
16
+ cpu14 15866777 25752 9765441 520015817 14723151 2 125789 0 0 0
17
+ cpu15 14271112 25816 9099214 530495951 6636577 0 51944 0 0 0
18
+ intr 24973625581 28 2 0 0 0 0 0 0 74 0 0 0 4 0 0 0 0 0 0 0 0 0 349202109 2011 0 0 0 0 0 0 0 0 0 0 0 0 6722901 3462703 11633579 3319711 11007411 3345456 10104253 3339444 3128486 3335690 3044697 3216691 3087010 3240335 3096072 3262779 35 0 0 0 517728680 0 0 0 0 0 0 0 205522126 0 0 0 0 0 0 0 53419777 699986805 775927462 175759886 100711723 2376409066 146705878 2189068584 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
19
+ ctxt 41618507553
20
+ btime 1461769511
21
+ processes 102914327
22
+ procs_running 4
23
+ procs_blocked 1
24
+ softirq 8329242056 205 1828733535 1131940 2226566559 432238438 0 434707839 1694137616 4769737 1706956187
@@ -0,0 +1,24 @@
1
+ cpu 179686992 8255449896 176732547 2779
2
+ cpu0 427954242 978710 2763 101623
3
+ cpu1 522847312 7471141 0 76227
4
+ cpu2 14027854 516211416 12705909 2 273247
5
+ cpu3 10018441 520554583 10788150 2 33547
6
+ cpu4 11990063 517126821 16467095 1 234627
7
+ cpu5 9443090 525876198 7063354 0 33500
8
+ cpu6 11508389 516537343 19837969 4 194260
9
+ cpu7 9052205 528906318 6309171 0 34728
10
+ cpu8 10483060 515592285 15762144 3 124925
11
+ cpu9 9711178 526408234 7228540 0 50753
12
+ cpu10 10462168 513984988 18241095 0 124343
13
+ cpu11 9703005 524560628 10247820 2 50592
14
+ cpu12 9901209 518913461 15164664 0 124311
15
+ cpu13 9216785 529464299 7107057 0 51000
16
+ cpu14 9765441 520015817 14723151 2 125789
17
+ cpu15 9099214 530495951 6636577 0 51944
18
+ intr 24973625581 28 2 0 0 0 0 0 0 74 0 0 0 4 0 0 0 0 0 0 0 0 0 349202109 2011 0 0 0 0 0 0 0 0 0 0 0 0 6722901 3462703 11633579 3319711 11007411 3345456 10104253 3339444 3128486 3335690 3044697 3216691 3087010 3240335 3096072 3262779 35 0 0 0 517728680 0 0 0 0 0 0 0 205522126 0 0 0 0 0 0 0 53419777 699986805 775927462 175759886 100711723 2376409066 146705878 2189068584 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
19
+ ctxt 41618507553
20
+ btime 1461769511
21
+ processes 102914327
22
+ procs_running 4
23
+ procs_blocked 1
24
+ softirq 8329242056 205 1828733535 1131940 2226566559 432238438 0 434707839 1694137616 4769737 1706956187
@@ -0,0 +1,10 @@
1
+ cpu 1250728 0 12334059 1072246656 2258392 1882 16720396 7041927 0 0
2
+ cpu0 1250728 0 12334059 1072246656 2258392 1882 16720396 7041927 0 0
3
+ intr 1021935967 0 2 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 91 0 0 36863947 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2805154616 0 0 0 0 12 49402 0 0 0 0 0 4262 542327626 11 194416030 4263 542910236 0 6 0 6 22587814 14148 59 331 323 392 8206773 6732340 4247859 45223345 242 252 346 22514748 230488 138900286 1376005005 275 411 9935324 18346544 83497137 494543550 1 372 453 6866565 564782 28958911 5040259 43065234 261846504 1 1 1 6169168 10860638 261652568 1 1 1 245 357 1419 436 22 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4
+ ctxt 28076998076
5
+ btime 1456191750
6
+ processes 46027160
7
+ procs_running 1
8
+ procs_blocked 0
9
+ softirq 5416843564 8 2737656941 81 372411789 1829291655 0 13340739 0 107826 464034525
10
+
@@ -0,0 +1,9 @@
1
+ cpu 1250728 12334059 1072246656 2258392 1882 16720396
2
+ cpu0 1250728 12334059 1072246656 2258392 1882 16720396
3
+ intr 1021935967 0 2 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 91 0 0 36863947 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2805154616 0 0 0 0 12 49402 0 0 0 0 0 4262 542327626 11 194416030 4263 542910236 0 6 0 6 22587814 14148 59 331 323 392 8206773 6732340 4247859 45223345 242 252 346 22514748 230488 138900286 1376005005 275 411 9935324 18346544 83497137 494543550 1 372 453 6866565 564782 28958911 5040259 43065234 261846504 1 1 1 6169168 10860638 261652568 1 1 1 245 357 1419 436 22 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4
+ ctxt 28076998076
5
+ btime 1456191750
6
+ processes 46027160
7
+ procs_running 1
8
+ procs_blocked 0
9
+ softirq 5416843564 8 2737656941 81 372411789 1829291655 0 13340739 0 107826 464034525
@@ -0,0 +1,9 @@
1
+ Filesystem Type Used Avail Inodes IUsed IFree Mounted on
2
+ /dev/xvda1 ext4 3628152 6021312 655360 188338 467022 /
3
+ udev devtmpfs 0 10240 507718 270 507448 /dev
4
+ tmpfs tmpfs 80408 741696 513813 318 513495 /run
5
+ tmpfs tmpfs 0 2055252 513813 1 513812 /dev/shm
6
+ tmpfs tmpfs 0 5120 513813 6 513807 /run/lock
7
+ tmpfs tmpfs 0 2055252 513813 13 513800 /sys/fs/cgroup
8
+ /dev/xvda3 ext4 6555088 17789804 1638400 339852 1298548 /var
9
+
@@ -0,0 +1,9 @@
1
+ Filesystem Type Used Avail Inodes IUsed IFree Mounted on
2
+ /dev/xvda1 ext4 6021312 655360 188338 467022
3
+ udev devtmpfs 0 10240 507718 270 507448 /dev
4
+ tmpfs tmpfs 80408 741696 513813 318 513495 /run
5
+ tmpfs tmpfs 0 2055252 513813 1 513812 /dev/shm
6
+ tmpfs tmpfs 0 5120 513813 6 513807 /run/lock
7
+ tmpfs tmpfs 0 2055252 513813 13 513800 /sys/fs/cgroup
8
+ /dev/xvda3 ext4 6555088 17789804 1638400 1298548 /var
9
+
@@ -0,0 +1,2 @@
1
+ 202 1 xvda1 31695 3739 1009346 153560 1410152 271602 56969384 5198748 0 196968 5351724
2
+ 202 3 xvda3 526558 1581 19944866 512092 11071923 13466442 301940744 13944204 0 4646648 14462220
@@ -0,0 +1,2 @@
1
+ 202 1 xvda1 3739 1009346 153560 1410152 271602 56969384 5198748 0 196968 5351724
2
+ 202 3 xvda3 aaa 526558 1581 19944866 512092 11071923 13466442 301940744 13944204 0 4646648 14462220
@@ -0,0 +1,2 @@
1
+ # pxname,svname,qcur,qmax,scur,smax,slim,stot,bin,bout,dreq,dresp,ereq,econ,eresp,wretr,wredis,status,weight,act,bck,chkfail,chkdown,lastchg,downtime,qlimit,pid,iid,sid,throttle,lbtot,tracked,type,rate,rate_lim,rate_max,check_status,check_code,check_duration,hrsp_1xx,hrsp_2xx,hrsp_3xx,hrsp_4xx,hrsp_5xx,hrsp_other,hanafail,req_rate,req_rate_max,req_tot,cli_abrt,srv_abrt,comp_in,comp_out,comp_byp,comp_rsp,lastsess,last_chk,last_agt,qtime,ctime,rtime,ttime,agent_status,agent_code,agent_duration,check_desc,agent_desc,check_rise,check_fall,check_health,agent_rise,agent_fall,agent_health,addr,cookie,mode,algo,conn_rate,conn_rate_max,conn_tot,intercepted,dcon,dses,
2
+ backend-varnish,BACKEND,0,0,0,4,500,2301,1041031,8319027,0,0,,0,0,0,0,UP,2,2,0,,0,1130529,0,,1,4,0,,2301,,1,0,,15,,,,0,1096,58,1147,0,0,,,,2301,0,0,2732938,612264,0,372,42,,,0,0,14,463,,,,,,,,,,,,,,http,,,,,,,,
@@ -0,0 +1,2 @@
1
+ pxname,svname,qcur,qmax,scur,smax,slim,stot,bin,bout,dreq,dresp,ereq,econ,eresp,wretr,wredis,status,weight,act,bck,chkfail,chkdown,lastchg,downtime,qlimit,pid,iid,sid,throttle,lbtot,tracked,type,rate,rate_lim,rate_max,check_status,check_code,check_duration,hrsp_1xx,hrsp_2xx,hrsp_3xx,hrsp_4xx,hrsp_5xx,hrsp_other,hanafail,req_rate,req_rate_max,req_tot,cli_abrt,srv_abrt,comp_in,comp_out,comp_byp,comp_rsp,lastsess,last_chk,last_agt,qtime,ctime,rtime,ttime,agent_status,agent_code,agent_duration,check_desc,agent_desc,check_rise,check_fall,check_health,agent_rise,agent_fall,agent_health,addr,cookie,mode,algo,conn_rate,conn_rate_max,conn_tot,intercepted,dcon,dses,stiats, celowy_blad, 0, 0, 0, 0, 200, 0, nil, nil, 0, 0, ,0, 0, 0,
2
+ 0,UP,0,0,0,,0,2010202,,,1,24,0,,0,,1,0,,0,,,,0,0,0,0,0,0,,,,0,0,0,0,0,0,0,0,,,0,0,0,118,,,,,,,,,,,,,,http,,,,,,,,
@@ -0,0 +1,6 @@
1
+ # pxname,svname,qcur,qmax,scur,smax,slim,stot,bin,bout,dreq,dresp,ereq,econ,eresp,wretr,wredis,status,weight,act,bck,chkfail,chkdown,lastchg,downtime,qlimit,pid,iid,sid,throttle,lbtot,tracked,type,rate,rate_lim,rate_max,check_status,check_code,check_duration,hrsp_1xx,hrsp_2xx,hrsp_3xx,hrsp_4xx,hrsp_5xx,hrsp_other,hanafail,req_rate,req_rate_max,req_tot,cli_abrt,srv_abrt,comp_in,comp_out,comp_byp,comp_rsp,lastsess,last_chk,last_agt,qtime,ctime,rtime,ttime,agent_status,agent_code,agent_duration,check_desc,agent_desc,check_rise,check_fall,check_health,agent_rise,agent_fall,agent_health,addr,cookie,mode,algo,conn_rate,conn_rate_max,conn_tot,intercepted,dcon,dses,
2
+ frontend-http,FRONTEND,,,0,3,1000,1117,234633,28452829,0,0,2,,,,,OPEN,,,,,,,,,1,2,0,,,,0,0,0,2,,,,0,2,57,2,0,0,,0,4,61,,,0,0,0,0,,,,,,,,,,,,,,,,,,,,,http,,0,2,22,0,0,0,
3
+ frontend-https,FRONTEND,,,0,3,1000,1117,234633,28452829,0,0,2,,,,,OPEN,,,,,,,,,1,2,0,,,,0,0,0,2,,,,0,2,57,2,0,0,,0,4,61,,,0,0,0,0,,,,,,,,,,,,,,,,,,,,,http,,0,2,22,0,0,0,
4
+ backend-varnish-ifirma,varnishpm02-staging,0,0,0,2,,1149,507182,4138662,,0,,0,0,0,0,UP,1,1,0,1,0,1130529,0,,1,4,2,,1149,,2,0,,7,L7OK,200,1,0,541,31,577,0,0,,,,,0,0,,,,,42,2,3,4,,,,,,http,,,,,,,,
5
+ backend-varnish-ifirma,BACKEND,0,0,0,4,500,2301,1041031,8319027,0,0,,0,0,0,0,UP,2,2,0,,0,1130529,0,,1,4,0,,2301,,1,0,,15,,,,0,1096,58,1147,0,0,,,,2301,0,0,2732938,612264,0,372,42,,,0,0,14,463,,,,,,,,,,,,,,http,,,,,,,,
6
+ backend-varnish,BACKEND,0,0,0,4,500,2301,1041031,8319027,0,0,,0,0,0,0,UP,2,2,0,,0,1130529,0,,1,4,0,,2301,,1,0,,15,,,,0,1096,58,1147,0,0,,,,2301,0,0,2732938,612264,0,372,42,,,0,0,14,463,,,,,,,,,,,,,,http,,,,,,,,
@@ -0,0 +1,5 @@
1
+ # pxname,svname,qcur,qmax,scur,smax,slim,stot,bin,bout,dreq,dresp,ereq,econ,eresp,wretr,wredis,status,weight,act,bck,chkfail,chkdown,lastchg,downtime,qlimit,pid,iid,sid,throttle,lbtot,tracked,type,rate,rate_lim,rate_max,check_status,check_code,check_duration,hrsp_1xx,hrsp_2xx,hrsp_3xx,hrsp_4xx,hrsp_5xx,hrsp_other,hanafail,req_rate,req_rate_max,req_tot,cli_abrt,srv_abrt,comp_in,comp_out,comp_byp,comp_rsp,lastsess,last_chk,last_agt,qtime,ctime,rtime,ttime,agent_status,agent_code,agent_duration,check_desc,agent_desc,check_rise,check_fall,check_health,agent_rise,agent_fall,agent_health,addr,cookie,mode,algo,conn_rate,conn_rate_max,conn_tot,intercepted,dcon,dses,
2
+ frontend-http,FRONTEND,,,0,3,1000,1117,234633,28452829,0,0,2,,,,,OPEN,,,,,,,,,1,2,0,,,,0,0,0,2,,,,0,2,57,2,0,0,,0,4,61,,,0,0,0,0,,,,,,,,,,,,,,,,,,,,,http,,0,2,22,0,0,0,
3
+ backend-varnish-ifirma,varnishpm02-staging,0,0,0,2,,1149,507182,4138662,,0,,0,0,0,0,UP,1,1,0,1,0,1130529,0,,1,4,2,,1149,,2,0,,7,L7OK,200,1,0,541,31,577,0,0,,,,,0,0,,,,,42,2,3,4,,,,,,http,,,,,,,,
4
+
5
+
@@ -0,0 +1 @@
1
+ 0.00 0.01 0.05 1/167 5647
@@ -0,0 +1,2 @@
1
+ 0.00 0.05 1/167 5647
2
+