Refactoring: Moved check parameters from unsorted.py to dedicated modules (CMK-1393)
[check_mk.git] / pnp-templates / check_mk-livestatus_status.php
blob9f98b201b6cdbb29f5ec3b3afaffe72e6e1c9a6b
1 <?php
2 # +------------------------------------------------------------------+
3 # | ____ _ _ __ __ _ __ |
4 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
5 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
6 # | | |___| | | | __/ (__| < | | | | . \ |
7 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
8 # | |
9 # | Copyright Mathias Kettner 2014 mk@mathias-kettner.de |
10 # +------------------------------------------------------------------+
12 # This file is part of Check_MK.
13 # The official homepage is at http://mathias-kettner.de/check_mk.
15 # check_mk is free software; you can redistribute it and/or modify it
16 # under the terms of the GNU General Public License as published by
17 # the Free Software Foundation in version 2. check_mk is distributed
18 # in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
19 # out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
20 # PARTICULAR PURPOSE. See the GNU General Public License for more de-
21 # tails. You should have received a copy of the GNU General Public
22 # License along with GNU Make; see the file COPYING. If not, write
23 # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
24 # Boston, MA 02110-1301 USA.
26 # Check Performance
27 $site_parts = explode("_", $servicedesc);
28 $site = $site_parts[1];
30 $opt[1] = "--vertical-label 'Checks per second' -X0 -l0 --title \"OMD site $site / Check performance\" ";
31 $ds_name[1] = "Check performance";
33 $def[1] = ""
34 . "DEF:host_checks=$RRDFILE[1]:$DS[1]:MAX "
35 . "DEF:service_checks=$RRDFILE[2]:$DS[2]:MAX "
36 . "AREA:host_checks#842:\"Host checks \" "
37 . "GPRINT:host_checks:AVERAGE:\"% 6.1lf/s avg\" "
38 . "GPRINT:host_checks:LAST:\"% 6.1lf/s last\\n\" "
39 . "AREA:service_checks#f84:\"Service checks \":STACK "
40 . "GPRINT:service_checks:AVERAGE:\"% 6.1lf/s avg\" "
41 . "GPRINT:service_checks:LAST:\"% 6.1lf/s last\\n\" "
42 . "";
45 $opt[2] = "--vertical-label 'Events per second' -X0 -l0 --title \"OMD site $site / Livestatus performance\" ";
46 $ds_name[2] = "Livestatus performance";
48 $def[2] = ""
49 . "DEF:connects=$RRDFILE[4]:$DS[4]:MAX "
50 . "DEF:requests=$RRDFILE[5]:$DS[5]:MAX "
51 . "AREA:requests#abc:\"Livestatus Requests \" "
52 . "GPRINT:requests:AVERAGE:\"% 6.1lf/s avg\" "
53 . "GPRINT:requests:LAST:\"% 6.1lf/s last\\n\" "
54 . "AREA:connects#678:\"Livestatus Connects \" "
55 . "GPRINT:connects:AVERAGE:\"% 6.1lf/s avg\" "
56 . "GPRINT:connects:LAST:\"% 6.1lf/s last\\n\" "
57 . "";
59 $opt[3] = "--vertical-label 'Requests per Connect' -X0 -l0 --title \"OMD site $site / Livestatus connection usage\" ";
60 $ds_name[3] = "Livestatus connection usage";
62 $def[3] = ""
63 . "DEF:connects=$RRDFILE[4]:$DS[4]:MAX "
64 . "DEF:requests=$RRDFILE[5]:$DS[5]:MAX "
65 . "CDEF:rpcs=requests,connects,/ "
66 . "AREA:rpcs#8a3:\"Requests per Connection\" "
67 . "GPRINT:rpcs:AVERAGE:\"% 6.1lf/s avg\" "
68 . "GPRINT:rpcs:LAST:\"% 6.1lf/s last\\n\" "
69 . "";