A quick hack to include server status on page_header. It was starting to annoy me that when the server wasn't running for what ever reason and I leave my browser on the Overview screen I wouldn't know it wasn't working until i checked latest data and look at the last checked times. It would be nice to include similar functionallity into later versions.
Code:
diff -ru zabbix-1.1/frontends/php/include/config.inc.php /var/www/html/zabbix/include/config.inc.php
--- zabbix-1.1/frontends/php/include/config.inc.php 2006-06-02 12:11:36.000000000 +0100
+++ /var/www/html/zabbix/include/config.inc.php 2006-06-24 13:57:56.000000000 +0100
@@ -951,8 +951,16 @@
$logo = new CLink(new CImg("images/general/zabbix.png","ZABBIX"),"http://www.zabbix.com");
$logo->SetTarget('_blank');
- $table->AddRow(array(new CCol($logo, "page_header_l"), new CCol($col_r, "page_header_r")));
-
+
+ $status=get_status();
+ if($status["zabbix_server"] == S_YES)
+ $style = "off";
+ else
+ $style = "on";
+
+ $server_stat = new CCol(S_ZABBIX_SERVER_IS_RUNNING . ": " . $status["zabbix_server"],$style);
+ $table->AddRow(array(new CCol($logo, "page_header_l"), new CCol($server_stat, ""), new CCol($col_r, "page_header_r")));
+
$table->Show();
?>
Comment