-
Notifications
You must be signed in to change notification settings - Fork 3
/
check_ms_win_disk_load.php
45 lines (38 loc) · 1.28 KB
/
check_ms_win_disk_load.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/*
* PNP4Nagios template for check_ms_win_disk_load Nagios plugin
*
* Version 2016022601(YYYYMMDDxx)
*
* Author: Ivan Vinogradov [email protected]
*
* The latest version can be found at:
* https://github.com/vinogradovia/check_ms_win_disk_load/
*
* Original plugin : https://github.com/willemdh/check_ms_win_disk_load
*/
$colors = array(
'#ffffff',
'#058dc7',
'#50b432',
'#ed561b',
'#dddf00',
'#24cbe5',
'#64e572',
'#ff9655',
'#fff263',
);
$opt[1] = "--vertical-label \"Various stats \" -l 0 -r --title \" " . $this->MACRO['DISP_HOSTNAME'] . " / " . $this->MACRO['DISP_SERVICEDESC'] . " \" ";
$def[1] = '';
foreach ($DS as $i) {
$def[1] .= rrd::def("var$i", $RRDFILE[1], $DS[$i], 'AVERAGE');
$def[1] .= rrd::line2("var$i", $colors[$i], "$NAME[$i]");
$def[1] .= rrd::gprint("var$i" ,'LAST' ,"Last\:%5.0lf%s$UNIT[1]");
$def[1] .= rrd::gprint("var$i" ,'MIN' ,"min\:%5.0lf%s$UNIT[1]");
$def[1] .= rrd::gprint("var$i" ,'MAX' ,"max\:%5.0lf%s$UNIT[1]");
$def[1] .= rrd::gprint("var$i" ,'AVERAGE' ,"avg\:%5.0lf%s$UNIT[1] \\r");
};
$def[1] .= rrd::comment("\\r");
$def[1] .= rrd::comment("Disk Load Monitoring on Windows\\r");
$def[1] .= rrd::comment("Command " . $TEMPLATE[1] . "\\r");
?>