-
Notifications
You must be signed in to change notification settings - Fork 5
Database Configuration
isaac-ped edited this page Jan 4, 2018
·
5 revisions
Grafana can be used to display real-time MSU and thread statistics on DeDOS.
To enable this feature:
Install Grafana. On Debian/Ubuntu, this looks like:
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.6.2_amd64.deb
sudo apt-get install -y adduser libfontconfig
sudo dpkg -i grafana_4.6.2_amd64.deb
(Alternate installation instructions available here)
Install mysql
# apt-get install mariadb-server cmake
# wget https://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-6.1.11-src.tar.gz && tar xzf mysql-connector-c-6.1.11-src.tar.gz && cd mysql-connector-c-6.1.11-src/ && cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr/local/share/mysql && make && make
Create the database. Here, we assume the database is named dedos
and the password and username are both root
$ mysql -uroot -proot
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 4938
Server version: 5.5.57-MariaDB-1ubuntu0.14.04.1 (Ubuntu)
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>CREATE DATABASE dedos;
Query OK, 1 row affected (0.00 sec)
Load the grafana admin page and create an account. Then, under Data Sources, add a MySQL data source named dedos pointing to the just-created database.
Import the following json configuration into Grafana: DeDOS.json
When starting up the global controller, add flag --init-db
NOTE: When --init-db
is used, any data in the database will be lost! If you want to keep data between runs, use the --db
flag instead.