|
1 | 1 | <?php |
| 2 | + |
2 | 3 | /** |
3 | 4 | * CheckLoad.php |
4 | 5 | * |
@@ -38,29 +39,29 @@ public function parameters(): array |
38 | 39 | new ServiceOption('warning', 'w', default: '5,5,5'), |
39 | 40 | new ServiceOption('critical', 'c', default: '10,10,10'), |
40 | 41 | new ServiceOption('percpu', 'p', ['percpu' => 'int']), |
41 | | - new ServiceOption('procs-to-show', ) |
| 42 | + new ServiceOption('procs-to-show'), |
42 | 43 | ]; |
43 | 44 | } |
44 | 45 |
|
45 | 46 | public function dataSets(string $rrd_filename = '', ?string $ds = null): array |
46 | 47 | { |
47 | 48 | return [ |
48 | 49 | new ServiceDataSet('load', 'processes', [ |
49 | | - 'DEF:DS0=' . $rrd_filename . ':load1:AVERAGE', |
50 | | - 'LINE1.25:DS0#' . LibrenmsConfig::get('graph_colours.mixed.0') . ':' . str_pad(substr('Load 1', 0, 15), 15), |
51 | | - 'GPRINT:DS0:LAST:%5.2lf%s', |
52 | | - 'GPRINT:DS0:AVERAGE:%5.2lf%s', |
53 | | - 'GPRINT:DS0:MAX:%5.2lf%s\\l', |
54 | | - 'DEF:DS1=' . $rrd_filename . ':load5:AVERAGE', |
55 | | - 'LINE1.25:DS1#' . LibrenmsConfig::get('graph_colours.mixed.1') . ':' . str_pad(substr('Load 5', 0, 15), 15), |
56 | | - 'GPRINT:DS1:LAST:%5.2lf%s', |
57 | | - 'GPRINT:DS1:AVERAGE:%5.2lf%s', |
58 | | - 'GPRINT:DS1:MAX:%5.2lf%s\\l', |
59 | | - 'DEF:DS2=' . $rrd_filename . ':load15:AVERAGE', |
60 | | - 'LINE1.25:DS2#' . LibrenmsConfig::get('graph_colours.mixed.2') . ':' . str_pad(substr('Load 15', 0, 15), 15), |
61 | | - 'GPRINT:DS2:LAST:%5.2lf%s', |
62 | | - 'GPRINT:DS2:AVERAGE:%5.2lf%s', |
63 | | - 'GPRINT:DS2:MAX:%5.2lf%s\\l', |
| 50 | + 'DEF:DS0=' . $rrd_filename . ':load1:AVERAGE', |
| 51 | + 'LINE1.25:DS0#' . LibrenmsConfig::get('graph_colours.mixed.0') . ':' . str_pad(substr('Load 1', 0, 15), 15), |
| 52 | + 'GPRINT:DS0:LAST:%5.2lf%s', |
| 53 | + 'GPRINT:DS0:AVERAGE:%5.2lf%s', |
| 54 | + 'GPRINT:DS0:MAX:%5.2lf%s\\l', |
| 55 | + 'DEF:DS1=' . $rrd_filename . ':load5:AVERAGE', |
| 56 | + 'LINE1.25:DS1#' . LibrenmsConfig::get('graph_colours.mixed.1') . ':' . str_pad(substr('Load 5', 0, 15), 15), |
| 57 | + 'GPRINT:DS1:LAST:%5.2lf%s', |
| 58 | + 'GPRINT:DS1:AVERAGE:%5.2lf%s', |
| 59 | + 'GPRINT:DS1:MAX:%5.2lf%s\\l', |
| 60 | + 'DEF:DS2=' . $rrd_filename . ':load15:AVERAGE', |
| 61 | + 'LINE1.25:DS2#' . LibrenmsConfig::get('graph_colours.mixed.2') . ':' . str_pad(substr('Load 15', 0, 15), 15), |
| 62 | + 'GPRINT:DS2:LAST:%5.2lf%s', |
| 63 | + 'GPRINT:DS2:AVERAGE:%5.2lf%s', |
| 64 | + 'GPRINT:DS2:MAX:%5.2lf%s\\l', |
64 | 65 | ]), |
65 | 66 | ]; |
66 | 67 | } |
|
0 commit comments