mirror of https://github.com/MISP/misp-dashboard
switching to globalRedis + harmonization ui live-dashboard
parent
7b1afdc60e
commit
2d09ee87f6
13
config.cfg
13
config.cfg
|
@ -24,23 +24,20 @@ field_to_plot = Attribute.category
|
||||||
fieldname_order=["Event.id", "Attribute.Tag", "Attribute.category", "Attribute.type", ["Attribute.value", "Attribute.comment"]]
|
fieldname_order=["Event.id", "Attribute.Tag", "Attribute.category", "Attribute.type", ["Attribute.value", "Attribute.comment"]]
|
||||||
char_separator=||
|
char_separator=||
|
||||||
|
|
||||||
[RedisLog]
|
[RedisGlobal]
|
||||||
host=localhost
|
host=localhost
|
||||||
port=6251
|
port=6251
|
||||||
|
|
||||||
|
[RedisLog]
|
||||||
db=0
|
db=0
|
||||||
channel=1
|
channel=1
|
||||||
zmq_url=tcp://192.168.56.50:50000
|
zmq_url=tcp://localhost:50000
|
||||||
#zmq_url=tcp://localhost:9990
|
|
||||||
|
|
||||||
[RedisMap]
|
[RedisMap]
|
||||||
host=localhost
|
|
||||||
port=6251
|
|
||||||
db=1
|
db=1
|
||||||
channelProc=CoordToProcess
|
channelProc=CoordToProcess
|
||||||
channelDisp=PicToDisplay
|
channelDisp=PicToDisplay
|
||||||
pathMaxMindDB=/home/sami/Downloads/GeoLite2-City_20171003/GeoLite2-City.mmdb
|
pathMaxMindDB=/home/circl/Downloads/GeoLite2-City_20171003/GeoLite2-City.mmdb
|
||||||
|
|
||||||
[RedisDB]
|
[RedisDB]
|
||||||
host=localhost
|
|
||||||
port=6250
|
|
||||||
db=2
|
db=2
|
||||||
|
|
12
server.py
12
server.py
|
@ -16,16 +16,16 @@ cfg.read(configfile)
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
redis_server_log = redis.StrictRedis(
|
redis_server_log = redis.StrictRedis(
|
||||||
host=cfg.get('RedisLog', 'host'),
|
host=cfg.get('RedisGlobal', 'host'),
|
||||||
port=cfg.getint('RedisLog', 'port'),
|
port=cfg.getint('RedisGlobal', 'port'),
|
||||||
db=cfg.getint('RedisLog', 'db'))
|
db=cfg.getint('RedisLog', 'db'))
|
||||||
redis_server_map = redis.StrictRedis(
|
redis_server_map = redis.StrictRedis(
|
||||||
host=cfg.get('RedisMap', 'host'),
|
host=cfg.get('RedisGlobal', 'host'),
|
||||||
port=cfg.getint('RedisMap', 'port'),
|
port=cfg.getint('RedisGlobal', 'port'),
|
||||||
db=cfg.getint('RedisMap', 'db'))
|
db=cfg.getint('RedisMap', 'db'))
|
||||||
serv_redis_db = redis.StrictRedis(
|
serv_redis_db = redis.StrictRedis(
|
||||||
host=cfg.get('RedisDB', 'host'),
|
host=cfg.get('RedisGlobal', 'host'),
|
||||||
port=cfg.getint('RedisDB', 'port'),
|
port=cfg.getint('RedisGlobal', 'port'),
|
||||||
db=cfg.getint('RedisDB', 'db'))
|
db=cfg.getint('RedisDB', 'db'))
|
||||||
|
|
||||||
subscriber_log = redis_server_log.pubsub(ignore_subscribe_messages=True)
|
subscriber_log = redis_server_log.pubsub(ignore_subscribe_messages=True)
|
||||||
|
|
|
@ -10,7 +10,7 @@ for(i=0; i<maxNumPoint; i++) {
|
||||||
|
|
||||||
class LedManager {
|
class LedManager {
|
||||||
constructor() {
|
constructor() {
|
||||||
this._feedLedsTimeout = setTimeout(function(){ this.manageColors(); }, feedStatusFreqCheck);
|
this._feedLedsTimeout = setTimeout(function(){ ledmanager.manageColors(); }, feedStatusFreqCheck);
|
||||||
this._feedLedKeepAlive = {};
|
this._feedLedKeepAlive = {};
|
||||||
this._allFeedName = [];
|
this._allFeedName = [];
|
||||||
this._ledNum = 0;
|
this._ledNum = 0;
|
||||||
|
|
|
@ -175,8 +175,11 @@ $(function(){
|
||||||
values: [],
|
values: [],
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 10,
|
max: 10,
|
||||||
scale: ['#CD5C5C','#E34234','#D73B3E','#CE1620','#CC0000','#B22222','#B31B1B','#A40000','#800000','#701C1C','#3C1414','#321414'],
|
scale: ['#003FBF','#0063BF','#0087BF','#00ACBF','#00BFAD','#00BF89','#00BF64','#00BF40','#00BF1C','#08BF00','#2CBF00','#51BF00','#75BF00','#99BF00','#BEBF00','#BF9B00','#BF7700','#BF5200','#BF2E00','#BF0900'],
|
||||||
normalizeFunction: 'polynomial'
|
normalizeFunction: 'linear',
|
||||||
|
legend: {
|
||||||
|
horizontal: true
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -25,16 +25,16 @@ CHANNEL_PROC = cfg.get('RedisMap', 'channelProc')
|
||||||
PATH_TO_DB = cfg.get('RedisMap', 'pathMaxMindDB')
|
PATH_TO_DB = cfg.get('RedisMap', 'pathMaxMindDB')
|
||||||
|
|
||||||
serv_log = redis.StrictRedis(
|
serv_log = redis.StrictRedis(
|
||||||
host=cfg.get('RedisLog', 'host'),
|
host=cfg.get('RedisGlobal', 'host'),
|
||||||
port=cfg.getint('RedisLog', 'port'),
|
port=cfg.getint('RedisGlobal', 'port'),
|
||||||
db=cfg.getint('RedisLog', 'db'))
|
db=cfg.getint('RedisLog', 'db'))
|
||||||
serv_coord = redis.StrictRedis(
|
serv_coord = redis.StrictRedis(
|
||||||
host=cfg.get('RedisMap', 'host'),
|
host=cfg.get('RedisGlobal', 'host'),
|
||||||
port=cfg.getint('RedisMap', 'port'),
|
port=cfg.getint('RedisGlobal', 'port'),
|
||||||
db=cfg.getint('RedisMap', 'db'))
|
db=cfg.getint('RedisMap', 'db'))
|
||||||
serv_redis_db = redis.StrictRedis(
|
serv_redis_db = redis.StrictRedis(
|
||||||
host=cfg.get('RedisDB', 'host'),
|
host=cfg.get('RedisGlobal', 'host'),
|
||||||
port=cfg.getint('RedisDB', 'port'),
|
port=cfg.getint('RedisGlobal', 'port'),
|
||||||
db=cfg.getint('RedisDB', 'db'))
|
db=cfg.getint('RedisDB', 'db'))
|
||||||
|
|
||||||
reader = geoip2.database.Reader(PATH_TO_DB)
|
reader = geoip2.database.Reader(PATH_TO_DB)
|
||||||
|
|
Loading…
Reference in New Issue