branch develop updated (ea4e8af -> c030c62)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository mum. See http://git.chorem.org/mum.git from ea4e8af added argument for log level + added postinst file + updated debian files new 41af25a fullscreen button oh dashboard new f69a345 removed dupes names on drive detection new c4b7186 fullscreen updated + corrected sudoers add line new d531caf fullscreen on url + changed log location on rules and conf new c030c62 test_conn corrected + added scan command on conf + started migration func The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit c030c62fadc0a780fe48114fad9b05207b9ef13c Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Fri Jun 26 17:26:09 2015 +0200 test_conn corrected + added scan command on conf + started migration func commit d531cafcf6963452133b182b0a5aa205d36db606 Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Fri Jun 26 15:13:57 2015 +0200 fullscreen on url + changed log location on rules and conf commit c4b71869f1515b76f914a806ce215ecd52497d06 Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Fri Jun 26 14:43:45 2015 +0200 fullscreen updated + corrected sudoers add line commit f69a345bdf76c90c14e4b224ea0b431e3bf2ac1a Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Fri Jun 26 14:15:22 2015 +0200 removed dupes names on drive detection commit 41af25a8adedd0ce545e2b6ad8980fdf31588d5b Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Fri Jun 26 12:24:53 2015 +0200 fullscreen button oh dashboard Summary of changes: app/module_loader.py | 40 +++++- app/modules/detection_modules/drive_snmp_linux.py | 3 +- app/modules/nmap_detection.py | 11 +- app/modules/storage_modules/shelve_db.py | 28 ++++ app/mum.py | 5 +- debian/postinst | 2 +- debian/rules | 6 +- install.sh | 2 +- migration_rules.json | 8 ++ mum.conf | 3 +- mum.sh | 4 +- static/js/controllers/dashboardCtrl.js | 11 +- static/js/controllers/headCtrl.js | 6 + views/dashboard.html | 152 ++++++++++++---------- views/hostpage.html | 7 +- views/index.html | 3 +- 16 files changed, 201 insertions(+), 90 deletions(-) create mode 100644 migration_rules.json -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository mum. See http://git.chorem.org/mum.git commit 41af25a8adedd0ce545e2b6ad8980fdf31588d5b Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Fri Jun 26 12:24:53 2015 +0200 fullscreen button oh dashboard --- static/js/controllers/dashboardCtrl.js | 9 ++- static/js/controllers/headCtrl.js | 6 ++ views/dashboard.html | 140 ++++++++++++++++++--------------- views/index.html | 3 +- 4 files changed, 91 insertions(+), 67 deletions(-) diff --git a/static/js/controllers/dashboardCtrl.js b/static/js/controllers/dashboardCtrl.js index a26c168..746329c 100644 --- a/static/js/controllers/dashboardCtrl.js +++ b/static/js/controllers/dashboardCtrl.js @@ -53,6 +53,8 @@ mumApp.controller('dashboardCtrl', function ($scope, $routeParams, $location, $r $scope.view = 'host_view'; + $scope.fullscreen = false; + if (Object.keys($location.search()).length == 0) { // if no status filter in parameters, show all status $scope.status_filter = ["success", "warning", "danger", "idling", ""]; @@ -96,7 +98,12 @@ mumApp.controller('dashboardCtrl', function ($scope, $routeParams, $location, $r url += $scope.status_filter[i]; $location.search(url); - } + }; + + $scope.set_fullscreen = function(fullscreen_enabled){ + $rootScope.$broadcast("set_fullscreen", fullscreen_enabled); + $scope.fullscreen = fullscreen_enabled; + }; $scope.status = ''; diff --git a/static/js/controllers/headCtrl.js b/static/js/controllers/headCtrl.js index ce43e3e..49a9121 100644 --- a/static/js/controllers/headCtrl.js +++ b/static/js/controllers/headCtrl.js @@ -7,6 +7,8 @@ mumApp.controller('headCtrl', function ($scope, $rootScope, toastr, $interval, $ $scope.task_list = []; + $scope.fullscreen = false; + $scope.$on ("hostsUpdate", function (event) { $scope.items = DataHosts.Items; }); @@ -45,6 +47,10 @@ mumApp.controller('headCtrl', function ($scope, $rootScope, toastr, $interval, $ $scope.pop_warning('Warning', args) }); + $scope.$on("set_fullscreen", function(event, args){ + $scope.fullscreen = args; + }); + ws.onmessage = function (evt) { // actions effectuees lors de la reception d'un message via la websocket var obj = JSON.parse(evt.data); for (key in obj) { diff --git a/views/dashboard.html b/views/dashboard.html index 6464346..ef21814 100644 --- a/views/dashboard.html +++ b/views/dashboard.html @@ -5,77 +5,87 @@ <input type="radio" value="host_view" ng-model="view"> Host view <input type="radio" value="group_view" ng-model="view" ng-click="update_group_obj()"> Group view + <button type="button" class="btn" aria-label="Fullscreen" + popover-placement="bottom" + popover="Enable/Disable fullscreen" + popover-trigger="mouseenter" + ng-click="set_fullscreen(!fullscreen)"> + <span class="fa fa-expand" + aria-hidden="true"> + </span> + </button> + <!-- Host view --> <div ng-show="view == 'host_view' && items.length > 0"> <h2 class="sub-header">Hosts currently on monitoring</h2> <div class="row" ng-show="items.length > 0"> - - <div class="col-xs-3"> - <label for="host_f">Host filter</label> - <input class="form-control" - type="text" - id="host_f" - ng-model="host_filter" - ng-change="update_url()"> - </div> - - <div class="col-xs-3"> - <label for="addr_f">Address filter</label> - <input class="form-control" - type="text" - id="addr_f" - ng-model="addr_filter" - ng-change="update_url()"> + <div ng-show="!fullscreen"> + <div class="col-xs-3"> + <label for="host_f">Host filter</label> + <input class="form-control" + type="text" + id="host_f" + ng-model="host_filter" + ng-change="update_url()"> + </div> + + <div class="col-xs-3"> + <label for="addr_f">Address filter</label> + <input class="form-control" + type="text" + id="addr_f" + ng-model="addr_filter" + ng-change="update_url()"> + </div> + + <div class="col-xs-3"> + <label for="name_f">Name filter</label> + <input class="form-control" + type="text" + id="name_f" + ng-model="name_filter" + ng-change="update_url()"> + </div> + + <div class="col-xs-2"> + <label for="status_f">Status filter</label> + <select multiple class="form-control input-sm" + id="status_f" + ng-model="status_filter" + ng-change="update_url()"> + <option>success</option> + <option>warning</option> + <option>danger</option> + <option>idling</option> + </select> + </div> + + <div class="col-xs-2"> + <label for="group_f">Group filter</label> + <select class="form-control input-sm" + id="group_f" + ng-model="group_filter" + ng-options="group for group in allGroups() | unique:'group'" + ng-change="update_url()"> + </select> + <!--<ui-select multiple + tagging="tag_transform" + tagging-label="" + ng-model="group_filter" + theme="bootstrap" + sortable="true" + ng-disabled="disabled" + style="width: 300px;" + title="Group filter"> + <ui-select-match placeholder="Add to group...">{{$item}}</ui-select-match> + <ui-select-choices repeat="group in allGroups() | unique:'group' | filter:$select.search" + refresh-delay="0"> + {{group}} + </ui-select-choices> + </ui-select>--> + </div> </div> - - <div class="col-xs-3"> - <label for="name_f">Name filter</label> - <input class="form-control" - type="text" - id="name_f" - ng-model="name_filter" - ng-change="update_url()"> - </div> - - <div class="col-xs-2"> - <label for="status_f">Status filter</label> - <select multiple class="form-control input-sm" - id="status_f" - ng-model="status_filter" - ng-change="update_url()"> - <option>success</option> - <option>warning</option> - <option>danger</option> - <option>idling</option> - </select> - </div> - - <div class="col-xs-2"> - <label for="group_f">Group filter</label> - <select class="form-control input-sm" - id="group_f" - ng-model="group_filter" - ng-options="group for group in allGroups() | unique:'group'" - ng-change="update_url()"> - </select> - <!--<ui-select multiple - tagging="tag_transform" - tagging-label="" - ng-model="group_filter" - theme="bootstrap" - sortable="true" - ng-disabled="disabled" - style="width: 300px;" - title="Group filter"> - <ui-select-match placeholder="Add to group...">{{$item}}</ui-select-match> - <ui-select-choices repeat="group in allGroups() | unique:'group' | filter:$select.search" - refresh-delay="0"> - {{group}} - </ui-select-choices> - </ui-select>--> - </div> - <table class="table table-condensed table-hover"> <thead> <tr> diff --git a/views/index.html b/views/index.html index 14dab72..58fca9d 100644 --- a/views/index.html +++ b/views/index.html @@ -91,7 +91,8 @@ </nav> <div class="container-fluid"> <div class="row"> - <div class="col-sm-3 col-md-2 sidebar"> + <div class="col-sm-3 col-md-2 sidebar" + ng-show="!fullscreen"> <ul class="nav nav-sidebar sidebar-fixed-left"> <li><a href="#dashboard">Dashboard</a></li> <!--<li><a href="#stats">Statistics</a></li>--> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository mum. See http://git.chorem.org/mum.git commit f69a345bdf76c90c14e4b224ea0b431e3bf2ac1a Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Fri Jun 26 14:15:22 2015 +0200 removed dupes names on drive detection --- app/modules/detection_modules/drive_snmp_linux.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/modules/detection_modules/drive_snmp_linux.py b/app/modules/detection_modules/drive_snmp_linux.py index 0083214..6d736b5 100644 --- a/app/modules/detection_modules/drive_snmp_linux.py +++ b/app/modules/detection_modules/drive_snmp_linux.py @@ -11,4 +11,5 @@ def run_detection(conn): partition_list = [] for partition in mounted_partitions: partition_list.append(mounted_partitions[partition]) - return partition_list \ No newline at end of file + # removing dupe names + return list(set(partition_list)) \ No newline at end of file -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository mum. See http://git.chorem.org/mum.git commit c4b71869f1515b76f914a806ce215ecd52497d06 Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Fri Jun 26 14:43:45 2015 +0200 fullscreen updated + corrected sudoers add line --- debian/postinst | 2 +- install.sh | 2 +- views/dashboard.html | 28 ++++++++++++++++------------ 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/debian/postinst b/debian/postinst index 6e2020f..c00beaf 100644 --- a/debian/postinst +++ b/debian/postinst @@ -30,7 +30,7 @@ fi # adding mum group to sudoers if not registered NB_MUM_SUDOERS=$(grep '^mum\s' /etc/sudoers | wc -l) if [ $NB_MUM_SUDOERS -eq 0 ]; then - echo 'mum ALL= /usr/bin/nmap' >> /etc/sudoers + echo 'mum ALL=(ALL) NOPASSWD: /usr/bin/nmap' >> /etc/sudoers echo "mum added to sudoers" fi diff --git a/install.sh b/install.sh index 849306a..36050d1 100755 --- a/install.sh +++ b/install.sh @@ -28,7 +28,7 @@ fi # adding mum group to sudoers if not registered NB_MUM_SUDOERS=$(grep '^mum\s' /etc/sudoers | wc -l) if [ $NB_MUM_SUDOERS -eq 0 ]; then - echo 'mum ALL= /usr/bin/nmap' >> /etc/sudoers + echo 'mum ALL=(ALL) NOPASSWD: /usr/bin/nmap' >> /etc/sudoers echo "mum added to sudoers" fi diff --git a/views/dashboard.html b/views/dashboard.html index ef21814..9996add 100644 --- a/views/dashboard.html +++ b/views/dashboard.html @@ -1,23 +1,27 @@ <div class="col-md-offset-2 main"> - <h1 class="page-header">Dashboard</h1> - - <input type="radio" value="host_view" ng-model="view"> Host view - <input type="radio" value="group_view" ng-model="view" ng-click="update_group_obj()"> Group view - - <button type="button" class="btn" aria-label="Fullscreen" - popover-placement="bottom" - popover="Enable/Disable fullscreen" - popover-trigger="mouseenter" - ng-click="set_fullscreen(!fullscreen)"> + <h1 class="page-header">Dashboard + <small><button type="button" class="btn" aria-label="Fullscreen" + popover-placement="bottom" + popover="Fullscreen" + popover-trigger="mouseenter" + ng-click="set_fullscreen(!fullscreen)"> <span class="fa fa-expand" aria-hidden="true"> </span> - </button> + </button></small> + </h1> + + <div ng-show="!fullscreen"> + <input type="radio" value="host_view" ng-model="view"> Host view + <input type="radio" value="group_view" ng-model="view" ng-click="update_group_obj()"> Group view + </div> + <!-- Host view --> <div ng-show="view == 'host_view' && items.length > 0"> - <h2 class="sub-header">Hosts currently on monitoring</h2> + <h2 class="sub-header" + ng-show="!fullscreen">Hosts currently on monitoring</h2> <div class="row" ng-show="items.length > 0"> <div ng-show="!fullscreen"> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository mum. See http://git.chorem.org/mum.git commit d531cafcf6963452133b182b0a5aa205d36db606 Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Fri Jun 26 15:13:57 2015 +0200 fullscreen on url + changed log location on rules and conf --- debian/rules | 6 ++++-- mum.conf | 2 +- static/js/controllers/dashboardCtrl.js | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/rules b/debian/rules index dedaaeb..ad8c683 100755 --- a/debian/rules +++ b/debian/rules @@ -27,8 +27,9 @@ DEST_CONF=$(CURDIR)/debian/mum/etc/mum DEST_VAR=$(CURDIR)/debian/mum/var/lib/mum DEST_BIN=$(CURDIR)/debian/mum/usr/bin DEST_INIT_D=$(CURDIR)/debian/mum/etc/init.d -DEST_SYSTEMD=$(CURDIR)/debian/usr/lib/systemd/system -DEST_DOC=$(CURDIR)/debian/usr/share/doc/mum +DEST_SYSTEMD=$(CURDIR)/debian/mum/usr/lib/systemd/system +DEST_DOC=$(CURDIR)/debian/mum/usr/share/doc/mum +DEST_LOGS=$(CURDIR)/debian/mum/var/log/mum build : build-stamp @@ -54,6 +55,7 @@ install : build clean $(app) $(bower_components) $(static) $(views) $(install_sc mkdir -p $(DEST_BIN) mkdir -p $(DEST_SYSTEMD) mkdir -p $(DEST_DOC) + mkdir -p $(DEST_LOGS) mkdir $(DEST_VAR)/keys mkdir $(DEST_VAR)/logs mkdir $(DEST_VAR)/data diff --git a/mum.conf b/mum.conf index 0a12be8..6e7bf07 100644 --- a/mum.conf +++ b/mum.conf @@ -1,7 +1,7 @@ server_port=1337 server_addr=0.0.0.0 db_location=/var/lib/mum/data/mum.db -log_location=/var/lib/mum/logs +log_location=/var/log/mum external_modules_location=/etc/mum/modules/ keys_location=/var/lib/mum/keys/ smtp_server=localhost diff --git a/static/js/controllers/dashboardCtrl.js b/static/js/controllers/dashboardCtrl.js index 746329c..6f1dc8d 100644 --- a/static/js/controllers/dashboardCtrl.js +++ b/static/js/controllers/dashboardCtrl.js @@ -80,6 +80,8 @@ mumApp.controller('dashboardCtrl', function ($scope, $routeParams, $location, $r $scope.update_url = function () { var url = ""; + url += "fullscreen=" + $scope.fullscreen + "&"; + url += "host_filter=" + $scope.host_filter + "&"; url += "addr_filter=" + $scope.addr_filter + "&"; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository mum. See http://git.chorem.org/mum.git commit c030c62fadc0a780fe48114fad9b05207b9ef13c Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Fri Jun 26 17:26:09 2015 +0200 test_conn corrected + added scan command on conf + started migration func --- app/module_loader.py | 40 +++++++++++++++++++++++++++++--- app/modules/nmap_detection.py | 11 ++++++--- app/modules/storage_modules/shelve_db.py | 28 ++++++++++++++++++++++ app/mum.py | 5 +++- migration_rules.json | 8 +++++++ mum.conf | 1 + mum.sh | 4 ++-- views/hostpage.html | 7 +++--- 8 files changed, 91 insertions(+), 13 deletions(-) diff --git a/app/module_loader.py b/app/module_loader.py index e1d5118..4f4b2cb 100644 --- a/app/module_loader.py +++ b/app/module_loader.py @@ -26,11 +26,14 @@ class ModuleLoader: Loads dynamically modules from packages connection_modules, detection_modules, monitoring_modules, storage_modules and contains several methods in order to call the methods once these modules loaded. """ - def __init__(self, conf): + def __init__(self, conf, mum_vesion): + self.logger = logging.getLogger("mum_log") self.conf = conf self.db = self.load_db() + db_version = self.db.get_db_version() + if float(db_version) < mum_vesion: + self.migrate_db(db_version) self.db.reset_tasks() - self.logger = logging.getLogger("mum_log") self.loaded_mod_moni = {} # See load_all_monitoring_modules self.loaded_mod_detect = {} # See load_all_detection_modules self.loaded_mod_conn = {} # See load_all_connection_modules @@ -51,6 +54,31 @@ class ModuleLoader: def get_db(self): return self.db + def migrate_db(self, current_db_version): + """ + Migrates the database through the rules defined on migration_rules.json + A backup of the previous database is also done. + """ + # backup creation + """ + db_loc_tree = self.conf['db_location'].split('/') + old_db_name = db_loc_tree[len(db_loc_tree) -1] + db_loc_tree.pop(len(db_loc_tree) -1) + backup_location = self.conf['db_location'] + '_v_' + str(current_db_version) + '.back' + pexpect.run("cp " + self.conf['db_location'] + " " + backup_location) + + migration_rules_file = open("migration_rules.json") + migration_rules = json.loads(migration_rules_file.read()) + for version in migration_rules: + if float(version) > current_db_version: + for add_instr in migration_rules[version]["add_field"]: + self.db.add_field(add_instr, migration_rules[version]["add_field"][add_instr]) + for rem_instr in migration_rules[version]["rem_field"]: + self.db.rem_field(rem_instr, migration_rules[version]["rem_field"][rem_instr]) + self.db.set_db_version(version) + """ + return None + def get_public_keys_loc(self): return self.conf['keys_location'] @@ -102,6 +130,7 @@ class ModuleLoader: ws, self.get_conection_modules_list(), self.get_monitoring_modules_list(), + self.conf['scan_command'], modules.HostNotFoundException) try: if re.search('^\d{1,3}(-\d{1,3})?[.]\d{1,3}(-\d{1,3})?[.]\d{1,3}(-\d{1,3})?[.]\d{1,3}(-\d{1,3})?$', param): @@ -164,9 +193,14 @@ class ModuleLoader: """ avaliable_conn = self.db.get_conf_conn(addr_host) conn = None - for i in range(len(avaliable_conn)): + self.logger.debug(str(avaliable_conn)) + i = 0 + conn_found = False + while not conn_found and i < range(len(avaliable_conn)): if avaliable_conn[i]['conn_mod_name'] == conn_mod_name: + conn_found = True conn = avaliable_conn.pop(i) + i += 1 getattr(self.loaded_mod_conn[conn['conn_mod_name']]['imported'], self.loaded_mod_conn[conn['conn_mod_name']]['class_name'])(addr_host, conn['args'], diff --git a/app/modules/nmap_detection.py b/app/modules/nmap_detection.py index 6b9d036..edcb5d5 100644 --- a/app/modules/nmap_detection.py +++ b/app/modules/nmap_detection.py @@ -9,7 +9,7 @@ from string import letters class nmap_detection: - def __init__(self, opt, db, ws, list_mod_conn, dict_mod_monitoring, hnfe): + def __init__(self, opt, db, ws, list_mod_conn, dict_mod_monitoring, command, hnfe): self.opt = opt self.db = db self.ws = ws @@ -18,6 +18,7 @@ class nmap_detection: self.list_mod_conn = list_mod_conn self.dict_mod_monitoring = dict_mod_monitoring self.HostNotFoundException = hnfe + self.command = command self.logger = logging.getLogger("mum_log") # function for splitting the different ranges of the IP adress @@ -94,28 +95,32 @@ class nmap_detection: ip = str(byte_1) + '.' + str(byte_2) + '.' + str(byte_3) + '.' + str(byte_4) self.ws.send(json.dumps({"CURRENT_STATE_INFO": "Scanning ip : " + ip})) try: - child = pexpect.spawn('nmap ' + self.opt + ' ' + ip + ' -oX ' + self.filename) + child = pexpect.spawn(self.command + ' ' + self.opt + ' ' + ip + ' -oX ' + self.filename) while child.isalive(): child.expect('Completed', timeout=None) except pexpect.EOF: self.parse_res(ip) except pexpect.TIMEOUT: + self.logger.error("Timeout on nmap execution") self.ws.send(json.dumps({"ERROR": "Timeout on nmap execution"})) except pexpect.ExceptionPexpect: + self.logger.error("nmap command not avaliable on server") self.ws.send(json.dumps({"ERROR": "nmap command not avaliable on server"})) def launch_detection_with_hostname(self, hostname): self.ws.send(json.dumps({"CURRENT_STATE_INFO": "Scanning host : " + hostname})) try: - child = pexpect.spawn('nmap ' + self.opt + ' ' + hostname + ' -oX ' + self.filename) + child = pexpect.spawn(self.command + ' ' + self.opt + ' ' + hostname + ' -oX ' + self.filename) while child.isalive(): child.expect('Completed', timeout=None) except pexpect.EOF: self.parse_res(hostname) return json.dumps(self.scanned_ip) except pexpect.TIMEOUT: + self.logger.error("Timeout on nmap execution") self.ws.send(json.dumps({"ERROR": "Timeout on nmap execution"})) except pexpect.ExceptionPexpect: + self.logger.error("nmap command not avaliable on server") self.ws.send(json.dumps({"ERROR": "nmap command not avaliable on server"})) # parse the xml result to keep only interesting values diff --git a/app/modules/storage_modules/shelve_db.py b/app/modules/storage_modules/shelve_db.py index 3836e45..ea72a11 100644 --- a/app/modules/storage_modules/shelve_db.py +++ b/app/modules/storage_modules/shelve_db.py @@ -56,6 +56,34 @@ class shelve_db: self.db = None self.lock.release() + def get_db_version(self): + self.open_db() + res = None + try: + res = self.db['version'] + except Exception: + self.logger.error(traceback.format_exc()) + finally: + self.close_db() + return res + + def set_db_version(self, new_version): + self.open_db() + try: + self.db['version'] = new_version + except Exception: + self.logger.error(traceback.format_exc()) + finally: + self.close_db() + + """ + def add_field(self, field, tab_loc): + self.open_db() + try: + for key in tab_loc: + if key == "*": + """ + def reset_tasks(self): self.open_db() try: diff --git a/app/mum.py b/app/mum.py index a44a48c..c6b4eb8 100755 --- a/app/mum.py +++ b/app/mum.py @@ -14,6 +14,8 @@ import os import logging from logging.handlers import RotatingFileHandler +VERSION = 0.2 + @route('/') def index(section='home'): return template('index') @@ -132,6 +134,7 @@ if __name__ == '__main__': parser.add_argument("--smtp_port", help="port number of the SMTP server") parser.add_argument("--smtp_address", help="e-mail address of the sender for e-mail notifications") parser.add_argument("--log_level", help="set the log level : DEBUG, INFO, WARNING, ERROR") + parser.add_argument("--scan_command", help="scan command to use (default is sudo nmap)") args = parser.parse_args() # creating the default conf structure from the configuration file @@ -181,7 +184,7 @@ if __name__ == '__main__': logger = create_logger(conf) - ml = ModuleLoader(conf) + ml = ModuleLoader(conf, VERSION) ml.load_all_monitoring_modules() ml.load_all_connection_modules() ml.load_all_detection_modules() diff --git a/migration_rules.json b/migration_rules.json new file mode 100644 index 0000000..faac1bd --- /dev/null +++ b/migration_rules.json @@ -0,0 +1,8 @@ +{ + "0.2": + { + "add_field":{ + "test": ["hosts", "*"] + } + } +} \ No newline at end of file diff --git a/mum.conf b/mum.conf index 6e7bf07..0c5bb85 100644 --- a/mum.conf +++ b/mum.conf @@ -8,6 +8,7 @@ smtp_server=localhost smtp_port= smtp_address= log_level=WARNING +scan_command=sudo nmap #scan=Scan name|Scan description|Priority|Nmap parameter options scan=Complete scan and detection|This scan is the most complete but the longest one. Recommended for commom server monitoring. Time necessary: from a minute to several hours depending of the host.|1|-sU -sS -p U:161,T:1-65535 -A -Pn diff --git a/mum.sh b/mum.sh index 39d4ef3..0eb6148 100755 --- a/mum.sh +++ b/mum.sh @@ -1,7 +1,7 @@ #!/bin/sh -DIR=$(basename /usr/lib/mum) -cd $DIR +#DIR=$(basename /usr/lib/mum) +#cd $DIR if [ ! -d "venv" ]; then echo "Preparing the virtual environment for the first launch (this may take several minutes)" diff --git a/views/hostpage.html b/views/hostpage.html index 8a34387..63b3143 100644 --- a/views/hostpage.html +++ b/views/hostpage.html @@ -1,11 +1,10 @@ <div class="col-md-offset-2 main"> <h1 class="page-header">Current state of - <span ng-click="show_display_name_input = true" - ng-show="show_display_name_input == false" - style="text-decoration:underline"> + <a ng-click="show_display_name_input = true" + ng-show="show_display_name_input == false"> {{items.display_name}} - </span> + </a> <div class="row" ng-show="show_display_name_input == true"> <div class="col-lg-6"> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm