diff options
Diffstat (limited to 'inc/html.inc.php')
| -rw-r--r-- | inc/html.inc.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/inc/html.inc.php b/inc/html.inc.php index bc22ba3..a263a58 100644 --- a/inc/html.inc.php +++ b/inc/html.inc.php | |||
| @@ -281,6 +281,19 @@ function host_summary($cat, $hosts) { | |||
| 281 | } | 281 | } |
| 282 | } | 282 | } |
| 283 | 283 | ||
| 284 | if ($CONFIG['showtime']) { | ||
| 285 | $rrd_info = $rrd->rrd_info($CONFIG['datadir'].'/'.$host.'/load/load.rrd'); | ||
| 286 | $time = time() - $rrd_info['last_update']; | ||
| 287 | |||
| 288 | $class = 'wide'; | ||
| 289 | if ($time > 300) | ||
| 290 | $class .= ' crit'; | ||
| 291 | elseif ($time > 60) | ||
| 292 | $class .= ' warn'; | ||
| 293 | |||
| 294 | printf('<td class="%s">%d seconds ago</td>',$class, $time); | ||
| 295 | } | ||
| 296 | |||
| 284 | print "</tr>\n"; | 297 | print "</tr>\n"; |
| 285 | } | 298 | } |
| 286 | 299 | ||
