Skip to content

Commit

Permalink
Merge pull request #2641 from wazuh/feature/2632-alerts-summary-for-a…
Browse files Browse the repository at this point in the history
…ll-modules

[FEATURE] [4.0-7.9] Alerts summary for all modules
  • Loading branch information
jsanchez91 committed Nov 19, 2020
2 parents 104fe20 + 2f263c5 commit 16358cc
Show file tree
Hide file tree
Showing 13 changed files with 224 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes to the Wazuh app project will be documented in this file.

### Changed

- Alerts summary table for PDF reports on all modules [#2632](https://github.com/wazuh/wazuh-kibana-app/issues/2632)
- [4.0-7.9] Run as with no wazuh-wui API user [#2576](https://github.com/wazuh/wazuh-kibana-app/issues/2576)
- Deploy a new agent interface as default interface [#2564](https://github.com/wazuh/wazuh-kibana-app/issues/2564)

Expand Down
36 changes: 36 additions & 0 deletions public/components/visualize/agent-visualizations.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ export const agentVisualizations = {
id: 'Wazuh-App-Agents-AWS-geo'
}
]
},
{
hide: true,
vis: [
{
title: 'Alerts summary',
id: 'Wazuh-App-Agents-AWS-Alerts-summary'
}
]
}
]
},
Expand Down Expand Up @@ -218,6 +227,15 @@ export const agentVisualizations = {
width: 60
},
]
},
{
hide: true,
vis: [
{
title: 'Alerts summary',
id: 'Wazuh-App-Agents-GCP-Alerts-summary'
}
]
}
]
},
Expand Down Expand Up @@ -543,6 +561,15 @@ export const agentVisualizations = {
id: 'Wazuh-App-Agents-Virustotal-Files-Table'
}
]
},
{
hide: true,
vis: [
{
title: 'Alerts summary',
id: 'Wazuh-App-Agents-Virustotal-Alerts-summary'
}
]
}
]
},
Expand Down Expand Up @@ -625,6 +652,15 @@ export const agentVisualizations = {
width: 34
}
]
},
{
hide: true,
vis: [
{
title: 'Alerts summary',
id: 'Wazuh-App-Agents-MITRE-Alerts-summary'
}
]
}
]
},
Expand Down
36 changes: 36 additions & 0 deletions public/components/visualize/visualizations.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,15 @@ export const visualizations = {
id: 'Wazuh-App-Overview-AWS-geo'
}
]
},
{
hide: true,
vis: [
{
title: 'Alerts summary',
id: 'Wazuh-App-Overview-AWS-Alerts-summary'
}
]
}
]
},
Expand Down Expand Up @@ -206,6 +215,15 @@ export const visualizations = {
},
]
},
{
hide: true,
vis: [
{
title: 'Alerts summary',
id: 'Wazuh-App-Overview-GCP-Alerts-summary'
}
]
}
]
},
pci: {
Expand Down Expand Up @@ -608,6 +626,15 @@ export const visualizations = {
id: 'Wazuh-App-Overview-Virustotal-Files-Table'
}
]
},
{
hide: true,
vis: [
{
title: 'Alerts summary',
id: 'Wazuh-App-Overview-Virustotal-Alerts-summary'
}
]
}
]
},
Expand Down Expand Up @@ -696,6 +723,15 @@ export const visualizations = {
}
]
},
{
hide: true,
vis: [
{
title: 'Alerts summary',
id: 'Wazuh-App-Overview-MITRE-Alerts-summary'
}
]
}
]
},
docker: {
Expand Down
2 changes: 1 addition & 1 deletion public/components/visualize/wz-visualize.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class WzVisualize extends Component {
if (prevProps.isAgent !== this.props.isAgent) {
this._isMount &&
this.setState({ visualizations: !!this.props.isAgent ? agentVisualizations : visualizations });
visHandler.removeAll();
typeof prevProps.isAgent !== 'undefined' && visHandler.removeAll();
}
}

Expand Down
9 changes: 9 additions & 0 deletions public/templates/agents/visualizations.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,15 @@ export const visualizations = {
id: 'Wazuh-App-Agents-Virustotal-Files-Table'
}
]
},
{
hide: true,
vis: [
{
title: 'Alerts summary',
id: 'Wazuh-App-Agents-Virustotal-Alerts-summary'
}
]
}
]
},
Expand Down
19 changes: 18 additions & 1 deletion server/integration-files/visualizations/agents/agents-aws.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,22 @@ export default [
'{"index":"wazuh-alerts","query":{"query":"","language":"lucene"},"filter":[]}'
}
}
}
},
{
_id: 'Wazuh-App-Agents-AWS-Alerts-summary',
_type: 'visualization',
_source: {
title: 'Alerts summary',
visState:
'{"title":"Alerts summary","type":"table","params":{"perPage":10,"showPartialRows":false,"showMeticsAtAllLevels":false,"sort":{"columnIndex":3,"direction":"desc"},"showTotal":false,"totalFunc":"sum"},"aggs":[{"id":"1","enabled":true,"type":"count","schema":"metric","params":{}},{"id":"2","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.id","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":50,"order":"desc","orderBy":"1","customLabel":"Rule ID"}},{"id":"3","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.description","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":1,"order":"desc","orderBy":"1","customLabel":"Description"}},{"id":"4","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.level","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":1,"order":"desc","orderBy":"1","customLabel":"Level"}}]}',
uiStateJSON:
'{"vis":{"params":{"sort":{"columnIndex":3,"direction":"desc"}}}}',
description: '',
version: 1,
kibanaSavedObjectMeta: {
searchSourceJSON:
'{"index":"wazuh-alerts","filter":[],"query":{"query":"","language":"lucene"}}'
}
}
},
];
17 changes: 17 additions & 0 deletions server/integration-files/visualizations/agents/agents-gcp.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,21 @@ export default [
},
_type: 'visualization',
},
{
_id: 'Wazuh-App-Agents-GCP-Alerts-summary',
_type: 'visualization',
_source: {
title: 'Alerts summary',
visState:
'{"title":"Alerts summary","type":"table","params":{"perPage":10,"showPartialRows":false,"showMeticsAtAllLevels":false,"sort":{"columnIndex":3,"direction":"desc"},"showTotal":false,"totalFunc":"sum"},"aggs":[{"id":"1","enabled":true,"type":"count","schema":"metric","params":{}},{"id":"2","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.id","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":50,"order":"desc","orderBy":"1","customLabel":"Rule ID"}},{"id":"3","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.description","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":1,"order":"desc","orderBy":"1","customLabel":"Description"}},{"id":"4","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.level","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":1,"order":"desc","orderBy":"1","customLabel":"Level"}}]}',
uiStateJSON:
'{"vis":{"params":{"sort":{"columnIndex":3,"direction":"desc"}}}}',
description: '',
version: 1,
kibanaSavedObjectMeta: {
searchSourceJSON:
'{"index":"wazuh-alerts","filter":[],"query":{"query":"","language":"lucene"}}'
}
}
},
];
19 changes: 18 additions & 1 deletion server/integration-files/visualizations/agents/agents-mitre.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,22 @@ export default [
}
},
_type: 'visualization'
}
},
{
_id: 'Wazuh-App-Agents-MITRE-Alerts-summary',
_type: 'visualization',
_source: {
title: 'Alerts summary',
visState:
'{"title":"Alerts summary","type":"table","params":{"perPage":10,"showPartialRows":false,"showMeticsAtAllLevels":false,"sort":{"columnIndex":3,"direction":"desc"},"showTotal":false,"totalFunc":"sum"},"aggs":[{"id":"1","enabled":true,"type":"count","schema":"metric","params":{}},{"id":"2","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.id","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":50,"order":"desc","orderBy":"1","customLabel":"Rule ID"}},{"id":"3","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.description","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":1,"order":"desc","orderBy":"1","customLabel":"Description"}},{"id":"4","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.level","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":1,"order":"desc","orderBy":"1","customLabel":"Level"}}]}',
uiStateJSON:
'{"vis":{"params":{"sort":{"columnIndex":3,"direction":"desc"}}}}',
description: '',
version: 1,
kibanaSavedObjectMeta: {
searchSourceJSON:
'{"index":"wazuh-alerts","filter":[],"query":{"query":"","language":"lucene"}}'
}
}
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -249,5 +249,22 @@ export default [
}`
}
}
}
},
{
_id: 'Wazuh-App-Agents-Virustotal-Alerts-summary',
_type: 'visualization',
_source: {
title: 'Alerts summary',
visState:
'{"title":"Alerts summary","type":"table","params":{"perPage":10,"showPartialRows":false,"showMeticsAtAllLevels":false,"sort":{"columnIndex":3,"direction":"desc"},"showTotal":false,"totalFunc":"sum"},"aggs":[{"id":"1","enabled":true,"type":"count","schema":"metric","params":{}},{"id":"2","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.id","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":50,"order":"desc","orderBy":"1","customLabel":"Rule ID"}},{"id":"3","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.description","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":1,"order":"desc","orderBy":"1","customLabel":"Description"}},{"id":"4","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.level","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":1,"order":"desc","orderBy":"1","customLabel":"Level"}}]}',
uiStateJSON:
'{"vis":{"params":{"sort":{"columnIndex":3,"direction":"desc"}}}}',
description: '',
version: 1,
kibanaSavedObjectMeta: {
searchSourceJSON:
'{"index":"wazuh-alerts","filter":[],"query":{"query":"","language":"lucene"}}'
}
}
},
];
17 changes: 17 additions & 0 deletions server/integration-files/visualizations/overview/overview-aws.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,22 @@ export default [
'{"index":"wazuh-alerts","query":{"query":"","language":"lucene"},"filter":[]}'
}
}
},
{
_id: 'Wazuh-App-Overview-AWS-Alerts-summary',
_type: 'visualization',
_source: {
title: 'Alerts summary',
visState:
'{"title":"Alerts summary","type":"table","params":{"perPage":10,"showPartialRows":false,"showMeticsAtAllLevels":false,"sort":{"columnIndex":3,"direction":"desc"},"showTotal":false,"totalFunc":"sum"},"aggs":[{"id":"1","enabled":true,"type":"count","schema":"metric","params":{}},{"id":"2","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.id","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":50,"order":"desc","orderBy":"1","customLabel":"Rule ID"}},{"id":"3","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.description","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":20,"order":"desc","orderBy":"1","customLabel":"Description"}},{"id":"4","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.level","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":12,"order":"desc","orderBy":"1","customLabel":"Level"}}]}',
uiStateJSON:
'{"vis":{"params":{"sort":{"columnIndex":3,"direction":"desc"}}}}',
description: '',
version: 1,
kibanaSavedObjectMeta: {
searchSourceJSON:
'{"index":"wazuh-alerts","filter":[],"query":{"query":"","language":"lucene"}}'
}
}
}
];
18 changes: 17 additions & 1 deletion server/integration-files/visualizations/overview/overview-gcp.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,21 @@ export default [
},
_type: 'visualization',
},

{
_id: 'Wazuh-App-Overview-GCP-Alerts-summary',
_type: 'visualization',
_source: {
title: 'Alerts summary',
visState:
'{"title":"Alerts summary","type":"table","params":{"perPage":10,"showPartialRows":false,"showMeticsAtAllLevels":false,"sort":{"columnIndex":3,"direction":"desc"},"showTotal":false,"totalFunc":"sum"},"aggs":[{"id":"1","enabled":true,"type":"count","schema":"metric","params":{}},{"id":"2","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.id","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":50,"order":"desc","orderBy":"1","customLabel":"Rule ID"}},{"id":"3","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.description","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":20,"order":"desc","orderBy":"1","customLabel":"Description"}},{"id":"4","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.level","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":12,"order":"desc","orderBy":"1","customLabel":"Level"}}]}',
uiStateJSON:
'{"vis":{"params":{"sort":{"columnIndex":3,"direction":"desc"}}}}',
description: '',
version: 1,
kibanaSavedObjectMeta: {
searchSourceJSON:
'{"index":"wazuh-alerts","filter":[],"query":{"query":"","language":"lucene"}}'
}
}
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,22 @@ export default [
}
},
_type: 'visualization'
}
},
{
_id: 'Wazuh-App-Overview-MITRE-Alerts-summary',
_type: 'visualization',
_source: {
title: 'Alerts summary',
visState:
'{"title":"Alerts summary","type":"table","params":{"perPage":10,"showPartialRows":false,"showMeticsAtAllLevels":false,"sort":{"columnIndex":3,"direction":"desc"},"showTotal":false,"totalFunc":"sum"},"aggs":[{"id":"1","enabled":true,"type":"count","schema":"metric","params":{}},{"id":"2","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.id","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":50,"order":"desc","orderBy":"1","customLabel":"Rule ID"}},{"id":"3","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.description","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":20,"order":"desc","orderBy":"1","customLabel":"Description"}},{"id":"4","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.level","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":12,"order":"desc","orderBy":"1","customLabel":"Level"}}]}',
uiStateJSON:
'{"vis":{"params":{"sort":{"columnIndex":3,"direction":"desc"}}}}',
description: '',
version: 1,
kibanaSavedObjectMeta: {
searchSourceJSON:
'{"index":"wazuh-alerts","filter":[],"query":{"query":"","language":"lucene"}}'
}
}
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -406,5 +406,22 @@ export default [
}`
}
}
}
},
{
_id: 'Wazuh-App-Overview-Virustotal-Alerts-summary',
_type: 'visualization',
_source: {
title: 'Alerts summary',
visState:
'{"title":"Alerts summary","type":"table","params":{"perPage":10,"showPartialRows":false,"showMeticsAtAllLevels":false,"sort":{"columnIndex":3,"direction":"desc"},"showTotal":false,"totalFunc":"sum"},"aggs":[{"id":"1","enabled":true,"type":"count","schema":"metric","params":{}},{"id":"2","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.id","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":50,"order":"desc","orderBy":"1","customLabel":"Rule ID"}},{"id":"3","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.description","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":20,"order":"desc","orderBy":"1","customLabel":"Description"}},{"id":"4","enabled":true,"type":"terms","schema":"bucket","params":{"field":"rule.level","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing","size":12,"order":"desc","orderBy":"1","customLabel":"Level"}}]}',
uiStateJSON:
'{"vis":{"params":{"sort":{"columnIndex":3,"direction":"desc"}}}}',
description: '',
version: 1,
kibanaSavedObjectMeta: {
searchSourceJSON:
'{"index":"wazuh-alerts","filter":[],"query":{"query":"","language":"lucene"}}'
}
}
},
];

0 comments on commit 16358cc

Please sign in to comment.