Module: check_mk
Branch: master
Commit: b01773ba2015e6240083a5cf77433158a3cbdfe2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b01773ba2015e6…
Author: Florian Kromer <fk(a)mathias-kettner.de>
Date: Mon Nov 26 13:37:07 2018 +0100
add regression test of diskstat
for documentation purposes (info, parsed, etc.)
Change-Id: Ia2ddef1180c64ad401a87261f5418cfc84cbacd9
---
.../generictests/datasets/diskstat_regression.py | 145 +++++++++++++++++++++
1 file changed, 145 insertions(+)
diff --git a/tests/unit/checks/generictests/datasets/diskstat_regression.py
b/tests/unit/checks/generictests/datasets/diskstat_regression.py
new file mode 100644
index 0000000..22e448c
--- /dev/null
+++ b/tests/unit/checks/generictests/datasets/diskstat_regression.py
@@ -0,0 +1,145 @@
+
+
+checkname = 'diskstat'
+
+
+info = [['node_name', '1543231458'],
+ ['node_name',
+ '8',
+ '0',
+ 'sda',
+ '123905',
+ '13292',
+ '5522025',
+ '117912',
+ '242674',
+ '178476',
+ '9280922',
+ '421456',
+ '0',
+ '60752',
+ '540956'],
+ ['node_name',
+ '8',
+ '1',
+ 'sda1',
+ '186',
+ '1005',
+ '12578',
+ '128',
+ '2',
+ '0',
+ '2',
+ '0',
+ '0',
+ '80',
+ '128'],
+ ['node_name',
+ '8',
+ '2',
+ 'sda2',
+ '129',
+ '11',
+ '8648',
+ '168',
+ '10',
+ '5',
+ '120',
+ '72',
+ '0',
+ '180',
+ '240'],
+ ['node_name',
+ '8',
+ '3',
+ 'sda3',
+ '123525',
+ '12276',
+ '5497503',
+ '117448',
+ '200026',
+ '178471',
+ '9280800',
+ '407632',
+ '0',
+ '48464',
+ '526668'],
+ ['node_name',
+ '253',
+ '0',
+ 'dm-0',
+ '136040',
+ '0',
+ '5495626',
+ '230484',
+ '422602',
+ '0',
+ '9280800',
+ '3477080',
+ '0',
+ '68956',
+ '3708180'],
+ ['node_name',
+ '253',
+ '1',
+ 'dm-1',
+ '135831',
+ '0',
+ '5490130',
+ '230348',
+ '416201',
+ '0',
+ '9280800',
+ '3477776',
+ '0',
+ '69388',
+ '3708804'],
+ ['node_name',
+ '253',
+ '2',
+ 'dm-2',
+ '100',
+ '0',
+ '4552',
+ '148',
+ '0',
+ '0',
+ '0',
+ '0',
+ '0',
+ '132',
+ '148'],
+ ['node_name', '[dmsetup_info]']]
+
+
+discovery = {'': [('SUMMARY', 'diskstat_default_levels')]}
+
+
+checks = {'': [('SUMMARY',
+ 'default',
+ [(0, 'Utilization: 0.0%', []),
+ (0, 'Read: 0.00 B/s', []),
+ (0, 'Write: 0.00 B/s', []),
+ (0, 'Average Wait: 0.00 ms', []),
+ (0, 'Average Read Wait: 0.00 ms', []),
+ (0, 'Average Write Wait: 0.00 ms', []),
+ (0, 'Latency: 0.00 ms', []),
+ (0, 'Average Queue Length: 0.00', []),
+ (0,
+ '',
+ [('disk_average_read_request_size', 0.0, None, None, None,
None),
+ ('disk_average_read_wait', 0.0, None, None, None, None),
+ ('disk_average_request_size', 0.0, None, None, None, None),
+ ('disk_average_wait', 0.0, None, None, None, None),
+ ('disk_average_write_request_size', 0.0, None, None, None,
None),
+ ('disk_average_write_wait', 0.0, None, None, None, None),
+ ('disk_latency', 0.0, None, None, None, None),
+ ('disk_queue_length', 0.0, None, None, None, None),
+ ('disk_read_ios', 0.0, None, None, None, None),
+ ('disk_read_throughput', 0.0, None, None, None, None),
+ ('disk_utilization', 0.0, None, None, None, None),
+ ('disk_write_ios', 0.0, None, None, None, None),
+ ('disk_write_throughput', 0.0, None, None, None, None)])])]}
+
+
+extra_sections = {'': [None]}