2 # -*- encoding: utf-8; py-indent-offset: 4 -*-
3 # +------------------------------------------------------------------+
4 # | ____ _ _ __ __ _ __ |
5 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
6 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
7 # | | |___| | | | __/ (__| < | | | | . \ |
8 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
10 # | Copyright Mathias Kettner 2014 mk@mathias-kettner.de |
11 # +------------------------------------------------------------------+
13 # This file is part of Check_MK.
14 # The official homepage is at http://mathias-kettner.de/check_mk.
16 # check_mk is free software; you can redistribute it and/or modify it
17 # under the terms of the GNU General Public License as published by
18 # the Free Software Foundation in version 2. check_mk is distributed
19 # in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
20 # out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
21 # PARTICULAR PURPOSE. See the GNU General Public License for more de-
22 # tails. You should have received a copy of the GNU General Public
23 # License along with GNU Make; see the file COPYING. If not, write
24 # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
25 # Boston, MA 02110-1301 USA.
28 # hdisk3 0.9 237.0 9.1 1337054478 1628926522
29 # hdisk5 0.9 237.1 8.8 1333731705 1633897629
30 # hdisk7 0.9 256.2 10.1 1537047014 1669194644
31 # hdisk6 0.9 236.6 9.1 1334163361 1626627852
32 # hdisk2 0.9 237.6 9.1 1334458233 1639383130
33 # hdisk9 0.8 239.4 9.3 1337740029 1658392394
34 # hdisk8 0.9 238.3 8.9 1332262996 1649741796
35 # hdisk4 0.9 237.4 8.8 1332426157 1638419364
36 # hdisk13 0.5 238.1 8.3 394246756 2585031872
37 # hdisk11 0.5 238.3 8.3 397601918 2584807275
44 # 5. Kb_read -> Kilobytes read since system boot
45 # 6. Kb_wrtn -> Kilobytes written since system boot
48 def parse_aix_diskiod(info
):
49 #TODO use 'check_diskstat_dict' which needs the following format
52 # 'average_read_request_size' : 0.0,
53 # 'average_read_wait' : 0.0,
54 # 'average_request_size' : 40569.90476190476,
55 # 'average_wait' : 0.761904761904762,
56 # 'average_write_request_size' : 40569.90476190476,
57 # 'average_write_wait' : 0.0007619047619047619,
59 # 'read_throughput' : 0.0,
60 # 'latency' : 0.00038095238095238096,
61 # 'utilization' : 0.0006153846153846154,
62 # 'write_ios' : 1.6153846153846154,
63 # 'write_throughput' : 65536.0,
64 # 'queue_length' : 0.0,
69 for node_info
, device
, _tm_act
, _kbps
, _tps
, kb_read
, kb_written
in info
:
70 converted
.append((node_info
, device
, int(kb_read
) * 1024, int(kb_written
) * 1024))
74 def check_aix_diskiod(item
, params
, parsed
):
75 return check_diskstat_generic(item
, params
, time
.time(), parsed
, mode
='bytes')
78 check_info
["aix_diskiod"] = {
79 'parse_function': parse_aix_diskiod
,
80 'check_function': check_aix_diskiod
,
81 'inventory_function': inventory_diskstat_generic
,
82 'service_description': 'Disk IO %s',
86 'includes': ["diskstat.include"],