Commit 10ffd041 authored by Hugo Leisink's avatar Hugo Leisink

Release 0.8

parent 08b9055d
monitor (0.8) stable; urgency=low
* Access restrictions per webserver added.
* Added support for CGI errors.
* Server statistics replaced with connection and bad request graphs.
-- Hugo Leisink <hugo@leisink.net> Sat, 31 May 2014 20:07:55 +0200
monitor (0.7) stable; urgency=low
* Graph layout adepts to amount of monitor days.
......
......@@ -45,9 +45,6 @@ CONFIGURE YOUR DATABASE
========================
Change the database settings in 'settings/website.conf' and run the script 'database/setup_database'.
The database already contains the following user:
admin:monitor
CONFIGURE CRON DAEMON
======================
......@@ -62,6 +59,6 @@ MAILTO=<account name of which you can read e-mail>
USING THE HIAWATHA MONITOR
===========================
Please note that it might take some time (about an hour) before host statistics show up. The reason is because of the fact that Hiawatha caches these statistics for performance reasons.
Login with username 'admin' and password 'monitor' and start adding webservers in the Webserver Administration page. Add "MonitorServer = <IP of monitor server> to the configuration file of your Hiawatha webservers.
Don't forget to change the admin password and to check out the settings in the Settings administration page. When you're done testing, set DEBUG_MODE in settings/website.conf to 'no'.
......@@ -16,6 +16,7 @@
$this->user->log_action("switched to user_id ".$_POST["user_id"]);
$_SESSION["user_switch"] = $_SESSION["user_id"];
$_SESSION["user_id"] = (int)$_POST["user_id"];
unset($_SESSION["filter"]);
$this->output->add_tag("result", "User switch successfull.", array("url" => $this->settings->start_page));
}
} else {
......
......@@ -53,6 +53,11 @@
return;
}
if (($webservers = $this->model->get_all_webservers()) == false) {
$this->output->add_tag("result", "Database error.");
return;
}
/* Non-admins cannot edit admins
*/
if (($this->user->is_admin == false) && in_array(ADMIN_ROLE_ID, $user["roles"])) {
......@@ -76,6 +81,7 @@
$this->output->close_tag();
$this->output->record($user, "user");
$this->output->open_tag("roles");
foreach ($roles as $role) {
/* Non-admins cannot assign the admin role
......@@ -88,11 +94,21 @@
$enabled = ($this->user->id != $user["id"]) || ($role["id"] != ADMIN_ROLE_ID); /* Don't disable yourself */
$this->output->add_tag("role", $role["name"], array(
"id" => $role["id"],
"id" => $role["id"],
"checked" => show_boolean($checked),
"enabled" => show_boolean($enabled)));
}
$this->output->close_tag();
$this->output->open_tag("webservers");
foreach ($webservers as $webserver) {
$checked = in_array($webserver["id"], $user["webservers"]);
$this->output->add_tag("webserver", $webserver["name"], array(
"id" => $webserver["id"],
"checked" => show_boolean($checked)));
}
$this->output->close_tag();
$this->output->close_tag();
}
......@@ -140,9 +156,10 @@
/* Show the user webform
*/
$user = array(
"role_ids" => array(ADMIN_ROLE_ID + 1),
"status" => USER_STATUS_CHANGEPWD,
"roles" => array());
"role_ids" => array(ADMIN_ROLE_ID + 1),
"status" => USER_STATUS_CHANGEPWD,
"roles" => array(),
"webservers" => array());
$this->show_user_form($user);
} else if (valid_input($this->page->pathinfo[2], VALIDATE_NUMBERS, VALIDATE_NONEMPTY)) {
/* Show the user webform
......
<?php
class admin_webserver_controller extends tablemanager_controller {
protected $name = "Webserver";
protected $pathinfo_offset = 2;
protected $back = "admin";
protected $icon = "webserver.png";
class admin_webserver_controller extends controller {
private function show_overview() {
if (($webserver_count = $this->model->count_webservers()) === false) {
$this->output->add_tag("result", "Database error.");
return;
}
$paging = new pagination($this->output, "webservers", $this->settings->admin_page_size, $webserver_count);
if (($webservers = $this->model->get_webservers($paging->offset, $paging->size)) === false) {
$this->output->add_tag("result", "Database error.");
return;
}
$this->output->open_tag("overview");
$this->output->open_tag("webservers");
foreach ($webservers as $webserver) {
$webserver["ssl"] = show_boolean($webserver["ssl"]);
$webserver["active"] = show_boolean($webserver["active"]);
$this->output->record($webserver, "webserver");
}
$this->output->close_tag();
$paging->show_browse_links();
$this->output->close_tag();
}
private function show_webserver_form($webserver) {
if (($users = $this->model->get_users()) === false) {
return;
}
$this->output->open_tag("edit");
$webserver["ssl"] = show_boolean($webserver["ssl"]);
$webserver["active"] = show_boolean($webserver["active"]);
if (is_array($webserver["users"]) == false) {
$webserver["users"] = array();
}
$this->output->record($webserver, "webserver");
$this->output->open_tag("users");
foreach ($users as $user) {
$attr = array(
"id" => $user["id"],
"checked" => show_boolean(in_array($user["id"], $webserver["users"])));
$this->output->add_tag("user", $user["fullname"], $attr);
}
$this->output->close_tag();
$this->output->close_tag();
}
public function execute() {
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if ($_POST["submit_button"] == "Save webserver") {
/* Save webserver
*/
if ($this->model->save_oke($_POST) == false) {
$this->show_webserver_form($_POST);
} else if (isset($_POST["id"]) === false) {
/* Create webserver
*/
if ($this->model->create_webserver($_POST) === false) {
$this->output->add_message("Error creating webserver.");
$this->show_webserver_form($_POST);
} else {
$this->user->log_action("webserver created");
$this->show_overview();
}
} else {
/* Update webserver
*/
if ($this->model->update_webserver($_POST) === false) {
$this->output->add_message("Error updating webserver.");
$this->show_webserver_form($_POST);
} else {
$this->user->log_action("webserver updated");
$this->show_overview();
}
}
} else if ($_POST["submit_button"] == "Delete webserver") {
/* Delete webserver
*/
if ($this->model->delete_oke($_POST) == false) {
$this->show_webserver_form($_POST);
} else if ($this->model->delete_webserver($_POST["id"]) === false) {
$this->output->add_message("Error deleting webserver.");
$this->show_webserver_form($_POST);
} else {
$this->user->log_action("webserver %d deleted", $_POST["id"]);
$this->show_overview();
}
} else {
$this->show_overview();
}
} else if ($this->page->pathinfo[2] === "new") {
/* New webserver
*/
$webserver = array("active" => true);
$this->show_webserver_form($webserver);
} else if (valid_input($this->page->pathinfo[2], VALIDATE_NUMBERS, VALIDATE_NONEMPTY)) {
/* Edit webserver
*/
if (($webserver = $this->model->get_webserver($this->page->pathinfo[2])) === false) {
$this->output->add_tag("result", "webserver not found.\n");
} else {
$this->show_webserver_form($webserver);
}
} else {
/* Show overview
*/
$this->show_overview();
}
}
}
?>
<?php
class cgi_statistics_controller extends graph_controller {
protected $graphs = array(
"time_0_1" => "0 - 1 second",
"time_1_3" => "1 - 3 seconds",
"time_3_10" => "3 - 10 seconds",
"time_10_x" => "More than 10 seconds");
"cgi_errors" => "CGI errors",
"time_0_1" => "0 - 1 second",
"time_1_3" => "1 - 3 seconds",
"time_3_10" => "3 - 10 seconds",
"time_10_x" => "More than 10 seconds");
}
?>
......@@ -3,7 +3,16 @@
public function execute() {
/* Webserver
*/
$webservers = $this->model->get_webservers();
if (($webservers = $this->model->get_webservers()) === false) {
return;
}
if (($status = $this->model->get_webserver_status()) === false) {
return;
}
$webservers_offline = false;
foreach ($webservers as $webserver) {
$webserver["address"] = ($webserver["ssl"] == 0 ? "http" : "https") . "://".$webserver["ip_address"];
if ((($webserver["ssl"] == 0) && ($webserver["port"] != 80)) ||
......@@ -12,75 +21,56 @@
}
$webserver["address"] .= "/";
if ($webserver["active"]) {
if (isset($status[$webserver["id"]]) == false) {
$webserver["status"] = "unknown";
} else if (($webserver["status"] = $status[$webserver["id"]]) == "offline") {
$webservers_offline = true;
}
}
$webserver["ssl"] = show_boolean($webserver["ssl"]);
$webserver["active"] = show_boolean($webserver["active"]);
$this->output->record($webserver, "webserver");
}
if ($webservers_offline) {
$this->output->add_system_message("Warning, one or more webservers are offline!");
}
/* Alerts
*/
$timestamp = date("Y-m-d 00:00:00");
/* Exploit attempts
*/
$this->output->open_tag("list", array("title" => "Top exploit attempts"));
$list = $this->model->get_top_exploit_attempts($timestamp);
foreach ($list as $item) {
if ($item["attempts"] <= 2) {
break;
}
$this->output->add_tag("item", $item["hostname"], array("count" => $item["attempts"]));
}
$this->output->close_tag();
$alerts = array(
array("Top exploit attempts", "get_top_exploit_attempts", 0),
array("Top bad requests", "get_top_bad_requests", 0),
array("Top events", "get_top_events", 0),
array("Top CGI errors", "get_top_cgi_errors", 0),
array("Top bans", "get_top_bans", 3),
array("Top Not Founds", "get_top_not_founds", 5),
array("Top Internal Errors", "get_top_internal_errors", 1),
array("Top Forbiddens", "get_top_forbiddens", 3));
/* Bans
*/
$this->output->open_tag("list", array("title" => "Top bans"));
$list = $this->model->get_top_bans($timestamp);
foreach ($list as $item) {
if ($item["bans"] <= 2) {
break;
}
$this->output->add_tag("item", $item["hostname"], array("count" => $item["bans"]));
}
$this->output->close_tag();
foreach ($alerts as $alert) {
list($title, $function, $minimum) = $alert;
/* Forbiddens
*/
$this->output->open_tag("list", array("title" => "Top Forbiddens"));
$list = $this->model->get_top_forbiddens($timestamp);
foreach ($list as $item) {
if ($item["forbidden"] <= 2) {
break;
if (($list = $this->model->$function($timestamp)) === false) {
return;
}
$this->output->add_tag("item", $item["hostname"], array("count" => $item["forbidden"]));
}
$this->output->close_tag();
/* Not founds
*/
$this->output->open_tag("list", array("title" => "Top Not Founds"));
$list = $this->model->get_top_not_founds($timestamp);
foreach ($list as $item) {
if ($item["not_found"] <= 2) {
break;
}
$this->output->add_tag("item", $item["hostname"], array("count" => $item["not_found"]));
}
$this->output->close_tag();
$this->output->open_tag("list", array("title" => $title));
/* Internal Errors
*/
$this->output->open_tag("list", array("title" => "Top Internal Errors"));
$list = $this->model->get_top_internal_errors($timestamp);
foreach ($list as $item) {
if ($item["errors"] <= 2) {
break;
foreach ($list as $item) {
if ($item["count"] < $minimum) {
break;
}
$this->output->add_tag("item", $item["label"], array("count" => $item["count"]));
}
$this->output->add_tag("item", $item["hostname"], array("count" => $item["errors"]));
$this->output->close_tag();
}
$this->output->close_tag();
}
}
?>
<?php
class events_controller extends controller {
public function execute() {
if (($count = $this->model->count_events()) === false) {
$filter = new filter($this->db, $this->output, $this->user);
$filter->to_output($this->model->table, false);
if (($count = $this->model->count_events($filter->webserver)) === false) {
$this->output->add_tag("result", "Database error.");
return;
}
$paging = new pagination($this->output, "events", $this->settings->event_page_size, $count);
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$paging->reset();
}
if (($events = $this->model->get_events($paging->offset, $paging->size)) === false) {
if (($events = $this->model->get_events($paging->offset, $paging->size, $filter->webserver)) === false) {
$this->output->add_tag("result", "Database error.");
return;
}
......
<?php
class security_statistics_controller extends graph_controller {
protected $graphs = array(
"bans" => "Clients banned",
"exploit_attempts" => "Exploit attempts");
"exploit_attempts" => "Exploit attempts",
"bans" => "Clients banned");
}
?>
<?php
class server_statistics_controller extends controller {
public function execute() {
if (($webservers = $this->model->get_webservers()) === false) {
$this->output->add_tag("result", "Database error.\n");
return;
}
$this->output->open_tag("statistics");
foreach ($webservers as $webserver) {
if (($connections = $this->model->get_top_connections($webserver["id"], $this->settings->top_connections)) === false) {
break;
}
$this->output->open_tag("connections", array("webserver" => $webserver["name"]));
foreach ($connections as $connection) {
$connection["timestamp_begin"] = date("j F Y, H:i:s", $connection["timestamp_begin"]);
$connection["timestamp_end"] = date("j F Y, H:i:s", $connection["timestamp_end"]);
$this->output->record($connection, "connection");
}
$this->output->close_tag();
}
$this->output->close_tag();
}
class server_statistics_controller extends graph_controller {
protected $graphs = array(
"connections" => "Connections",
"result_bad_request" => "Bad requests");
}
?>
......@@ -13,7 +13,7 @@
}
$tables = array("host_statistics", "cgi_statistics",
"server_statistics" "events", "hostnames", "webservers");
"server_statistics", "events", "hostnames", "webservers");
foreach ($tables as $table) {
$query = "truncate table %S";
$db->query($query, $table);
......
......@@ -124,6 +124,9 @@
$db->update("webservers", $webserver_id, array("errors" => $webserver["errors"] + 1));
$event = "Error while getting statistics logfile index from webserver";
log_event($db, $event, $webserver_id);
if ($debug_mode) {
printf("%s\n", $event);
}
$message = sprintf("Webserver %s appears to be offline.", $webserver["name"]);
send_prowl_notification($db, $message);
......@@ -151,8 +154,11 @@
}
$result = $http->GET("/".$file->nodeValue);
if ($result["status"] != 200) {
$event = "error while getting data file from webserver";
$event = "Error while getting data file from webserver";
log_event($db, $event, $webserver_id);
if ($debug_mode) {
printf("%s\n", $event);
}
continue;
}
if ($result["headers"]["Content-Type"] == "application/x-gzip") {
......@@ -176,7 +182,7 @@
*/
case "cgi":
list(, $timestamp_begin, $timestamp_end, $hostname, $time_0_1,
$time_1_3, $time_3_10, $time_10_x) = $field;
$time_1_3, $time_3_10, $time_10_x, $cgi_errors) = $field;
if (($hostname_id = get_hostname_id($db, $hostname)) == false) {
print "Error getting hostname id\n";
......@@ -208,7 +214,8 @@
"time_0_1" => (int)$time_0_1,
"time_1_3" => (int)$time_1_3,
"time_3_10" => (int)$time_3_10,
"time_10_x" => (int)$time_10_x));
"time_10_x" => (int)$time_10_x,
"cgi_errors" => (int)$cgi_errors));
} else {
/* Update existing CGI record
*/
......@@ -218,21 +225,53 @@
"time_0_1" => (int)($current["time_0_1"] + $time_0_1),
"time_1_3" => (int)($current["time_1_3"] + $time_1_3),
"time_3_10" => (int)($current["time_3_10"] + $time_3_10),
"time_10_x" => (int)($current["time_10_x"] + $time_10_x));
"time_10_x" => (int)($current["time_10_x"] + $time_10_x),
"cgi_errors" => (int)($current["cgi_errors"] + $cgi_errors));
$db->update("cgi_statistics", $current["id"], $data);
}
break;
/* Server statistic
*/
case "server":
list(, $timestamp_begin, $timestamp_end, $connections) = $field;
$db->insert("server_statistics", array(
"id" => null,
"timestamp_begin" => date("Y-m-d H:i:s", (int)$timestamp_begin),
"timestamp_end" => date("Y-m-d H:i:s", (int)$timestamp_end),
"webserver_id" => (int)$webserver_id,
"simult_conns" => (int)$connections));
list(, $timestamp_begin, $timestamp_end, $connections, $result_bad_request) = $field;
if ($result_bad_request === NULL) {
break;
}
$day = date("Y-m-d", (int)$timestamp_begin);
if ($day === date("Y-m-d", (int)$timestamp_end)) {
/* Check for existing log on same day
*/
$query = "select * from server_statistics where webserver_id=%d and ".
"timestamp_begin>=%s and timestamp_end<=%s limit 1";
$result = $db->execute($query, $webserver_id, $day." 00:00:00", $day." 23:59:59");
} else {
/* Log overlaps midnight
*/
$result = false;
}
if ($result == false) {
/* Insert new server record
*/
$db->insert("server_statistics", array(
"id" => null,
"timestamp_begin" => date("Y-m-d H:i:s", (int)$timestamp_begin),
"timestamp_end" => date("Y-m-d H:i:s", (int)$timestamp_end),
"webserver_id" => (int)$webserver_id,
"connections" => (int)$connections,
"result_bad_request" => (int)$result_bad_request));
} else {
/* Update existing server record
*/
$current = $result[0];
$data = array(
"timestamp_end" => date("Y-m-d H:i:s", (int)$timestamp_end),
"connections" => (int)($current["connections"] + $connections),
"result_bad_request" => (int)($current["result_bad_request"] + $result_bad_request));
$db->update("server_statistics", $current["id"], $data);
}
break;
/* Host statistic
*/
......@@ -296,6 +335,13 @@
list(, $event, $timestamp) = $field;
log_event($db, $event, $webserver_id, $timestamp);
break;
/* Version
*/
case "version":
list(, $version) = $field;
$data = array("version" => $version);
$db->update("webservers", $webserver_id, $data);
break;
/* Rest
*/
default:
......
-- MySQL dump 10.13 Distrib 5.5.35, for debian-linux-gnu (x86_64)
-- MySQL dump 10.13 Distrib 5.5.37, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: hiawatha_monitor
-- ------------------------------------------------------
-- Server version 5.5.35-0ubuntu0.12.04.2
-- Server version 5.5.37-0ubuntu0.12.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
......@@ -43,16 +43,17 @@ CREATE TABLE `cgi_statistics` (
`timestamp_end` datetime NOT NULL,
`webserver_id` int(11) unsigned NOT NULL,
`hostname_id` int(11) unsigned NOT NULL,
`time_0_1` int(11) NOT NULL,
`time_1_3` int(11) NOT NULL,
`time_3_10` int(11) NOT NULL,
`time_10_x` int(11) NOT NULL,
`time_0_1` int(10) unsigned NOT NULL,
`time_1_3` int(10) unsigned NOT NULL,
`time_3_10` int(10) unsigned NOT NULL,
`time_10_x` int(10) unsigned NOT NULL,
`cgi_errors` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `webserver_id` (`webserver_id`),
KEY `hostname_id` (`hostname_id`),
CONSTRAINT `cgi_statistics_ibfk_1` FOREIGN KEY (`webserver_id`) REFERENCES `webservers` (`id`),
CONSTRAINT `cgi_statistics_ibfk_2` FOREIGN KEY (`hostname_id`) REFERENCES `hostnames` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=831 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
......@@ -70,7 +71,7 @@ CREATE TABLE `events` (
PRIMARY KEY (`id`),
KEY `webserver_id` (`webserver_id`),
CONSTRAINT `events_ibfk_1` FOREIGN KEY (`webserver_id`) REFERENCES `webservers` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=34688 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
......@@ -98,7 +99,7 @@ CREATE TABLE `host_statistics` (
KEY `hostname_id` (`hostname_id`),
CONSTRAINT `host_statistics_ibfk_1` FOREIGN KEY (`webserver_id`) REFERENCES `webservers` (`id`),
CONSTRAINT `host_statistics_ibfk_2` FOREIGN KEY (`hostname_id`) REFERENCES `hostnames` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=811932 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
......@@ -113,7 +114,7 @@ CREATE TABLE `hostnames` (
`hostname` tinytext NOT NULL,
`visible` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=295 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
......@@ -130,7 +131,7 @@ CREATE TABLE `menu` (
`text` varchar(100) NOT NULL,
`link` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
......@@ -181,7 +182,7 @@ CREATE TABLE `pages` (
`visible` tinyint(1) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `url` (`url`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
......@@ -216,7 +217,7 @@ CREATE TABLE `roles` (
`dashboard` tinyint(4) DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
......@@ -241,11 +242,12 @@ CREATE TABLE `server_statistics` (
`timestamp_begin` datetime NOT NULL,
`timestamp_end` datetime NOT NULL,
`webserver_id` int(10) unsigned NOT NULL,
`simult_conns` int(10) unsigned NOT NULL,
`connections` int(10) unsigned NOT NULL,
`result_bad_request` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `webserver_id` (`webserver_id`),
CONSTRAINT `server_statistics_ibfk_1` FOREIGN KEY (`webserver_id`) REFERENCES `webservers` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=133160 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
......@@ -264,7 +266,7 @@ CREATE TABLE `sessions` (
`ip_address` varchar(50) NOT NULL,
`name` tinytext,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=569 DEFAULT CHARSET=utf8;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
......@@ -281,7 +283,7 @@ CREATE TABLE `settings` (
`value` varchar(256) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `key` (`key`)
) ENGINE=MyISAM AUTO_INCREMENT=42 DEFAULT CHARSET=utf8;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
......@@ -290,7 +292,7 @@ CREATE TABLE `settings` (
LOCK TABLES `settings` WRITE;
/*!40000 ALTER TABLE `settings` DISABLE KEYS */;
INSERT INTO `settings` VALUES (1,'admin_page_size','integer','25'),(2,'page_after_login','string','dashboard'),(3,'start_page','string','dashboard'),(4,'webmaster_email','string','root@localhost'),(5,'head_title','string','Hiawatha Webserver Monitor'),(6,'head_description','string',' Hiawatha Webserver Monitor'),(7,'head_keywords','string','monitor, hiawatha'),(34,'default_language','string','en'),(38,'event_page_size','integer','25'),(39,'top_connections','integer','15');
INSERT INTO `settings` VALUES (1,'admin_page_size','integer','25'),(2,'page_after_login','string','dashboard'),(3,'start_page','string','dashboard'),(4,'webmaster_email','string','root@localhost'),(5,'head_title','string','Hiawatha Monitor'),(6,'head_description','string','Security and performance monitoring tool for the Hiawatha webserver.'),(7,'head_keywords','string','monitor, hiawatha'),(34,'default_language','string','en'),(38,'event_page_size','integer','25'),(39,'top_connections','integer','15');
/*!40000 ALTER TABLE `settings` ENABLE KEYS */;
UNLOCK TABLES;
......@@ -339,7 +341,7 @@ CREATE TABLE `users` (
`prowl_key` varchar(50) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
......@@ -348,10 +350,27 @@ CREATE TABLE `users` (
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES (1,'admin','08b5411f848a2581a41672a759c87380',NULL,2,'Administrator','root@localhost','');
INSERT INTO `users` VALUES (1,'admin','08b5411f848a2581a41672a759c87380',NULL,1,'Administrator','root@localhost','');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `webserver_user`
--
DROP TABLE IF EXISTS `webserver_user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;