2 # -*- encoding: utf-8; py-indent-offset: 4 -*-
3 # +------------------------------------------------------------------+
4 # | ____ _ _ __ __ _ __ |
5 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
6 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
7 # | | |___| | | | __/ (__| < | | | | . \ |
8 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
10 # | Copyright Mathias Kettner 2017 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.
27 # <<<storeonce_stores:sep(9)>>>
30 # Name VM_WinSrv_Store
31 # Description Catalyst Store for Windows based Server
33 # Creation Time UTC 1434446799
38 # Number Of Catalyst Items 274
39 # User Data Stored 1467.568399314
40 # Size On Disk 604.827284898
43 # Creation On 2015-06-16T09:26:39Z
44 # Last Modified 2015-06-16T09:26:39Z
45 # primaryTransferPolicy 0
46 # primaryTransferPolicyString High Bandwidth
47 # secondaryTransferPolicy 1
48 # secondaryTransferPolicyString Low Bandwidth
49 # userDataSizeLimitBytes 0
50 # dedupedDataSizeOnDiskLimitBytes 0
51 # dataJobRetentionDays 90
52 # inboundCopyJobRetentionDays 90
53 # outboundCopyJobRetentionDays 90
54 # supportStorageModeVariableBlockDedupe true
55 # supportStorageModeFixedBlockDedupe true
56 # supportStorageModeNoDedupe true
57 # supportWriteSparse false
58 # supportWriteInPlace false
59 # supportRawReadWrite true
60 # supportMultipleObjectOpeners true
61 # supportMultipleObjectWrites false
62 # supportCloneExtent true
63 # userBytes 1467568399314
64 # diskBytes 604827284898
68 # numDestinationCopyJobs 0
70 # is store encrypted false
72 # secure erase mode description Secure_Erase_NoPassCount
74 # teamUUID 0000014DFBB121BB2954110834BAD600
79 return "ServiceSet %s Store %s" % (data
["ServiceSet ID"], data
["Name"])
82 def inventory_storeonce_stores(parsed
):
83 for values
in parsed
.itervalues():
84 yield _get_item(values
), {}
87 def check_storeonce_stores(item
, _no_params
, parsed
):
88 for values
in parsed
.itervalues():
89 if _get_item(values
) != item
:
92 state
= translate_storeonce_status(values
["Health Level"])
93 yield state
, "Status: %s" % values
["Status"]
95 size
= float(values
["diskBytes"])
96 yield 0, "Size: %s" % get_bytes_human_readable(size
), [("data_size", size
)]
98 if "Dedupe Ratio" in values
:
99 dedup
= float(values
["Dedupe Ratio"])
100 yield 0, "Dedup ratio: %.2f" % dedup
, [("dedup_rate", dedup
)]
102 description
= values
.get("Description")
104 yield 0, "Description: %s" % description
107 check_info
['storeonce_stores'] = {
108 'parse_function': parse_storeonce_servicesets
,
109 'inventory_function': inventory_storeonce_stores
,
110 'check_function': check_storeonce_stores
,
111 'service_description': '%s',
112 'has_perfdata': True,
113 'includes': ["storeonce.include"],