Last change
on this file since 527 was
42,
checked in by presbrey, 18 years ago
|
scripts.mit.edu NOC graphing
|
File size:
1.1 KB
|
Rev | Line | |
---|
[42] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | (c)2006 Joe Presbrey <presbrey@mit.edu> |
---|
| 4 | */ |
---|
| 5 | |
---|
| 6 | $RRD_PATH = realpath(dirname(__FILE__).'/../ng/rrd'); |
---|
| 7 | $RRD_IGNORE['tcp'][] = 'critical_time'; |
---|
| 8 | $RRD_IGNORE['tcp'][] = 'warning_time'; |
---|
| 9 | $RRD_IGNORE['tcp'][] = 'socket_timeout'; |
---|
| 10 | $RRD_IGNORE['users'][] = 'uwarn'; |
---|
| 11 | $RRD_IGNORE['users'][] = 'ucrit'; |
---|
| 12 | $RRD_IGNORE['mysql'] = $RRD_IGNORE['tcp']; |
---|
| 13 | $RRD_IGNORE['https'] = $RRD_IGNORE['tcp']; |
---|
| 14 | $RRD_IGNORE['disk'][] = 'root'; |
---|
| 15 | $RRD_IGNORE['disk'][] = 'user'; |
---|
| 16 | $RRD_IGNORE['disk'][] = 'blockpct'; |
---|
| 17 | $RRD_IGNORE['disk'][] = 'inodepct'; |
---|
| 18 | $RRD_IGNORE['disk'][] = 'inodepct'; |
---|
| 19 | $RRD_IGNORE['disk'][] = 'pctfree'; |
---|
| 20 | $RRD_IGNORE['disk_/'] = $RRD_IGNORE['disk']; |
---|
| 21 | $RRD_IGNORE['disk_/afs'] = $RRD_IGNORE['disk']; |
---|
| 22 | $RRD_IGNORE['disk_/boot'] = $RRD_IGNORE['disk']; |
---|
| 23 | $RRD_IGNORE['disk_/dev/shm'] = $RRD_IGNORE['disk']; |
---|
| 24 | $RRD_IGNORE['disk_/srv'] = $RRD_IGNORE['disk']; |
---|
| 25 | |
---|
| 26 | $RRD_TIMES = array( |
---|
| 27 | 'hour' => 9000, |
---|
| 28 | 'day' => 115200, |
---|
| 29 | 'week' => 691200, |
---|
| 30 | 'month' => 3024000, |
---|
| 31 | 'year' => 34560000); |
---|
| 32 | |
---|
| 33 | function rrd_time($var) { |
---|
| 34 | global $RRD_TIMES; |
---|
| 35 | if (isset($RRD_TIMES[$var])) { |
---|
| 36 | $time = $RRD_TIMES[$var]; |
---|
| 37 | } elseif (is_numeric($var)) { |
---|
| 38 | $time = floor($var); |
---|
| 39 | } else { |
---|
| 40 | $time = 115200; |
---|
| 41 | } |
---|
| 42 | return $time; |
---|
| 43 | } |
---|
| 44 | |
---|
| 45 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.