mirror of https://github.com/MISP/misp-dashboard
Conf file support default conf, so that it don't mess with custom configuration + make redis persistant
parent
a5b3931342
commit
f6153011a9
|
@ -141,7 +141,7 @@ databases 16
|
||||||
|
|
||||||
#save 900 1
|
#save 900 1
|
||||||
#save 300 10
|
#save 300 10
|
||||||
#save 60 10000
|
save 60 10000
|
||||||
|
|
||||||
# By default Redis will stop accepting writes if RDB snapshots are enabled
|
# By default Redis will stop accepting writes if RDB snapshots are enabled
|
||||||
# (at least one save point) and the latest background save failed.
|
# (at least one save point) and the latest background save failed.
|
||||||
|
@ -184,7 +184,7 @@ dbfilename dump.rdb
|
||||||
# The Append Only File will also be created inside this directory.
|
# The Append Only File will also be created inside this directory.
|
||||||
#
|
#
|
||||||
# Note that you must specify a directory here, not a file name.
|
# Note that you must specify a directory here, not a file name.
|
||||||
dir ./
|
dir data/
|
||||||
|
|
||||||
################################# REPLICATION #################################
|
################################# REPLICATION #################################
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
[Dashboard]
|
||||||
|
#hours
|
||||||
|
graph_log_refresh_rate = 1
|
||||||
|
#sec
|
||||||
|
rotation_wait_time = 30
|
||||||
|
max_img_rotation = 10
|
||||||
|
hours_spanned = 48
|
||||||
|
zoomlevel = 15
|
||||||
|
item_to_plot = Attribute.category
|
||||||
|
# [1->12]
|
||||||
|
size_dashboard_left_width = 5
|
||||||
|
size_openStreet_pannel_perc = 55
|
||||||
|
size_world_pannel_perc = 35
|
||||||
|
|
||||||
|
[GEO]
|
||||||
|
#min
|
||||||
|
updateFrequency = 60
|
||||||
|
zoomlevel = 11
|
||||||
|
# ~meter
|
||||||
|
clusteringDistance = 10
|
||||||
|
|
||||||
|
[Log]
|
||||||
|
field_to_plot = Attribute.category
|
||||||
|
fieldname_order=["Event.id", "Attribute.Tag", "Attribute.category", "Attribute.type", ["Attribute.value", "Attribute.comment"]]
|
||||||
|
char_separator=||
|
||||||
|
|
||||||
|
[RedisGlobal]
|
||||||
|
host=localhost
|
||||||
|
port=6251
|
||||||
|
|
||||||
|
[RedisLog]
|
||||||
|
db=0
|
||||||
|
channel=1
|
||||||
|
zmq_url=tcp://localhost:50000
|
||||||
|
#zmq_url=tcp://192.168.56.50:50000
|
||||||
|
|
||||||
|
[RedisMap]
|
||||||
|
db=1
|
||||||
|
channelProc=CoordToProcess
|
||||||
|
channelDisp=PicToDisplay
|
||||||
|
pathMaxMindDB=./data/GeoLite2-City_20171003/GeoLite2-City.mmdb
|
||||||
|
|
||||||
|
[RedisDB]
|
||||||
|
db=2
|
|
@ -3,15 +3,24 @@
|
||||||
set -e
|
set -e
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
#sudo apt-get install python3-virtualenv
|
sudo apt-get install python3-virtualenv -y
|
||||||
|
|
||||||
if [ -z "$VIRTUAL_ENV" ]; then
|
if [ -z "$VIRTUAL_ENV" ]; then
|
||||||
virtualenv -p python3 DASHENV
|
virtualenv -p python3 DASHENV
|
||||||
|
|
||||||
|
echo export DASH_HOME=$(pwd) >> ./DASHENV/bin/activate
|
||||||
|
echo export DASH_CONFIG=$(pwd)/config/ >> ./DASHENV/bin/activate
|
||||||
|
|
||||||
. ./DASHENV/bin/activate
|
. ./DASHENV/bin/activate
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pip3 install -U pip argparse redis zmq geoip2 flask
|
pip3 install -U pip argparse redis zmq geoip2 flask
|
||||||
|
|
||||||
|
## config
|
||||||
|
if [ ! -f config/config.cfg ]; then
|
||||||
|
cp config/config.cfg.sample config/config.cfg
|
||||||
|
fi
|
||||||
|
|
||||||
## Web stuff
|
## Web stuff
|
||||||
pushd static/
|
pushd static/
|
||||||
mkdir -p css fonts
|
mkdir -p css fonts
|
||||||
|
|
|
@ -9,7 +9,7 @@ from time import sleep, strftime
|
||||||
import datetime
|
import datetime
|
||||||
import os
|
import os
|
||||||
|
|
||||||
configfile = os.path.join(os.environ['VIRTUAL_ENV'], '../config.cfg')
|
configfile = os.path.join(os.environ['DASH_CONFIG'], 'config.cfg')
|
||||||
cfg = configparser.ConfigParser()
|
cfg = configparser.ConfigParser()
|
||||||
cfg.read(configfile)
|
cfg.read(configfile)
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ import sys
|
||||||
import json
|
import json
|
||||||
import geoip2.database
|
import geoip2.database
|
||||||
|
|
||||||
configfile = os.path.join(os.environ['VIRTUAL_ENV'], '../config.cfg')
|
configfile = os.path.join(os.environ['DASH_CONFIG'], 'config.cfg')
|
||||||
cfg = configparser.ConfigParser()
|
cfg = configparser.ConfigParser()
|
||||||
cfg.read(configfile)
|
cfg.read(configfile)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue