Cleanup config.nodes_of
[check_mk.git] / checks / sansymphony_serverstatus
blob1a489ae192a3e5fffb6010782d6c2ec4e7470dfe
1 #!/usr/bin/python
2 # -*- encoding: utf-8; py-indent-offset: 4 -*-
3 # +------------------------------------------------------------------+
4 # | ____ _ _ __ __ _ __ |
5 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
6 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
7 # | | |___| | | | __/ (__| < | | | | . \ |
8 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
9 # | |
10 # | copyright mathias kettner 2013 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 # ails. 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 # <<<sansymphony_serverstatus>>>
28 # Online WritebackGlobal
31 def inventory_sansymphony_serverstatus(info):
32 return [(None, None)]
35 def check_sansymphony_serverstatus(_no_item, _no_params, info):
36 status, cachestate = info[0]
37 if status == "Online" and cachestate == "WritebackGlobal":
38 return 0, "SANsymphony is %s and its cache is in %s mode" % (status, cachestate)
39 elif status == "Online" and cachestate != "WritebackGlobal":
40 return 1, "SANsymphony is %s but its cache is in %s mode" % (status, cachestate)
41 return 2, "SANsymphony is %s" % status
44 check_info['sansymphony_serverstatus'] = {
45 "check_function": check_sansymphony_serverstatus,
46 "inventory_function": inventory_sansymphony_serverstatus,
47 "service_description": "sansymphony Serverstatus",