mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-06 09:55:18 +00:00
Cleaning controllers. Arranging files. Rename files
This commit is contained in:
parent
54e53c6ff6
commit
f012ff377a
@ -2,7 +2,7 @@
|
|||||||
"name": "wazuh",
|
"name": "wazuh",
|
||||||
"version": "2.0.0-beta1",
|
"version": "2.0.0-beta1",
|
||||||
"kibana": {
|
"kibana": {
|
||||||
"version" : "5.1.1"
|
"version" : "5.1.2"
|
||||||
},
|
},
|
||||||
"description": "Wazuh App",
|
"description": "Wazuh App",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
@ -35,15 +35,25 @@ require('plugins/wazuh/directives/kibanaDashboardDirective.js');
|
|||||||
require('plugins/wazuh/directives/kibanaSearchbarDirective.js');
|
require('plugins/wazuh/directives/kibanaSearchbarDirective.js');
|
||||||
|
|
||||||
// Require controllers
|
// Require controllers
|
||||||
|
// Global
|
||||||
require('plugins/wazuh/controllers/general.js');
|
require('plugins/wazuh/controllers/general.js');
|
||||||
|
|
||||||
|
// Overview
|
||||||
require('plugins/wazuh/controllers/overview.js');
|
require('plugins/wazuh/controllers/overview.js');
|
||||||
require('plugins/wazuh/controllers/agents.js');
|
|
||||||
require('plugins/wazuh/controllers/settings.js');
|
// Manager
|
||||||
require('plugins/wazuh/controllers/manager.js');
|
require('plugins/wazuh/controllers/manager.js');
|
||||||
require('plugins/wazuh/controllers/fim.js');
|
|
||||||
require('plugins/wazuh/controllers/policy-monitoring.js');
|
|
||||||
require('plugins/wazuh/controllers/ruleset.js');
|
require('plugins/wazuh/controllers/ruleset.js');
|
||||||
require('plugins/wazuh/controllers/osseclog.js');
|
require('plugins/wazuh/controllers/osseclog.js');
|
||||||
|
|
||||||
|
// Agents
|
||||||
|
require('plugins/wazuh/controllers/agentsOverview.js');
|
||||||
|
require('plugins/wazuh/controllers/agentsPreview.js');
|
||||||
|
require('plugins/wazuh/controllers/agentsFim.js');
|
||||||
|
require('plugins/wazuh/controllers/agentsPm.js');
|
||||||
|
|
||||||
|
// Settings
|
||||||
|
require('plugins/wazuh/controllers/settings.js');
|
||||||
require('plugins/wazuh/controllers/testController.js');
|
require('plugins/wazuh/controllers/testController.js');
|
||||||
|
|
||||||
//Bootstrap and font awesome
|
//Bootstrap and font awesome
|
||||||
|
@ -23,10 +23,6 @@ app.controller('fimController', function ($scope, $q, DataFactory, $mdToast, err
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Functions
|
//Functions
|
||||||
|
|
||||||
$scope.setTimer = function (time) {
|
|
||||||
$scope.timerFilterValue = time;
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.setSort = function (field) {
|
$scope.setSort = function (field) {
|
||||||
if ($scope._sort === field) {
|
if ($scope._sort === field) {
|
||||||
@ -149,7 +145,6 @@ app.controller('fimController', function ($scope, $q, DataFactory, $mdToast, err
|
|||||||
//Load
|
//Load
|
||||||
try {
|
try {
|
||||||
load();
|
load();
|
||||||
$scope.setTimer($scope.$parent.timeFilter);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
$mdToast.show({
|
$mdToast.show({
|
||||||
template: '<md-toast> Unexpected exception loading controller </md-toast>',
|
template: '<md-toast> Unexpected exception loading controller </md-toast>',
|
||||||
@ -159,13 +154,7 @@ app.controller('fimController', function ($scope, $q, DataFactory, $mdToast, err
|
|||||||
errlog.log('Unexpected exception loading controller', e);
|
errlog.log('Unexpected exception loading controller', e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Timer filter watch
|
|
||||||
var timerWatch = $scope.$watch(function () {
|
|
||||||
return $scope.$parent.timeFilter;
|
|
||||||
}, function () {
|
|
||||||
$scope.setTimer($scope.$parent.timeFilter);
|
|
||||||
});
|
|
||||||
|
|
||||||
//Destroy
|
//Destroy
|
||||||
$scope.$on("$destroy", function () {
|
$scope.$on("$destroy", function () {
|
||||||
@ -174,7 +163,6 @@ app.controller('fimController', function ($scope, $q, DataFactory, $mdToast, err
|
|||||||
});
|
});
|
||||||
$scope.files.length = 0;
|
$scope.files.length = 0;
|
||||||
loadWatch();
|
loadWatch();
|
||||||
timerWatch();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
75
public/controllers/agentsOverview.js
Normal file
75
public/controllers/agentsOverview.js
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
// Require config
|
||||||
|
var app = require('ui/modules').get('app/wazuh', []);
|
||||||
|
|
||||||
|
app.controller('agentsController', function ($scope, DataFactory, $mdToast) {
|
||||||
|
|
||||||
|
//Initialisation
|
||||||
|
$scope.load = true;
|
||||||
|
$scope.agentInfo = [];
|
||||||
|
|
||||||
|
var objectsArray = [];
|
||||||
|
var loadWatch;
|
||||||
|
|
||||||
|
//Print Error
|
||||||
|
var printError = function (error) {
|
||||||
|
$mdToast.show({
|
||||||
|
template: '<md-toast>' + error.html + '</md-toast>',
|
||||||
|
position: 'bottom left',
|
||||||
|
hideDelay: 5000,
|
||||||
|
});
|
||||||
|
if ($scope.blocked) {
|
||||||
|
$scope.blocked = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//Functions
|
||||||
|
|
||||||
|
|
||||||
|
$scope.fetchAgent = function (agent) {
|
||||||
|
DataFactory.getAndClean('get', '/agents/' + agent.id, {})
|
||||||
|
.then(function (data) {
|
||||||
|
$scope.agentInfo = data.data;
|
||||||
|
$scope.$parent._agent.status = data.data.status;
|
||||||
|
if (agent.id != '000') {
|
||||||
|
DataFactory.getAndClean('get', '/agents/' + agent.id + '/key', {})
|
||||||
|
.then(function (data) {
|
||||||
|
$scope.agentInfo.key = data.data;
|
||||||
|
$scope.load = false;
|
||||||
|
$scope.$parent.load = false;
|
||||||
|
}, printError);
|
||||||
|
}
|
||||||
|
}, printError);
|
||||||
|
$scope.fetchFim(agent);
|
||||||
|
$scope.fetchRootcheck(agent);
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.fetchFim = function (agent) {
|
||||||
|
DataFactory.getAndClean('get', '/syscheck/' + agent.id, { 'offset': 0, 'limit': 5 })
|
||||||
|
.then(function (data) {
|
||||||
|
$scope.agentInfo.syscheckEvents = data.data.items;
|
||||||
|
}, printError);
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.fetchRootcheck = function (agent) {
|
||||||
|
DataFactory.getAndClean('get', '/rootcheck/' + agent.id, { 'offset': 0, 'limit': 5 })
|
||||||
|
.then(function (data) {
|
||||||
|
$scope.agentInfo.rootcheckEvents = data.data.items;
|
||||||
|
}, printError);
|
||||||
|
};
|
||||||
|
|
||||||
|
//Load
|
||||||
|
loadWatch = $scope.$watch(function () {
|
||||||
|
return $scope.$parent._agent;
|
||||||
|
}, function () {
|
||||||
|
$scope.fetchAgent($scope.$parent._agent);
|
||||||
|
});
|
||||||
|
|
||||||
|
//Destroy
|
||||||
|
$scope.$on("$destroy", function () {
|
||||||
|
angular.forEach(objectsArray, function (value) {
|
||||||
|
DataFactory.clean(value)
|
||||||
|
});
|
||||||
|
//loadWatch();
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
@ -1,155 +1,156 @@
|
|||||||
// Require config
|
// Require config
|
||||||
var app = require('ui/modules').get('app/wazuh', []);
|
var app = require('ui/modules').get('app/wazuh', []);
|
||||||
|
|
||||||
app.controller('pmController', function ($scope, DataFactory, $mdToast, errlog, appState) {
//Initialisation
|
app.controller('pmController', function ($scope, DataFactory, $mdToast, errlog, appState) {
|
||||||
$scope.load = true;
|
//Initialisation
|
||||||
var objectsArray = [];
|
$scope.load = true;
|
||||||
var loadWatch;
|
var objectsArray = [];
|
||||||
$scope.defaultManagerName = appState.getDefaultManager().name;
|
var loadWatch;
|
||||||
$scope.events = [];
|
$scope.defaultManagerName = appState.getDefaultManager().name;
|
||||||
|
$scope.events = [];
|
||||||
//Print Error
|
|
||||||
var printError = function (error) {
|
//Print Error
|
||||||
$mdToast.show({
|
var printError = function (error) {
|
||||||
template: '<md-toast>' + error.html + '</md-toast>',
|
$mdToast.show({
|
||||||
position: 'bottom left',
|
template: '<md-toast>' + error.html + '</md-toast>',
|
||||||
hideDelay: 5000,
|
position: 'bottom left',
|
||||||
});
|
hideDelay: 5000,
|
||||||
if ($scope._eblocked) {
|
});
|
||||||
$scope._eblocked = false;
|
if ($scope._eblocked) {
|
||||||
}
|
$scope._eblocked = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//Functions
|
|
||||||
|
//Functions
|
||||||
$scope.setTimer = function (time) {
|
|
||||||
$scope.timerFilterValue = time;
|
$scope.setTimer = function (time) {
|
||||||
};
|
$scope.timerFilterValue = time;
|
||||||
|
};
|
||||||
|
|
||||||
$scope.setSort = function (field) {
|
|
||||||
if ($scope._sort === field) {
|
$scope.setSort = function (field) {
|
||||||
if ($scope._sortOrder) {
|
if ($scope._sort === field) {
|
||||||
$scope._sortOrder = false;
|
if ($scope._sortOrder) {
|
||||||
$scope._sort = '';
|
$scope._sortOrder = false;
|
||||||
DataFactory.filters.unset(objectsArray['/rootcheck'], 'filter-sort');
|
$scope._sort = '';
|
||||||
} else {
|
DataFactory.filters.unset(objectsArray['/rootcheck'], 'filter-sort');
|
||||||
$scope._sortOrder = true;
|
} else {
|
||||||
DataFactory.filters.set(objectsArray['/rootcheck'], 'filter-sort', field);
|
$scope._sortOrder = true;
|
||||||
}
|
DataFactory.filters.set(objectsArray['/rootcheck'], 'filter-sort', field);
|
||||||
} else {
|
}
|
||||||
$scope._sortOrder = false;
|
} else {
|
||||||
$scope._sort = field;
|
$scope._sortOrder = false;
|
||||||
DataFactory.filters.set(objectsArray['/rootcheck'], 'filter-sort', '-' + field);
|
$scope._sort = field;
|
||||||
}
|
DataFactory.filters.set(objectsArray['/rootcheck'], 'filter-sort', '-' + field);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$scope.eventSearchFilter = function (search) {
|
|
||||||
if (search) {
|
$scope.eventSearchFilter = function (search) {
|
||||||
DataFactory.filters.set(objectsArray['/rootcheck'], 'search', search);
|
if (search) {
|
||||||
} else {
|
DataFactory.filters.set(objectsArray['/rootcheck'], 'search', search);
|
||||||
DataFactory.filters.unset(objectsArray['/rootcheck'], 'search');
|
} else {
|
||||||
}
|
DataFactory.filters.unset(objectsArray['/rootcheck'], 'search');
|
||||||
};
|
}
|
||||||
|
};
|
||||||
$scope.eventsObj = {
|
|
||||||
//Obj with methods for virtual scrolling
|
$scope.eventsObj = {
|
||||||
getItemAtIndex: function (index) {
|
//Obj with methods for virtual scrolling
|
||||||
if ($scope._eblocked) {
|
getItemAtIndex: function (index) {
|
||||||
return null;
|
if ($scope._eblocked) {
|
||||||
}
|
return null;
|
||||||
var _pos = index - DataFactory.getOffset(objectsArray['/rootcheck']);
|
}
|
||||||
if (DataFactory.filters.flag(objectsArray['/rootcheck'])) {
|
var _pos = index - DataFactory.getOffset(objectsArray['/rootcheck']);
|
||||||
$scope._eblocked = true;
|
if (DataFactory.filters.flag(objectsArray['/rootcheck'])) {
|
||||||
DataFactory.scrollTo(objectsArray['/rootcheck'], 200)
|
$scope._eblocked = true;
|
||||||
.then(function (data) {
|
DataFactory.scrollTo(objectsArray['/rootcheck'], 200)
|
||||||
$scope.events.length = 0;
|
.then(function (data) {
|
||||||
$scope.events = data.data.items;
|
$scope.events.length = 0;
|
||||||
DataFactory.filters.unflag(objectsArray['/rootcheck']);
|
$scope.events = data.data.items;
|
||||||
$scope._eblocked = false;
|
DataFactory.filters.unflag(objectsArray['/rootcheck']);
|
||||||
}, printError);
|
$scope._eblocked = false;
|
||||||
} else if ((_pos > 150) || (_pos < 0)) {
|
}, printError);
|
||||||
$scope._eblocked = true;
|
} else if ((_pos > 150) || (_pos < 0)) {
|
||||||
DataFactory.scrollTo(objectsArray['/rootcheck'], index)
|
$scope._eblocked = true;
|
||||||
.then(function (data) {
|
DataFactory.scrollTo(objectsArray['/rootcheck'], index)
|
||||||
$scope.events.length = 0;
|
.then(function (data) {
|
||||||
$scope.events = data.data.items;
|
$scope.events.length = 0;
|
||||||
$scope._eblocked = false;
|
$scope.events = data.data.items;
|
||||||
}, printError);
|
$scope._eblocked = false;
|
||||||
} else {
|
}, printError);
|
||||||
return $scope.events[_pos];
|
} else {
|
||||||
}
|
return $scope.events[_pos];
|
||||||
},
|
}
|
||||||
getLength: function () {
|
},
|
||||||
return DataFactory.getTotalItems(objectsArray['/rootcheck']);
|
getLength: function () {
|
||||||
},
|
return DataFactory.getTotalItems(objectsArray['/rootcheck']);
|
||||||
};
|
},
|
||||||
|
};
|
||||||
var createWatch = function () {
|
|
||||||
loadWatch = $scope.$watch(function () {
|
var createWatch = function () {
|
||||||
return $scope.$parent._agent;
|
loadWatch = $scope.$watch(function () {
|
||||||
}, function () {
|
return $scope.$parent._agent;
|
||||||
DataFactory.initialize('get', '/rootcheck/' + $scope.$parent._agent.id, {}, 200, 0)
|
}, function () {
|
||||||
.then(function (data) {
|
DataFactory.initialize('get', '/rootcheck/' + $scope.$parent._agent.id, {}, 200, 0)
|
||||||
DataFactory.clean(objectsArray['/rootcheck']);
|
.then(function (data) {
|
||||||
objectsArray['/rootcheck'] = data;
|
DataFactory.clean(objectsArray['/rootcheck']);
|
||||||
DataFactory.get(objectsArray['/rootcheck'])
|
objectsArray['/rootcheck'] = data;
|
||||||
.then(function (data) {
|
DataFactory.get(objectsArray['/rootcheck'])
|
||||||
$scope.events.length = 0;
|
.then(function (data) {
|
||||||
$scope.events = data.data.items;
|
$scope.events.length = 0;
|
||||||
DataFactory.filters.register(objectsArray['/rootcheck'], 'search', 'string');
|
$scope.events = data.data.items;
|
||||||
DataFactory.filters.register(objectsArray['/rootcheck'], 'filter-sort', 'string');
|
DataFactory.filters.register(objectsArray['/rootcheck'], 'search', 'string');
|
||||||
$scope._sort = '';
|
DataFactory.filters.register(objectsArray['/rootcheck'], 'filter-sort', 'string');
|
||||||
$scope.eventSearchFilter($scope._eventSearch);
|
$scope._sort = '';
|
||||||
}, printError);
|
$scope.eventSearchFilter($scope._eventSearch);
|
||||||
}, printError);
|
}, printError);
|
||||||
});
|
}, printError);
|
||||||
};
|
});
|
||||||
|
};
|
||||||
var load = function () {
|
|
||||||
DataFactory.initialize('get', '/rootcheck/' + $scope.$parent._agent.id, {}, 200, 0)
|
var load = function () {
|
||||||
.then(function (data) {
|
DataFactory.initialize('get', '/rootcheck/' + $scope.$parent._agent.id, {}, 200, 0)
|
||||||
objectsArray['/rootcheck'] = data;
|
.then(function (data) {
|
||||||
DataFactory.get(objectsArray['/rootcheck'])
|
objectsArray['/rootcheck'] = data;
|
||||||
.then(function (data) {
|
DataFactory.get(objectsArray['/rootcheck'])
|
||||||
$scope.events = data.data.items;
|
.then(function (data) {
|
||||||
$scope.totalEvents = data.data.totalItems;
|
$scope.events = data.data.items;
|
||||||
DataFactory.filters.register(objectsArray['/rootcheck'], 'search', 'string');
|
$scope.totalEvents = data.data.totalItems;
|
||||||
DataFactory.filters.register(objectsArray['/rootcheck'], 'filter-sort', 'string');
|
DataFactory.filters.register(objectsArray['/rootcheck'], 'search', 'string');
|
||||||
createWatch();
|
DataFactory.filters.register(objectsArray['/rootcheck'], 'filter-sort', 'string');
|
||||||
$scope.load = false;
|
createWatch();
|
||||||
}, printError);
|
$scope.load = false;
|
||||||
}, printError);
|
}, printError);
|
||||||
};
|
}, printError);
|
||||||
|
};
|
||||||
//Load
|
|
||||||
try {
|
//Load
|
||||||
load();
|
try {
|
||||||
$scope.setTimer($scope.$parent.timeFilter);
|
load();
|
||||||
} catch (e) {
|
$scope.setTimer($scope.$parent.timeFilter);
|
||||||
$mdToast.show({
|
} catch (e) {
|
||||||
template: '<md-toast> Unexpected exception loading controller </md-toast>',
|
$mdToast.show({
|
||||||
position: 'bottom left',
|
template: '<md-toast> Unexpected exception loading controller </md-toast>',
|
||||||
hideDelay: 5000,
|
position: 'bottom left',
|
||||||
});
|
hideDelay: 5000,
|
||||||
errlog.log('Unexpected exception loading controller', e);
|
});
|
||||||
}
|
errlog.log('Unexpected exception loading controller', e);
|
||||||
|
}
|
||||||
// Timer filter watch
|
|
||||||
var timerWatch = $scope.$watch(function () {
|
// Timer filter watch
|
||||||
return $scope.$parent.timeFilter;
|
var timerWatch = $scope.$watch(function () {
|
||||||
}, function () {
|
return $scope.$parent.timeFilter;
|
||||||
$scope.setTimer($scope.$parent.timeFilter);
|
}, function () {
|
||||||
});
|
$scope.setTimer($scope.$parent.timeFilter);
|
||||||
|
});
|
||||||
//Destroy
|
|
||||||
$scope.$on("$destroy", function () {
|
//Destroy
|
||||||
angular.forEach(objectsArray, function (value) {
|
$scope.$on("$destroy", function () {
|
||||||
DataFactory.clean(value)
|
angular.forEach(objectsArray, function (value) {
|
||||||
});
|
DataFactory.clean(value)
|
||||||
$scope.events.length = 0;
|
});
|
||||||
loadWatch();
|
$scope.events.length = 0;
|
||||||
timerWatch();
|
loadWatch();
|
||||||
});
|
timerWatch();
|
||||||
|
});
|
||||||
})
|
|
||||||
|
})
|
@ -2,79 +2,6 @@
|
|||||||
require('plugins/wazuh/utils/infinite_scroll/infinite-scroll.js');
|
require('plugins/wazuh/utils/infinite_scroll/infinite-scroll.js');
|
||||||
var app = require('ui/modules').get('app/wazuh', []);
|
var app = require('ui/modules').get('app/wazuh', []);
|
||||||
|
|
||||||
app.controller('agentsController', function ($scope, DataFactory, $mdToast) {
|
|
||||||
|
|
||||||
//Initialisation
|
|
||||||
$scope.load = true;
|
|
||||||
$scope.agentInfo = [];
|
|
||||||
|
|
||||||
var objectsArray = [];
|
|
||||||
var loadWatch;
|
|
||||||
|
|
||||||
//Print Error
|
|
||||||
var printError = function (error) {
|
|
||||||
$mdToast.show({
|
|
||||||
template: '<md-toast>' + error.html + '</md-toast>',
|
|
||||||
position: 'bottom left',
|
|
||||||
hideDelay: 5000,
|
|
||||||
});
|
|
||||||
if ($scope.blocked) {
|
|
||||||
$scope.blocked = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//Functions
|
|
||||||
|
|
||||||
|
|
||||||
$scope.fetchAgent = function (agent) {
|
|
||||||
DataFactory.getAndClean('get', '/agents/' + agent.id, {})
|
|
||||||
.then(function (data) {
|
|
||||||
$scope.agentInfo = data.data;
|
|
||||||
$scope.$parent._agent.status = data.data.status;
|
|
||||||
if (agent.id != '000') {
|
|
||||||
DataFactory.getAndClean('get', '/agents/' + agent.id + '/key', {})
|
|
||||||
.then(function (data) {
|
|
||||||
$scope.agentInfo.key = data.data;
|
|
||||||
$scope.load = false;
|
|
||||||
$scope.$parent.load = false;
|
|
||||||
}, printError);
|
|
||||||
}
|
|
||||||
}, printError);
|
|
||||||
$scope.fetchFim(agent);
|
|
||||||
$scope.fetchRootcheck(agent);
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.fetchFim = function (agent) {
|
|
||||||
DataFactory.getAndClean('get', '/syscheck/' + agent.id, { 'offset': 0, 'limit': 5 })
|
|
||||||
.then(function (data) {
|
|
||||||
$scope.agentInfo.syscheckEvents = data.data.items;
|
|
||||||
}, printError);
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.fetchRootcheck = function (agent) {
|
|
||||||
DataFactory.getAndClean('get', '/rootcheck/' + agent.id, { 'offset': 0, 'limit': 5 })
|
|
||||||
.then(function (data) {
|
|
||||||
$scope.agentInfo.rootcheckEvents = data.data.items;
|
|
||||||
}, printError);
|
|
||||||
};
|
|
||||||
|
|
||||||
//Load
|
|
||||||
loadWatch = $scope.$watch(function () {
|
|
||||||
return $scope.$parent._agent;
|
|
||||||
}, function () {
|
|
||||||
$scope.fetchAgent($scope.$parent._agent);
|
|
||||||
});
|
|
||||||
|
|
||||||
//Destroy
|
|
||||||
$scope.$on("$destroy", function () {
|
|
||||||
angular.forEach(objectsArray, function (value) {
|
|
||||||
DataFactory.clean(value)
|
|
||||||
});
|
|
||||||
//loadWatch();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
app.factory('Agents', function($http, DataFactory) {
|
app.factory('Agents', function($http, DataFactory) {
|
||||||
var Agents = function(objectsArray, items) {
|
var Agents = function(objectsArray, items) {
|
||||||
this.items = items;
|
this.items = items;
|
||||||
@ -232,4 +159,4 @@ app.controller('agentsPreviewController', function ($scope, DataFactory, $mdToas
|
|||||||
});
|
});
|
||||||
$scope.agents.length = 0;
|
$scope.agents.length = 0;
|
||||||
});
|
});
|
||||||
});
|
});
|
@ -5,47 +5,7 @@ app.controller('overviewGeneralController', function ($scope, DataFactory, gener
|
|||||||
$scope.load = true;
|
$scope.load = true;
|
||||||
|
|
||||||
$scope.defaultManager = $scope.$parent.state.getDefaultManager().name;
|
$scope.defaultManager = $scope.$parent.state.getDefaultManager().name;
|
||||||
$scope.stats = [];
|
|
||||||
|
|
||||||
//Print Error
|
|
||||||
var printError = function (error) {
|
|
||||||
$mdToast.show({
|
|
||||||
template: '<md-toast>' + error.html + '</md-toast>',
|
|
||||||
position: 'bottom left',
|
|
||||||
hideDelay: 5000,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
//Functions
|
|
||||||
$scope.setTimer = function (time) {
|
|
||||||
$scope.timerFilterValue = time;
|
|
||||||
};
|
|
||||||
|
|
||||||
//Load
|
|
||||||
try {
|
|
||||||
$scope.setTimer($scope.$parent.timeFilter);
|
|
||||||
} catch (e) {
|
|
||||||
$mdToast.show({
|
|
||||||
template: '<md-toast> Unexpected exception loading controller </md-toast>',
|
|
||||||
position: 'bottom left',
|
|
||||||
hideDelay: 5000,
|
|
||||||
});
|
|
||||||
errlog.log('Unexpected exception loading controller', e);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Timer filter watch
|
|
||||||
var loadWatch = $scope.$watch(function () {
|
|
||||||
return $scope.$parent.timeFilter;
|
|
||||||
}, function () {
|
|
||||||
$scope.setTimer($scope.$parent.timeFilter);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
//Destroy
|
|
||||||
$scope.$on("$destroy", function () {
|
|
||||||
$scope.stats.length = 0;
|
|
||||||
loadWatch();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -53,9 +13,7 @@ app.controller('overviewGeneralController', function ($scope, DataFactory, gener
|
|||||||
app.controller('overviewFimController', function ($scope, DataFactory, genericReq, $mdToast, errlog) {
|
app.controller('overviewFimController', function ($scope, DataFactory, genericReq, $mdToast, errlog) {
|
||||||
//Initialisation
|
//Initialisation
|
||||||
$scope.load = true;
|
$scope.load = true;
|
||||||
$scope.$parent.state.setOverviewState('fim');
|
|
||||||
$scope.defaultManager = $scope.$parent.state.getDefaultManager().name;
|
$scope.defaultManager = $scope.$parent.state.getDefaultManager().name;
|
||||||
$scope.stats = [];
|
|
||||||
|
|
||||||
//Print Error
|
//Print Error
|
||||||
var printError = function (error) {
|
var printError = function (error) {
|
||||||
@ -67,27 +25,8 @@ app.controller('overviewFimController', function ($scope, DataFactory, genericRe
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Functions
|
//Functions
|
||||||
$scope.setTimer = function (time) {
|
|
||||||
$scope.timerFilterValue = time;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
var load_tops = function () {
|
var load_tops = function () {
|
||||||
|
|
||||||
var daysAgo = 1;
|
|
||||||
if ($scope.timerFilterValue == "24h") {
|
|
||||||
daysAgo = 1;
|
|
||||||
} else if ($scope.timerFilterValue == "7d") {
|
|
||||||
daysAgo = 7;
|
|
||||||
} else if ($scope.timerFilterValue == "30d") {
|
|
||||||
daysAgo = 30;
|
|
||||||
} else {
|
|
||||||
daysAgo = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
var date = new Date();
|
|
||||||
date.setDate(date.getDate() - daysAgo);
|
|
||||||
var timeAgo = date.getTime();
|
|
||||||
|
|
||||||
// Last fields
|
// Last fields
|
||||||
|
|
||||||
@ -110,7 +49,6 @@ app.controller('overviewFimController', function ($scope, DataFactory, genericRe
|
|||||||
|
|
||||||
//Load
|
//Load
|
||||||
try {
|
try {
|
||||||
$scope.setTimer($scope.$parent.timeFilter);
|
|
||||||
load_tops();
|
load_tops();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
$mdToast.show({
|
$mdToast.show({
|
||||||
@ -121,20 +59,6 @@ app.controller('overviewFimController', function ($scope, DataFactory, genericRe
|
|||||||
errlog.log('Unexpected exception loading controller', e);
|
errlog.log('Unexpected exception loading controller', e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Timer filter watch
|
|
||||||
var loadWatch = $scope.$watch(function () {
|
|
||||||
return $scope.$parent.timeFilter;
|
|
||||||
}, function () {
|
|
||||||
$scope.setTimer($scope.$parent.timeFilter);
|
|
||||||
load_tops();
|
|
||||||
});
|
|
||||||
|
|
||||||
//Destroy
|
|
||||||
$scope.$on("$destroy", function () {
|
|
||||||
$scope.stats.length = 0;
|
|
||||||
loadWatch();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -143,7 +67,6 @@ app.controller('overviewPMController', function ($scope, DataFactory, genericReq
|
|||||||
$scope.load = true;
|
$scope.load = true;
|
||||||
$scope.$parent.state.setOverviewState('pm');
|
$scope.$parent.state.setOverviewState('pm');
|
||||||
$scope.defaultManager = $scope.$parent.state.getDefaultManager().name;
|
$scope.defaultManager = $scope.$parent.state.getDefaultManager().name;
|
||||||
$scope.stats = [];
|
|
||||||
|
|
||||||
//Print Error
|
//Print Error
|
||||||
var printError = function (error) {
|
var printError = function (error) {
|
||||||
@ -154,36 +77,9 @@ app.controller('overviewPMController', function ($scope, DataFactory, genericReq
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//Functions
|
|
||||||
$scope.setTimer = function (time) {
|
|
||||||
$scope.timerFilterValue = time;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
var load_tops = function () {
|
var load_tops = function () {
|
||||||
|
|
||||||
var daysAgo = 1;
|
|
||||||
if ($scope.timerFilterValue == "24h") {
|
|
||||||
daysAgo = 1;
|
|
||||||
} else if ($scope.timerFilterValue == "7d") {
|
|
||||||
daysAgo = 7;
|
|
||||||
} else if ($scope.timerFilterValue == "30d") {
|
|
||||||
daysAgo = 30;
|
|
||||||
} else {
|
|
||||||
daysAgo = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
var date = new Date();
|
|
||||||
date.setDate(date.getDate() - daysAgo);
|
|
||||||
var timeAgo = date.getTime();
|
|
||||||
|
|
||||||
|
|
||||||
// Top fields
|
|
||||||
genericReq.request('GET', '/api/wazuh-elastic/top/'+$scope.defaultManager+'/AgentName/'+timeAgo)
|
|
||||||
.then(function (data) {
|
|
||||||
$scope.topagent = data.data;
|
|
||||||
}, printError);
|
|
||||||
|
|
||||||
|
|
||||||
// Last fields
|
// Last fields
|
||||||
|
|
||||||
@ -206,14 +102,11 @@ app.controller('overviewPMController', function ($scope, DataFactory, genericReq
|
|||||||
.then(function (data) {
|
.then(function (data) {
|
||||||
$scope.lastEventAgentIP = (data.data != "") ? data.data : "";
|
$scope.lastEventAgentIP = (data.data != "") ? data.data : "";
|
||||||
}, printError);
|
}, printError);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//Load
|
//Load
|
||||||
try {
|
try {
|
||||||
$scope.setTimer($scope.$parent.timeFilter);
|
|
||||||
load_tops();
|
load_tops();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
$mdToast.show({
|
$mdToast.show({
|
||||||
@ -224,18 +117,5 @@ app.controller('overviewPMController', function ($scope, DataFactory, genericReq
|
|||||||
errlog.log('Unexpected exception loading controller', e);
|
errlog.log('Unexpected exception loading controller', e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Timer filter watch
|
|
||||||
var loadWatch = $scope.$watch(function () {
|
|
||||||
return $scope.$parent.timeFilter;
|
|
||||||
}, function () {
|
|
||||||
$scope.setTimer($scope.$parent.timeFilter);
|
|
||||||
load_tops();
|
|
||||||
});
|
|
||||||
|
|
||||||
//Destroy
|
|
||||||
$scope.$on("$destroy", function () {
|
|
||||||
$scope.stats.length = 0;
|
|
||||||
loadWatch();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -103,7 +103,7 @@
|
|||||||
<md-card flex="100">
|
<md-card flex="100">
|
||||||
<md-card-title>
|
<md-card-title>
|
||||||
<md-card-title-text>
|
<md-card-title-text>
|
||||||
<span class="md-headline">Last events</span>
|
<span class="md-headline">Alerts summary</span>
|
||||||
</md-card-title-text>
|
</md-card-title-text>
|
||||||
</md-card-title>
|
</md-card-title>
|
||||||
<kbn-vis vis-height="600px" vis-type="table" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(vis:(params:(sort:(columnIndex:!n,direction:!n)))),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(customLabel:Agent,field:agent.name,order:desc,orderBy:'1',size:100),schema:bucket,type:terms),(enabled:!t,id:'4',params:(customLabel:File,field:syscheck.path,order:desc,orderBy:'1',size:500),schema:bucket,type:terms),(enabled:!t,id:'5',params:(customLabel:Event,field:syscheck.event,order:desc,orderBy:'1',size:10),schema:bucket,type:terms),(enabled:!t,id:'6',params:(customLabel:Description,field:rule.description,order:desc,orderBy:'1',size:10),schema:bucket,type:terms)),listeners:(),params:(perPage:10,showMeticsAtAllLevels:!f,showPartialRows:!f,showTotal:!f,sort:(columnIndex:!n,direction:!n),totalFunc:sum),title:'New%20Visualization',type:table))"
|
<kbn-vis vis-height="600px" vis-type="table" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(vis:(params:(sort:(columnIndex:!n,direction:!n)))),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(customLabel:Agent,field:agent.name,order:desc,orderBy:'1',size:100),schema:bucket,type:terms),(enabled:!t,id:'4',params:(customLabel:File,field:syscheck.path,order:desc,orderBy:'1',size:500),schema:bucket,type:terms),(enabled:!t,id:'5',params:(customLabel:Event,field:syscheck.event,order:desc,orderBy:'1',size:10),schema:bucket,type:terms),(enabled:!t,id:'6',params:(customLabel:Description,field:rule.description,order:desc,orderBy:'1',size:10),schema:bucket,type:terms)),listeners:(),params:(perPage:10,showMeticsAtAllLevels:!f,showPartialRows:!f,showTotal:!f,sort:(columnIndex:!n,direction:!n),totalFunc:sum),title:'New%20Visualization',type:table))"
|
||||||
|
@ -44,11 +44,11 @@
|
|||||||
<md-card flex="100">
|
<md-card flex="100">
|
||||||
<md-card-title>
|
<md-card-title>
|
||||||
<md-card-title-text>
|
<md-card-title-text>
|
||||||
<span class="md-headline">Last events</span>
|
<span class="md-headline">Alerts summary</span>
|
||||||
</md-card-title-text>
|
</md-card-title-text>
|
||||||
</md-card-title>
|
</md-card-title>
|
||||||
|
|
||||||
<kbn-vis vis-height="600px" vis-type="table" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'location:%20rootcheck')),uiState:(vis:(params:(sort:(columnIndex:3,direction:desc)))),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:agent.name,order:desc,orderBy:'1',size:5000),schema:bucket,type:terms),(enabled:!t,id:'3',params:(field:rule.description,order:desc,orderBy:'1',size:1),schema:bucket,type:terms),(enabled:!t,id:'4',params:(field:title,order:desc,orderBy:'1',size:1),schema:bucket,type:terms)),listeners:(),params:(perPage:10,showMeticsAtAllLevels:!f,showPartialRows:!f,showTotal:!f,sort:(columnIndex:!n,direction:!n),totalFunc:sum),title:'New%20Visualization',type:table))"
|
<kbn-vis vis-height="600px" vis-type="table" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(vis:(params:(sort:(columnIndex:3,direction:desc)))),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(customLabel:'Agent%20name',field:agent.name,order:desc,orderBy:'1',size:999999999),schema:bucket,type:terms),(enabled:!t,id:'3',params:(customLabel:'Rule%20description',field:rule.description,order:desc,orderBy:'1',size:999999999),schema:bucket,type:terms),(enabled:!t,id:'4',params:(customLabel:Control,field:title,order:desc,orderBy:'1',size:999999999),schema:bucket,type:terms)),listeners:(),params:(perPage:10,showMeticsAtAllLevels:!f,showPartialRows:!f,showTotal:!f,sort:(columnIndex:!n,direction:!n),totalFunc:sum),title:'New%20Visualization',type:table))"
|
||||||
vis-filter="rule.groups: rootcheck AND {{'agent.name:'+_agent.name}}">
|
vis-filter="rule.groups: rootcheck AND {{'agent.name:'+_agent.name}}">
|
||||||
</kbn-vis>
|
</kbn-vis>
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
</md-card>
|
</md-card>
|
||||||
<md-card>
|
<md-card>
|
||||||
<md-card-content>
|
<md-card-content>
|
||||||
<kbn-vis vis-height="72px" vis-type="metric" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'rule.groups:%22syscheck%22%20AND%20full_log:%22Integrity%20checksum%20changed%22%20NOT%20location:%20syscheck-registry')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(customLabel:'Changed'),schema:metric,type:count)),listeners:(),params:(fontSize:20,handleNoResults:!t),title:'New%20Visualization',type:metric))" vis-filter='(rule.id: 550 OR rule.id: 551 OR rule.id: 552 OR rule.id: 555)'>
|
<kbn-vis vis-height="72px" vis-type="metric" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'rule.groups:%22syscheck%22%20AND%20full_log:%22Integrity%20checksum%20changed%22%20NOT%20location:%20syscheck-registry')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(customLabel:'Modified'),schema:metric,type:count)),listeners:(),params:(fontSize:20,handleNoResults:!t),title:'New%20Visualization',type:metric))" vis-filter='(rule.id: 550 OR rule.id: 551 OR rule.id: 552 OR rule.id: 555)'>
|
||||||
</kbn-vis>
|
</kbn-vis>
|
||||||
</md-card-content>
|
</md-card-content>
|
||||||
</md-card>
|
</md-card>
|
||||||
@ -60,7 +60,7 @@
|
|||||||
<kbn-vis-value vis-height="37px" vis-type="table" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(vis:(params:(sort:(columnIndex:!n,direction:!n)))),vis:(aggs:!((enabled:!t,id:'1',params:(field:'@timestamp'),schema:metric,type:max),(enabled:!t,id:'2',params:(field:syscheck.path,order:desc,orderBy:'1',size:1),schema:bucket,type:terms)),listeners:(),params:(perPage:1,showMeticsAtAllLevels:!f,showPartialRows:!f,showTotal:!f,sort:(columnIndex:!n,direction:!n),totalFunc:sum),title:'New%20Visualization',type:table))"
|
<kbn-vis-value vis-height="37px" vis-type="table" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(vis:(params:(sort:(columnIndex:!n,direction:!n)))),vis:(aggs:!((enabled:!t,id:'1',params:(field:'@timestamp'),schema:metric,type:max),(enabled:!t,id:'2',params:(field:syscheck.path,order:desc,orderBy:'1',size:1),schema:bucket,type:terms)),listeners:(),params:(perPage:1,showMeticsAtAllLevels:!f,showPartialRows:!f,showTotal:!f,sort:(columnIndex:!n,direction:!n),totalFunc:sum),title:'New%20Visualization',type:table))"
|
||||||
vis-filter="syscheck.event: modified AND location: syscheck">
|
vis-filter="syscheck.event: modified AND location: syscheck">
|
||||||
</kbn-vis-value>
|
</kbn-vis-value>
|
||||||
<div class="ng-binding">Last file changed</div>
|
<div class="ng-binding">Last file modified</div>
|
||||||
</md-card-content>
|
</md-card-content>
|
||||||
</md-card>
|
</md-card>
|
||||||
<md-card flex layout="column">
|
<md-card flex layout="column">
|
||||||
@ -86,7 +86,7 @@
|
|||||||
|
|
||||||
<md-card flex="33">
|
<md-card flex="33">
|
||||||
<md-card-content>
|
<md-card-content>
|
||||||
<div class="md-headline">Top changed</div>
|
<div class="md-headline">Top file changes</div>
|
||||||
<kbn-vis vis-height="193px" vis-type="pie" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:syscheck.path,order:desc,orderBy:'1',size:8),schema:segment,type:terms)),listeners:(),params:(addLegend:!t,addTooltip:!t,isDonut:!f,shareYAxis:!t),title:'FIM%20Top%2010%20Changed',type:pie))"
|
<kbn-vis vis-height="193px" vis-type="pie" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:syscheck.path,order:desc,orderBy:'1',size:8),schema:segment,type:terms)),listeners:(),params:(addLegend:!t,addTooltip:!t,isDonut:!f,shareYAxis:!t),title:'FIM%20Top%2010%20Changed',type:pie))"
|
||||||
vis-filter='rule.groups:"syscheck" AND full_log:"Integrity checksum changed" NOT location: syscheck-registry'>
|
vis-filter='rule.groups:"syscheck" AND full_log:"Integrity checksum changed" NOT location: syscheck-registry'>
|
||||||
</md-card-content>
|
</md-card-content>
|
||||||
@ -94,7 +94,7 @@
|
|||||||
|
|
||||||
<md-card flex="33">
|
<md-card flex="33">
|
||||||
<md-card-content>
|
<md-card-content>
|
||||||
<div class="md-headline">Top root related changes</div>
|
<div class="md-headline">Root user file changes</div>
|
||||||
<kbn-vis vis-height="193px" vis-type="pie" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:syscheck.path,order:desc,orderBy:'1',size:8),schema:segment,type:terms)),listeners:(),params:(addLegend:!t,addTooltip:!t,isDonut:!f,shareYAxis:!t),title:'FIM%20Top%2010%20Changed',type:pie))"
|
<kbn-vis vis-height="193px" vis-type="pie" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:syscheck.path,order:desc,orderBy:'1',size:8),schema:segment,type:terms)),listeners:(),params:(addLegend:!t,addTooltip:!t,isDonut:!f,shareYAxis:!t),title:'FIM%20Top%2010%20Changed',type:pie))"
|
||||||
vis-filter='rule.groups:"syscheck" AND full_log:"Integrity checksum changed" NOT location: syscheck-registry AND root'>
|
vis-filter='rule.groups:"syscheck" AND full_log:"Integrity checksum changed" NOT location: syscheck-registry AND root'>
|
||||||
</md-card-content>
|
</md-card-content>
|
||||||
@ -102,7 +102,7 @@
|
|||||||
|
|
||||||
<md-card flex="33">
|
<md-card flex="33">
|
||||||
<md-card-content>
|
<md-card-content>
|
||||||
<div class="md-headline">Top world writable</div>
|
<div class="md-headline">World writable modified files</div>
|
||||||
<kbn-vis vis-height="193px" vis-type="pie" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'rule.groups:%22syscheck%22%20AND%20_exists_:syscheck.perm_after%20AND%20%20(syscheck.perm_after:%2F%5B0-7%5D%7B5%7D(%5B2367%5D).*%2F)')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:syscheck.path,order:desc,orderBy:'1',size:8),schema:segment,type:terms)),listeners:(),params:(addLegend:!t,addTooltip:!t,isDonut:!f,shareYAxis:!t),title:'FIM%20Top%2010%20Files',type:pie))"
|
<kbn-vis vis-height="193px" vis-type="pie" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'rule.groups:%22syscheck%22%20AND%20_exists_:syscheck.perm_after%20AND%20%20(syscheck.perm_after:%2F%5B0-7%5D%7B5%7D(%5B2367%5D).*%2F)')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:syscheck.path,order:desc,orderBy:'1',size:8),schema:segment,type:terms)),listeners:(),params:(addLegend:!t,addTooltip:!t,isDonut:!f,shareYAxis:!t),title:'FIM%20Top%2010%20Files',type:pie))"
|
||||||
vis-filter='rule.groups:"syscheck" AND _exists_:syscheck.perm_after AND (syscheck.perm_after:/[0-7]{5}([2367]).*/) '>
|
vis-filter='rule.groups:"syscheck" AND _exists_:syscheck.perm_after AND (syscheck.perm_after:/[0-7]{5}([2367]).*/) '>
|
||||||
</md-card-content>
|
</md-card-content>
|
||||||
@ -133,7 +133,7 @@
|
|||||||
<md-card flex="40" layout="column">
|
<md-card flex="40" layout="column">
|
||||||
<md-card-content style="text-align: center;">
|
<md-card-content style="text-align: center;">
|
||||||
<kbn-vis-value vis-height="37px" vis-type="table" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(vis:(params:(sort:(columnIndex:!n,direction:!n)))),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:syscheck.path,order:desc,orderBy:'1',size:1),schema:bucket,type:terms)),listeners:(),params:(perPage:1,showMeticsAtAllLevels:!f,showPartialRows:!f,showTotal:!f,sort:(columnIndex:!n,direction:!n),totalFunc:sum),title:'New%20Visualization',type:table))" vis-filter="location: syscheck"></kbn-vis-value>
|
<kbn-vis-value vis-height="37px" vis-type="table" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(vis:(params:(sort:(columnIndex:!n,direction:!n)))),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:syscheck.path,order:desc,orderBy:'1',size:1),schema:bucket,type:terms)),listeners:(),params:(perPage:1,showMeticsAtAllLevels:!f,showPartialRows:!f,showTotal:!f,sort:(columnIndex:!n,direction:!n),totalFunc:sum),title:'New%20Visualization',type:table))" vis-filter="location: syscheck"></kbn-vis-value>
|
||||||
<div class="ng-binding">Most changed file</div>
|
<div class="ng-binding">Most modified file</div>
|
||||||
</md-card-content>
|
</md-card-content>
|
||||||
</md-card>
|
</md-card>
|
||||||
|
|
||||||
|
@ -54,8 +54,8 @@
|
|||||||
<div layout="row" layout-align="center stretch">
|
<div layout="row" layout-align="center stretch">
|
||||||
<md-card flex="65">
|
<md-card flex="65">
|
||||||
<md-card-content>
|
<md-card-content>
|
||||||
<span class="md-headline">Agents</span>
|
<span class="md-headline">Alerts evolution - Top 10 agents</span>
|
||||||
<kbn-vis vis-height="193px" vis-type="area" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(customInterval:'2h',extended_bounds:(),field:'@timestamp',interval:auto,min_doc_count:1),schema:segment,type:date_histogram),(enabled:!t,id:'3',params:(field:agent.name,order:desc,orderBy:'1',size:8),schema:group,type:terms)),listeners:(),params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,interpolate:linear,legendPosition:right,mode:overlap,scale:linear,setYExtents:!f,shareYAxis:!t,smoothLines:!t,times:!(),yAxis:()),title:'Agents',type:area))"
|
<kbn-vis vis-height="240px" vis-type="area" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(customInterval:'2h',extended_bounds:(),field:'@timestamp',interval:auto,min_doc_count:1),schema:segment,type:date_histogram),(enabled:!t,id:'3',params:(field:agent.name,order:desc,orderBy:'1',size:10),schema:group,type:terms)),listeners:(),params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,interpolate:linear,legendPosition:right,mode:overlap,scale:linear,setYExtents:!f,shareYAxis:!t,smoothLines:!t,times:!(),yAxis:()),title:'Agents',type:area))"
|
||||||
vis-filter="*"
|
vis-filter="*"
|
||||||
>
|
>
|
||||||
</kbn-vis>
|
</kbn-vis>
|
||||||
@ -67,7 +67,7 @@
|
|||||||
<md-card layout="column" flex="45">
|
<md-card layout="column" flex="45">
|
||||||
<md-card-content>
|
<md-card-content>
|
||||||
<span class="md-headline">Agents status</span>
|
<span class="md-headline">Agents status</span>
|
||||||
<kbn-vis vis-height="193px" vis-type="line" vis-index-pattern="wazuh-monitoring-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'2',params:(customInterval:'2h',extended_bounds:(),field:'@timestamp',interval:'auto',min_doc_count:1),schema:segment,type:date_histogram),(enabled:!t,id:'3',params:(field:id),schema:metric,type:cardinality),(enabled:!t,id:'4',params:(field:status,order:asc,orderBy:'3',size:5),schema:group,type:terms)),listeners:(),params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,drawLinesBetweenPoints:!t,interpolate:linear,radiusRatio:9,scale:linear,setYExtents:!f,shareYAxis:!t,showCircles:!t,smoothLines:!f,times:!(),yAxis:()),title:'Agents Status',type:line))"
|
<kbn-vis vis-height="240px" vis-type="line" vis-index-pattern="wazuh-monitoring-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'2',params:(customInterval:'2h',extended_bounds:(),field:'@timestamp',interval:'auto',min_doc_count:1),schema:segment,type:date_histogram),(enabled:!t,id:'3',params:(field:id),schema:metric,type:cardinality),(enabled:!t,id:'4',params:(field:status,order:asc,orderBy:'3',size:5),schema:group,type:terms)),listeners:(),params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,drawLinesBetweenPoints:!t,interpolate:linear,radiusRatio:9,scale:linear,setYExtents:!f,shareYAxis:!t,showCircles:!t,smoothLines:!f,times:!(),yAxis:()),title:'Agents Status',type:line))"
|
||||||
vis-filter="*">
|
vis-filter="*">
|
||||||
</kbn-vis>
|
</kbn-vis>
|
||||||
</md-card-content>
|
</md-card-content>
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<md-card flex>
|
<md-card flex>
|
||||||
<md-card-content>
|
<md-card-content>
|
||||||
<span class="md-headline">Events per agent evolution</span>
|
<span class="md-headline">Events per agent evolution</span>
|
||||||
<kbn-vis vis-height="220px" vis-type="line" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'rule.groups:%22rootcheck%22')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(customInterval:'2h',extended_bounds:(),field:'@timestamp',interval:auto,min_doc_count:1),schema:segment,type:date_histogram),(enabled:!t,id:'3',params:(field:agent.name,order:desc,orderBy:'1',size:5),schema:group,type:terms)),listeners:(),params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,drawLinesBetweenPoints:!t,interpolate:linear,radiusRatio:9,scale:linear,setYExtents:!f,shareYAxis:!t,showCircles:!t,smoothLines:!f,times:!(),yAxis:()),title:'New%20Visualization',type:line))"
|
<kbn-vis vis-height="220px" vis-type="line" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(customInterval:'2h',extended_bounds:(),field:'@timestamp',interval:auto,min_doc_count:1),schema:segment,type:date_histogram),(enabled:!t,id:'3',params:(field:agent.name,order:desc,orderBy:'1',size:5),schema:group,type:terms)),listeners:(),params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,drawLinesBetweenPoints:!t,interpolate:linear,radiusRatio:9,scale:linear,setYExtents:!f,shareYAxis:!t,showCircles:!t,smoothLines:!f,times:!(),yAxis:()),title:'New%20Visualization',type:line))"
|
||||||
vis-filter='rule.groups:"rootcheck"'>
|
vis-filter='rule.groups:"rootcheck"'>
|
||||||
</kbn-vis>
|
</kbn-vis>
|
||||||
</md-card-content>
|
</md-card-content>
|
||||||
@ -52,8 +52,8 @@
|
|||||||
</md-card-title-text>
|
</md-card-title-text>
|
||||||
</md-card-title>
|
</md-card-title>
|
||||||
<md-card-content>
|
<md-card-content>
|
||||||
<kbn-vis vis-height="460px" vis-type="table" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'location:%20rootcheck')),uiState:(vis:(params:(sort:(columnIndex:3,direction:desc)))),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:agent.name,order:desc,orderBy:'1',size:5000),schema:bucket,type:terms),(enabled:!t,id:'3',params:(field:rule.description,order:desc,orderBy:'1',size:1),schema:bucket,type:terms),(enabled:!t,id:'4',params:(field:title,order:desc,orderBy:'1',size:1),schema:bucket,type:terms)),listeners:(),params:(perPage:10,showMeticsAtAllLevels:!f,showPartialRows:!f,showTotal:!f,sort:(columnIndex:!n,direction:!n),totalFunc:sum),title:'New%20Visualization',type:table))"
|
<kbn-vis vis-height="460px" vis-type="table" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(vis:(params:(sort:(columnIndex:3,direction:desc)))),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(customLabel:'Agent%20name',field:agent.name,order:desc,orderBy:'1',size:999999999),schema:bucket,type:terms),(enabled:!t,id:'3',params:(customLabel:'Rule%20description',field:rule.description,order:desc,orderBy:'1',size:999999999),schema:bucket,type:terms),(enabled:!t,id:'4',params:(customLabel:Control,field:title,order:desc,orderBy:'1',size:999999999),schema:bucket,type:terms)),listeners:(),params:(perPage:10,showMeticsAtAllLevels:!f,showPartialRows:!f,showTotal:!f,sort:(columnIndex:!n,direction:!n),totalFunc:sum),title:'New%20Visualization',type:table))"
|
||||||
vis-filter='location: rootcheck'>
|
vis-filter='rule.groups:"rootcheck"'>
|
||||||
</kbn-vis>
|
</kbn-vis>
|
||||||
</md-card-content>
|
</md-card-content>
|
||||||
</md-card>
|
</md-card>
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user