-
-
-
-
+
+
+
+ {isDataSourceLoading && !dataSource ? (
+
+ ) : (
+
+
-
-
-
-
-
-
- {!!Object.keys(complianceObject).length &&
- this.state.filterParams.time.from !== 'init' && (
-
-
-
-
-
-
- this.props.onSelectedTabChanged(id)
- }
- {...this.state}
- />
-
-
- )}
-
-
-
-
- );
- }
- },
-);
+ )}
+
+
+
+
+
+ {!!Object.keys(complianceData.complianceObject).length && (
+
+
+
+ setComplianceData(state => ({
+ ...state,
+ selectedRequirements,
+ }))
+ }
+ requirementsCount={action.data || []}
+ loadingAlerts={action.running}
+ {...complianceData}
+ />
+
+
+
+ props.onSelectedTabChanged(id)
+ }
+ requirementsCount={action.data || []}
+ loadingAlerts={action.running}
+ fetchFilters={fetchFilters}
+ getRegulatoryComplianceRequirementFilter={
+ getRegulatoryComplianceRequirementFilter
+ }
+ {...complianceData}
+ />
+
+
+ )}
+
+
+
+
+ >
+ );
+});
diff --git a/plugins/main/public/components/overview/compliance-table/components/requirement-flyout/requirement-flyout.tsx b/plugins/main/public/components/overview/compliance-table/components/requirement-flyout/requirement-flyout.tsx
index 8f21e4c505..df55448645 100644
--- a/plugins/main/public/components/overview/compliance-table/components/requirement-flyout/requirement-flyout.tsx
+++ b/plugins/main/public/components/overview/compliance-table/components/requirement-flyout/requirement-flyout.tsx
@@ -11,7 +11,6 @@
*/
import React, { Component } from 'react';
import {
- EuiFlyout,
EuiFlyoutHeader,
EuiLoadingContent,
EuiTitle,
@@ -23,228 +22,359 @@ import {
EuiText,
EuiFlexItem,
EuiSpacer,
+ EuiLink,
} from '@elastic/eui';
-import { Discover } from '../../../../common/modules/discover';
import { AppState } from '../../../../../react-services/app-state';
import { requirementGoal } from '../../requirement-goal';
-import { getUiSettings } from '../../../../../kibana-services';
-import { FilterManager } from '../../../../../../../../src/plugins/data/public/';
+import { getCore, getUiSettings } from '../../../../../kibana-services';
+import {
+ FilterManager,
+ IndexPattern,
+} from '../../../../../../../../src/plugins/data/public/';
import { WzFlyout } from '../../../../../components/common/flyouts';
+import { WazuhFlyoutDiscover } from '../../../../common/wazuh-discover/wz-flyout-discover';
+import { PatternDataSource } from '../../../../common/data-source';
+import { formatUIDate } from '../../../../../react-services';
+import TechniqueRowDetails from '../../../mitre/framework/components/techniques/components/flyout-technique/technique-row-details';
+import { buildPhraseFilter } from '../../../../../../../../src/plugins/data/common';
+import { connect } from 'react-redux';
+import { rules } from '../../../../../utils/applications';
+import { endpointSummary } from '../../../../../utils/applications';
+
+const renderRequirements = (value: []) => {
+ return (
+
+ {value.map(v => {
+ return {v};
+ })}
+
+ );
+};
+
+const mapStateToProps = state => ({
+ currentAgentData: state.appStateReducers.currentAgentData,
+});
+
+export const RequirementFlyout = connect(mapStateToProps)(
+ class RequirementFlyout extends Component {
+ _isMount = false;
+ state: {};
+
+ props!: {};
+
+ filterManager: FilterManager;
+
+ constructor(props) {
+ super(props);
+ this.state = {};
+ this.filterManager = new FilterManager(getUiSettings());
+ }
-export class RequirementFlyout extends Component {
- _isMount = false;
- state: {};
-
- props!: {};
-
- filterManager: FilterManager;
-
- constructor(props) {
- super(props);
- this.state = {};
- this.filterManager = new FilterManager(getUiSettings());
- }
-
- componentDidMount() {
- this._isMount = true;
- }
-
- renderHeader() {
- const { currentRequirement } = this.props;
- return (
-
- {(!currentRequirement && (
-
-
-
- )) || (
-
- Requirement {currentRequirement}
-
- )}
-
- );
- }
-
- updateTotalHits = (total) => {
- this.setState({ totalHits: total });
- };
-
- renderBody() {
- const { currentRequirement } = this.props;
- const requirementImplicitFilter = {};
- const isCluster = (AppState.getClusterInfo() || {}).status === 'enabled';
- const clusterFilter = isCluster
- ? { 'cluster.name': AppState.getClusterInfo().cluster }
- : { 'manager.name': AppState.getClusterInfo().manager };
- this.clusterFilter = clusterFilter;
- requirementImplicitFilter[this.props.getRequirementKey()] = currentRequirement;
-
- const implicitFilters = [requirementImplicitFilter, this.clusterFilter];
- if (this.props.implicitFilters) {
- this.props.implicitFilters.forEach((item) => implicitFilters.push(item));
+ componentDidMount() {
+ this._isMount = true;
}
- //Goal for PCI
- const currentReq = this.props.currentRequirement.split('.')[0];
-
- return (
-
-
- Details
+
+ getDiscoverColumns() {
+ const agentId = this.props.currentAgentData?.id;
+ return agentId
+ ? [
+ {
+ id: 'timestamp',
+ displayAsText: 'Time',
+ render: value => formatUIDate(value),
+ },
+ {
+ id: this.props.getRequirementKey(),
+ displayAsText: 'Requirement(s)',
+ render: renderRequirements,
+ },
+ { id: 'rule.description', displayAsText: 'Description' },
+ { id: 'rule.level', displayAsText: 'Level' },
+ {
+ id: 'rule.id',
+ displayAsText: 'Rule ID',
+ render: value => (
+ {
+ getCore().application.navigateToApp(rules.id, {
+ path: `#/manager/?tab=rules&redirectRule=${value}`,
+ });
+ }}
+ >
+ {value}
+
+ ),
+ },
+ ]
+ : [
+ {
+ id: 'timestamp',
+ displayAsText: 'Time',
+ render: value => formatUIDate(value),
+ },
+ {
+ id: 'agent.id',
+ displayAsText: 'Agent',
+ render: value => (
+ {
+ getCore().application.navigateToApp(endpointSummary.id, {
+ path: `#/agents/?tab=welcome&agent=${value}`,
+ });
+ }}
+ >
+ {value}
+
+ ),
+ },
+ {
+ id: 'agent.name',
+ displayAsText: 'Agent name',
+ },
+ {
+ id: this.props.getRequirementKey(),
+ displayAsText: 'Requirement',
+ render: renderRequirements,
+ },
+ { id: 'rule.description', displayAsText: 'Description' },
+ { id: 'rule.level', displayAsText: 'Level' },
+ {
+ id: 'rule.id',
+ displayAsText: 'Rule ID',
+ render: value => (
+ {
+ getCore().application.navigateToApp(rules.id, {
+ path: `#/manager/?tab=rules&redirectRule=${value}`,
+ });
+ }}
+ >
+ {value}
+
+ ),
+ },
+ ];
+ }
+
+ renderHeader() {
+ const { currentRequirement } = this.props;
+ return (
+
+ {(!currentRequirement && (
+
+
+
+ )) || (
+
+ Requirement {currentRequirement}
- }
- paddingSize="xs"
- initialIsOpen={true}
- >
-
-
- {requirementGoal[currentReq] && (
-
+ )}
+
+ );
+ }
+
+ renderDiscoverExpandedRow(props: {
+ doc: any;
+ item: any;
+ indexPattern: any;
+ }) {
+ return (
+ {
+ // add filters to the filter state
+ // generate the filter
+ const key = Object.keys(value)[0];
+ const filterValue = value[key];
+ const valuesArray = Array.isArray(filterValue)
+ ? [...filterValue]
+ : [filterValue];
+ const newFilter = valuesArray
+ .map(item =>
+ buildPhraseFilter(
+ { name: key, type: 'string' },
+ item,
+ indexPattern,
+ ),
+ )
+ .filter(Boolean);
+
+ this.filterManager.addFilters(newFilter);
+ }}
+ />
+ );
+ }
+
+ renderBody() {
+ const { currentRequirement } = this.props;
+ const requirementImplicitFilter = {};
+ const isCluster = (AppState.getClusterInfo() || {}).status === 'enabled';
+ const clusterFilter = isCluster
+ ? { 'cluster.name': AppState.getClusterInfo().cluster }
+ : { 'manager.name': AppState.getClusterInfo().manager };
+ this.clusterFilter = clusterFilter;
+ requirementImplicitFilter[this.props.getRequirementKey()] =
+ currentRequirement;
+
+ const implicitFilters = [requirementImplicitFilter, this.clusterFilter];
+ if (this.props.implicitFilters) {
+ this.props.implicitFilters.forEach(item => implicitFilters.push(item));
+ }
+ //Goal for PCI
+ const currentReq = this.props.currentRequirement.split('.')[0];
+
+ return (
+
+
+ Details
+
+ }
+ paddingSize='xs'
+ initialIsOpen={true}
+ >
+
+
+ {requirementGoal[currentReq] && (
+
+
+
+
+
+
+ Goals
+
+ {requirementGoal[currentReq]}
+
+
+
+ )}
+
+
-
+
- Goals
+
+ Requirement description
+
- {requirementGoal[currentReq]}
+ {this.props.description}
- )}
-
-
-
-
-
-
-
- Requirement description
-
- {this.props.description}
-
-
-
-
-
-
-
-
-
- {this.state.totalHits || 0} hits
+
- }
- buttonContent={
-
-
- Recent events
- {this.props.view !== 'events' && (
-
-
-
- {
- this.props.openDashboard(e, currentRequirement);
- e.stopPropagation();
- }}
- color="primary"
- type="visualizeApp"
- style={{ marginRight: '10px' }}
- >
-
-
- {
- this.props.openDiscover(e, currentRequirement);
- e.stopPropagation();
- }}
- color="primary"
- type="discoverApp"
- >
-
+
+
+
+
+
+ Recent events
+ {this.props.view !== 'events' && (
+
+
+
+ {
+ this.props.openDashboard(e, currentRequirement);
+ e.stopPropagation();
+ }}
+ color='primary'
+ type='visualizeApp'
+ style={{ marginRight: '10px' }}
+ >
+
+
+ {
+ this.props.openDiscover(e, currentRequirement);
+ e.stopPropagation();
+ }}
+ color='primary'
+ type='discoverApp'
+ >
+
+
-
- )}
-
-
- }
- paddingSize="none"
- initialIsOpen={true}
- >
-
-
- this.updateTotalHits(total)}
+ )}
+
+
+ }
+ paddingSize='none'
+ initialIsOpen={true}
+ >
+
+
+ this.renderDiscoverExpandedRow(...args)
+ }
/>
-
-
-
-
- );
- }
-
- renderLoading() {
- return (
-
-
-
-
- );
- }
-
- render() {
- const { currentRequirement } = this.props;
- const { onChangeFlyout } = this.props;
- return (
- onChangeFlyout(false)}
- flyoutProps={{
- maxWidth: '60%',
- size: 'l',
- className: 'flyout-no-overlap wz-inventory wzApp',
- 'aria-labelledby': 'flyoutSmallTitle',
- }}
- >
- {currentRequirement && this.renderHeader()}
- {this.renderBody()}
- {this.state.loading && this.renderLoading()}
-
- );
- }
-}
+
+
+
+ );
+ }
+
+ renderLoading() {
+ return (
+
+
+
+
+ );
+ }
+
+ render() {
+ const { currentRequirement } = this.props;
+ const { onChangeFlyout } = this.props;
+ return (
+
onChangeFlyout(false)}
+ flyoutProps={{
+ maxWidth: '60%',
+ size: 'l',
+ className: 'flyout-no-overlap wz-inventory wzApp',
+ 'aria-labelledby': 'flyoutSmallTitle',
+ }}
+ >
+ {currentRequirement && this.renderHeader()}
+ {this.renderBody()}
+ {this.state.loading && this.renderLoading()}
+
+ );
+ }
+ },
+);
diff --git a/plugins/main/public/components/overview/compliance-table/components/subrequirements/subrequirements.tsx b/plugins/main/public/components/overview/compliance-table/components/subrequirements/subrequirements.tsx
index b9fef190f6..55b71ad380 100644
--- a/plugins/main/public/components/overview/compliance-table/components/subrequirements/subrequirements.tsx
+++ b/plugins/main/public/components/overview/compliance-table/components/subrequirements/subrequirements.tsx
@@ -26,7 +26,6 @@ import {
EuiIcon,
EuiLoadingSpinner,
} from '@elastic/eui';
-import { AppNavigate } from '../../../../../react-services/app-navigate';
import { AppState } from '../../../../../react-services/app-state';
import { RequirementFlyout } from '../requirement-flyout/requirement-flyout';
import {
@@ -82,62 +81,32 @@ export class ComplianceSubrequirements extends Component {
}
getRequirementKey() {
- if (this.props.section === 'pci') {
- return 'rule.pci_dss';
- }
- if (this.props.section === 'gdpr') {
- return 'rule.gdpr';
- }
- if (this.props.section === 'nist') {
- return 'rule.nist_800_53';
- }
- if (this.props.section === 'hipaa') {
- return 'rule.hipaa';
- }
- if (this.props.section === 'tsc') {
- return 'rule.tsc';
- }
- return 'pci_dss';
+ const mapKeys = {
+ pci: 'rule.pci_dss',
+ gdpr: 'rule.gdpr',
+ nist: 'rule.nist_800_53',
+ hipaa: 'rule.hipaa',
+ tsc: 'rule.tsc',
+ };
+ return mapKeys[this.props.section];
}
- openDashboardCurrentWindow(requirementId) {
+ openDiscover(e, requirementId) {
this.addFilter({
key: this.getRequirementKey(),
value: requirementId,
negate: false,
});
- this.props.onSelectedTabChanged('dashboard');
+ this.props.onSelectedTabChanged('events');
}
- openDiscoverCurrentWindow(requirementId) {
+ openDashboard(e, requirementId) {
this.addFilter({
key: this.getRequirementKey(),
value: requirementId,
negate: false,
});
- this.props.onSelectedTabChanged('events');
- }
-
- openDiscover(e, requirementId) {
- const filters = {};
- filters[this.getRequirementKey()] = requirementId;
- AppNavigate.navigateToModule(
- e,
- 'overview',
- { tab: this.props.section, tabView: 'discover', filters },
- () => this.openDiscoverCurrentWindow(requirementId),
- );
- }
-
- openDashboard(e, requirementId) {
- const filters = {};
- filters[this.getRequirementKey()] = requirementId;
- AppNavigate.navigateToModule(
- e,
- 'overview',
- { tab: this.props.section, tabView: 'panels', filters },
- () => this.openDashboardCurrentWindow(requirementId),
- );
+ this.props.onSelectedTabChanged('dashboard');
}
renderFacet() {
@@ -234,7 +203,7 @@ export class ComplianceSubrequirements extends Component {
{
@@ -383,6 +352,13 @@ export class ComplianceSubrequirements extends Component {
getRequirementKey={() => {
return this.getRequirementKey();
}}
+ fetchFilters={[
+ ...this.props.fetchFilters,
+ ...this.props.getRegulatoryComplianceRequirementFilter(
+ this.getRequirementKey(),
+ this.state.selectedRequirement,
+ ),
+ ]}
openDashboard={(e, itemId) => this.openDashboard(e, itemId)}
openDiscover={(e, itemId) => this.openDiscover(e, itemId)}
/>
diff --git a/plugins/main/public/components/overview/pci/dashboards/dashboard-panels.ts b/plugins/main/public/components/overview/pci/dashboards/dashboard-panels.ts
new file mode 100644
index 0000000000..3157ffc199
--- /dev/null
+++ b/plugins/main/public/components/overview/pci/dashboards/dashboard-panels.ts
@@ -0,0 +1,1045 @@
+import { DashboardPanelState } from '../../../../../../../src/plugins/dashboard/public/application';
+import { EmbeddableInput } from '../../../../../../../src/plugins/embeddable/public';
+
+const getVisStateTopRequirements = (indexPatternId: string) => {
+ return {
+ id: 'Wazuh-App-Overview-PCI-DSS-requirements',
+ title: 'Top 10 PCI DSS requirements',
+ type: 'line',
+ params: {
+ type: 'line',
+ grid: { categoryLines: true, valueAxis: 'ValueAxis-1' },
+ categoryAxes: [
+ {
+ id: 'CategoryAxis-1',
+ type: 'category',
+ position: 'bottom',
+ show: true,
+ style: {},
+ scale: { type: 'linear' },
+ labels: { show: true, filter: true, truncate: 100 },
+ title: {},
+ },
+ ],
+ valueAxes: [
+ {
+ id: 'ValueAxis-1',
+ name: 'LeftAxis-1',
+ type: 'value',
+ position: 'left',
+ show: true,
+ style: {},
+ scale: { type: 'linear', mode: 'normal' },
+ labels: { show: true, rotate: 0, filter: false, truncate: 100 },
+ title: { text: 'Count' },
+ },
+ ],
+ seriesParams: [
+ {
+ show: 'true',
+ type: 'line',
+ mode: 'normal',
+ data: { label: 'Count', id: '1' },
+ valueAxis: 'ValueAxis-1',
+ drawLinesBetweenPoints: false,
+ showCircles: true,
+ },
+ ],
+ addTooltip: true,
+ addLegend: true,
+ legendPosition: 'right',
+ times: [],
+ addTimeMarker: false,
+ dimensions: {
+ x: {
+ accessor: 0,
+ format: { id: 'date', params: { pattern: 'YYYY-MM-DD' } },
+ params: { date: true, interval: 'P1D', format: 'YYYY-MM-DD' },
+ aggType: 'date_histogram',
+ },
+ y: [
+ {
+ accessor: 2,
+ format: { id: 'number' },
+ params: {},
+ aggType: 'count',
+ },
+ ],
+ z: [
+ {
+ accessor: 3,
+ format: { id: 'number' },
+ params: {},
+ aggType: 'count',
+ },
+ ],
+ series: [
+ {
+ accessor: 1,
+ format: {
+ id: 'terms',
+ params: {
+ id: 'string',
+ otherBucketLabel: 'Other',
+ missingBucketLabel: 'Missing',
+ },
+ },
+ params: {},
+ aggType: 'terms',
+ },
+ ],
+ },
+ radiusRatio: 50,
+ },
+ uiState: {},
+ data: {
+ searchSource: {
+ query: {
+ language: 'kuery',
+ query: '',
+ },
+ filter: [],
+ index: indexPatternId,
+ },
+ references: [
+ {
+ name: 'kibanaSavedObjectMeta.searchSourceJSON.index',
+ type: 'index-pattern',
+ id: indexPatternId,
+ },
+ ],
+ aggs: [
+ {
+ id: '1',
+ enabled: true,
+ type: 'count',
+ schema: 'metric',
+ params: {},
+ },
+ {
+ id: '2',
+ enabled: true,
+ type: 'date_histogram',
+ schema: 'segment',
+ params: {
+ field: 'timestamp',
+ timeRange: { from: 'now-1h', to: 'now' },
+ useNormalizedEsInterval: true,
+ interval: 'auto',
+ drop_partials: false,
+ min_doc_count: 1,
+ extended_bounds: {},
+ },
+ },
+ {
+ id: '4',
+ enabled: true,
+ type: 'count',
+ schema: 'radius',
+ params: {},
+ },
+ {
+ id: '4',
+ enabled: true,
+ type: 'count',
+ schema: 'radius',
+ params: {},
+ },
+ ],
+ },
+ };
+};
+
+const getVisStateTopAgentsByCount = (indexPatternId: string) => {
+ return {
+ id: 'Wazuh-App-Overview-PCI-DSS-Agents',
+ title: 'Top 10 agents by alerts count',
+ type: 'pie',
+ params: {
+ type: 'pie',
+ addTooltip: true,
+ addLegend: true,
+ legendPosition: 'right',
+ isDonut: true,
+ },
+ uiState: {},
+ data: {
+ searchSource: {
+ query: {
+ language: 'kuery',
+ query: '',
+ },
+ filter: [],
+ index: indexPatternId,
+ },
+ references: [
+ {
+ name: 'kibanaSavedObjectMeta.searchSourceJSON.index',
+ type: 'index-pattern',
+ id: indexPatternId,
+ },
+ ],
+ aggs: [
+ {
+ id: '1',
+ enabled: true,
+ type: 'count',
+ schema: 'metric',
+ params: {},
+ },
+ {
+ id: '2',
+ enabled: true,
+ type: 'terms',
+ schema: 'segment',
+ params: {
+ field: 'agent.name',
+ size: 10,
+ order: 'desc',
+ orderBy: '1',
+ },
+ },
+ ],
+ },
+ };
+};
+
+const getVisStateRequirementsOverTime = (indexPatternId: string) => {
+ return {
+ id: 'Wazuh-App-Overview-PCI-DSS-Requirements-over-time',
+ title: 'Top requirements over time',
+ type: 'area',
+ params: {
+ type: 'area',
+ grid: {
+ categoryLines: true,
+ style: { color: '#eee' },
+ valueAxis: 'ValueAxis-1',
+ },
+ categoryAxes: [
+ {
+ id: 'CategoryAxis-1',
+ type: 'category',
+ position: 'bottom',
+ show: true,
+ style: {},
+ scale: { type: 'linear' },
+ labels: { show: true, filter: true, truncate: 100 },
+ title: {},
+ },
+ ],
+ valueAxes: [
+ {
+ id: 'ValueAxis-1',
+ name: 'LeftAxis-1',
+ type: 'value',
+ position: 'left',
+ show: true,
+ style: {},
+ scale: { type: 'linear', mode: 'normal' },
+ labels: { show: true, rotate: 0, filter: false, truncate: 100 },
+ title: { text: 'Count' },
+ },
+ ],
+ seriesParams: [
+ {
+ show: 'true',
+ type: 'area',
+ mode: 'stacked',
+ data: { label: 'Count', id: '1' },
+ drawLinesBetweenPoints: true,
+ showCircles: true,
+ interpolate: 'cardinal',
+ valueAxis: 'ValueAxis-1',
+ },
+ ],
+ addTooltip: true,
+ addLegend: true,
+ legendPosition: 'right',
+ times: [],
+ addTimeMarker: false,
+ },
+ uiState: {},
+ data: {
+ searchSource: {
+ query: {
+ language: 'kuery',
+ query: '',
+ },
+ filter: [],
+ index: indexPatternId,
+ },
+ references: [
+ {
+ name: 'kibanaSavedObjectMeta.searchSourceJSON.index',
+ type: 'index-pattern',
+ id: indexPatternId,
+ },
+ ],
+ aggs: [
+ {
+ id: '1',
+ enabled: true,
+ type: 'count',
+ schema: 'metric',
+ params: {},
+ },
+ {
+ id: '1',
+ enabled: true,
+ type: 'count',
+ schema: 'metric',
+ params: {},
+ },
+ {
+ id: '3',
+ enabled: true,
+ type: 'terms',
+ schema: 'group',
+ params: {
+ field: 'rule.pci_dss',
+ size: '5',
+ order: 'desc',
+ orderBy: '1',
+ otherBucket: false,
+ otherBucketLabel: 'Other',
+ missingBucket: false,
+ missingBucketLabel: 'Missing',
+ },
+ },
+ {
+ id: '2',
+ enabled: true,
+ type: 'date_histogram',
+ schema: 'segment',
+ params: {
+ field: 'timestamp',
+ timeRange: { from: 'now-24h', to: 'now', mode: 'quick' },
+ useNormalizedEsInterval: true,
+ interval: 'auto',
+ time_zone: 'Europe/Berlin',
+ drop_partials: false,
+ customInterval: '2h',
+ min_doc_count: 1,
+ extended_bounds: {},
+ },
+ },
+ ],
+ },
+ };
+};
+
+const getVisStateRequirementsHeatmap = (indexPatternId: string) => {
+ return {
+ id: 'Wazuh-App-Overview-PCI-DSS-Requirements-Agents-heatmap',
+ title: 'Last alerts',
+ type: 'heatmap',
+ params: {
+ type: 'heatmap',
+ addTooltip: true,
+ addLegend: true,
+ enableHover: false,
+ legendPosition: 'right',
+ times: [],
+ colorsNumber: 10,
+ colorSchema: 'Greens',
+ setColorRange: false,
+ colorsRange: [],
+ invertColors: false,
+ percentageMode: false,
+ valueAxes: [
+ {
+ show: false,
+ id: 'ValueAxis-1',
+ type: 'value',
+ scale: { type: 'linear', defaultYExtents: false },
+ labels: {
+ show: false,
+ rotate: 0,
+ overwriteColor: false,
+ color: '#555',
+ },
+ },
+ ],
+ },
+ uiState: {
+ vis: {
+ defaultColors: {
+ '0 - 13': 'rgb(247,252,245)',
+ '13 - 26': 'rgb(233,247,228)',
+ '26 - 39': 'rgb(211,238,205)',
+ '39 - 52': 'rgb(184,227,177)',
+ '52 - 65': 'rgb(152,213,148)',
+ '65 - 78': 'rgb(116,196,118)',
+ '78 - 91': 'rgb(75,176,98)',
+ '91 - 104': 'rgb(47,152,79)',
+ '104 - 117': 'rgb(21,127,59)',
+ '117 - 130': 'rgb(0,100,40)',
+ },
+ },
+ },
+ data: {
+ searchSource: {
+ query: {
+ language: 'kuery',
+ query: '',
+ },
+ filter: [],
+ index: indexPatternId,
+ },
+ references: [
+ {
+ name: 'kibanaSavedObjectMeta.searchSourceJSON.index',
+ type: 'index-pattern',
+ id: indexPatternId,
+ },
+ ],
+ aggs: [
+ {
+ id: '1',
+ enabled: true,
+ type: 'count',
+ schema: 'metric',
+ params: {},
+ },
+ {
+ id: '2',
+ enabled: true,
+ type: 'terms',
+ schema: 'segment',
+ params: {
+ field: 'rule.pci_dss',
+ size: 5,
+ order: 'desc',
+ orderBy: '1',
+ otherBucket: false,
+ otherBucketLabel: 'Other',
+ missingBucket: false,
+ missingBucketLabel: 'Missing',
+ customLabel: 'Requirements',
+ },
+ },
+ {
+ id: '3',
+ enabled: true,
+ type: 'terms',
+ schema: 'group',
+ params: {
+ field: 'agent.name',
+ size: 5,
+ order: 'desc',
+ orderBy: '1',
+ otherBucket: false,
+ otherBucketLabel: 'Other',
+ missingBucket: false,
+ missingBucketLabel: 'Missing',
+ customLabel: 'Agents',
+ },
+ },
+ ],
+ },
+ };
+};
+
+const getVisStateRequirementsByAgent = (indexPatternId: string) => {
+ return {
+ id: 'Wazuh-App-Overview-PCI-DSS-Requirements-by-agent',
+ title: 'Requirements by agent',
+ type: 'histogram',
+ params: {
+ type: 'histogram',
+ grid: {
+ categoryLines: false,
+ style: {
+ color: '#eee',
+ },
+ },
+ categoryAxes: [
+ {
+ id: 'CategoryAxis-1',
+ type: 'category',
+ position: 'bottom',
+ show: true,
+ style: {},
+ scale: {
+ type: 'linear',
+ },
+ labels: {
+ show: true,
+ filter: true,
+ truncate: 100,
+ rotate: 0,
+ },
+ title: {},
+ },
+ ],
+ valueAxes: [
+ {
+ id: 'ValueAxis-1',
+ name: 'LeftAxis-1',
+ type: 'value',
+ position: 'left',
+ show: true,
+ style: {},
+ scale: {
+ type: 'linear',
+ mode: 'normal',
+ },
+ labels: {
+ show: true,
+ rotate: 0,
+ filter: false,
+ truncate: 100,
+ },
+ title: {
+ text: 'Count',
+ },
+ },
+ ],
+ seriesParams: [
+ {
+ show: 'true',
+ type: 'histogram',
+ mode: 'stacked',
+ data: {
+ label: 'Count',
+ id: '1',
+ },
+ valueAxis: 'ValueAxis-1',
+ drawLinesBetweenPoints: true,
+ showCircles: true,
+ },
+ ],
+ addTooltip: true,
+ addLegend: true,
+ legendPosition: 'right',
+ times: [],
+ addTimeMarker: false,
+ radiusRatio: 51,
+ labels: {
+ show: false,
+ },
+ thresholdLine: {
+ show: false,
+ value: 10,
+ width: 1,
+ style: 'full',
+ color: '#E7664C',
+ },
+ },
+ uiState: {},
+ data: {
+ searchSource: {
+ query: {
+ language: 'kuery',
+ query: '',
+ },
+ filter: [],
+ index: indexPatternId,
+ },
+ references: [
+ {
+ name: 'kibanaSavedObjectMeta.searchSourceJSON.index',
+ type: 'index-pattern',
+ id: indexPatternId,
+ },
+ ],
+ aggs: [
+ {
+ id: '1',
+ enabled: true,
+ type: 'count',
+ params: {},
+ schema: 'metric',
+ },
+ {
+ id: '3',
+ enabled: true,
+ type: 'terms',
+ params: {
+ field: 'agent.name',
+ orderBy: '1',
+ order: 'desc',
+ size: 5,
+ otherBucket: false,
+ otherBucketLabel: 'Other',
+ missingBucket: false,
+ missingBucketLabel: 'Missing',
+ },
+ schema: 'group',
+ },
+ {
+ id: '2',
+ enabled: true,
+ type: 'terms',
+ params: {
+ field: 'rule.pci_dss',
+ orderBy: '1',
+ order: 'desc',
+ size: 5,
+ otherBucket: false,
+ otherBucketLabel: 'Other',
+ missingBucket: false,
+ missingBucketLabel: 'Missing',
+ customLabel: 'Requirements',
+ },
+ schema: 'segment',
+ },
+ ],
+ },
+ };
+};
+
+const getVisStateAgentTopRuleGroups = (indexPatternId: string) => {
+ return {
+ id: 'Wazuh-App-Agents-PCI-Groups',
+ title: 'Top 5 rule groups',
+ type: 'pie',
+ params: {
+ type: 'pie',
+ addTooltip: true,
+ addLegend: true,
+ legendPosition: 'right',
+ isDonut: true,
+ },
+ uiState: {},
+ data: {
+ searchSource: {
+ query: {
+ language: 'kuery',
+ query: '',
+ },
+ filter: [],
+ index: indexPatternId,
+ },
+ references: [
+ {
+ name: 'kibanaSavedObjectMeta.searchSourceJSON.index',
+ type: 'index-pattern',
+ id: indexPatternId,
+ },
+ ],
+ aggs: [
+ { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
+ {
+ id: '2',
+ enabled: true,
+ type: 'terms',
+ schema: 'segment',
+ params: {
+ field: 'rule.groups',
+ size: 5,
+ order: 'desc',
+ orderBy: '1',
+ },
+ },
+ ],
+ },
+ };
+};
+
+const getVisStateAgentTopRules = (indexPatternId: string) => {
+ return {
+ id: 'Wazuh-App-Agents-PCI-Rule',
+ title: 'Top 5 rules',
+ type: 'pie',
+ params: {
+ type: 'pie',
+ addTooltip: true,
+ addLegend: true,
+ legendPosition: 'right',
+ isDonut: true,
+ },
+ uiState: {},
+ data: {
+ searchSource: {
+ query: {
+ language: 'kuery',
+ query: '',
+ },
+ filter: [],
+ index: indexPatternId,
+ },
+ references: [
+ {
+ name: 'kibanaSavedObjectMeta.searchSourceJSON.index',
+ type: 'index-pattern',
+ id: indexPatternId,
+ },
+ ],
+ aggs: [
+ { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
+ {
+ id: '2',
+ enabled: true,
+ type: 'terms',
+ schema: 'segment',
+ params: {
+ field: 'rule.description',
+ size: 5,
+ order: 'desc',
+ orderBy: '1',
+ },
+ },
+ ],
+ },
+ };
+};
+
+const getVisStateAgentTopRequirements = (indexPatternId: string) => {
+ return {
+ id: 'Wazuh-App-Agents-PCI-Requirement',
+ title: 'Top 5 PCI DSS requirements',
+ type: 'pie',
+ params: {
+ type: 'pie',
+ addTooltip: true,
+ addLegend: true,
+ legendPosition: 'right',
+ isDonut: true,
+ },
+ uiState: {},
+ data: {
+ searchSource: {
+ query: {
+ language: 'kuery',
+ query: '',
+ },
+ filter: [],
+ index: indexPatternId,
+ },
+ references: [
+ {
+ name: 'kibanaSavedObjectMeta.searchSourceJSON.index',
+ type: 'index-pattern',
+ id: indexPatternId,
+ },
+ ],
+ aggs: [
+ { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
+ {
+ id: '2',
+ enabled: true,
+ type: 'terms',
+ schema: 'segment',
+ params: {
+ field: 'rule.pci_dss',
+ size: 5,
+ order: 'desc',
+ orderBy: '1',
+ },
+ },
+ ],
+ },
+ };
+};
+
+const getVisStateAgentTopRequirementsCount = (indexPatternId: string) => {
+ return {
+ id: 'Wazuh-App-Agents-PCI-Requirements',
+ title: 'PCI DSS requirements',
+ type: 'histogram',
+ params: {
+ type: 'histogram',
+ grid: { categoryLines: false, style: { color: '#eee' } },
+ categoryAxes: [
+ {
+ id: 'CategoryAxis-1',
+ type: 'category',
+ position: 'bottom',
+ show: true,
+ style: {},
+ scale: { type: 'linear' },
+ labels: { show: true, filter: true, truncate: 100, rotate: 0 },
+ title: {},
+ },
+ ],
+ valueAxes: [
+ {
+ id: 'ValueAxis-1',
+ name: 'LeftAxis-1',
+ type: 'value',
+ position: 'left',
+ show: true,
+ style: {},
+ scale: { type: 'linear', mode: 'normal' },
+ labels: { show: true, rotate: 0, filter: false, truncate: 100 },
+ title: { text: 'Count' },
+ },
+ ],
+ seriesParams: [
+ {
+ show: 'true',
+ type: 'histogram',
+ mode: 'stacked',
+ data: { label: 'Count', id: '1' },
+ valueAxis: 'ValueAxis-1',
+ drawLinesBetweenPoints: true,
+ showCircles: true,
+ },
+ ],
+ addTooltip: true,
+ addLegend: true,
+ legendPosition: 'right',
+ times: [],
+ addTimeMarker: false,
+ },
+ uiState: {},
+ data: {
+ searchSource: {
+ query: {
+ language: 'kuery',
+ query: '',
+ },
+ filter: [],
+ index: indexPatternId,
+ },
+ references: [
+ {
+ name: 'kibanaSavedObjectMeta.searchSourceJSON.index',
+ type: 'index-pattern',
+ id: indexPatternId,
+ },
+ ],
+ aggs: [
+ { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
+ {
+ id: '3',
+ enabled: true,
+ type: 'terms',
+ schema: 'group',
+ params: {
+ field: 'rule.pci_dss',
+ size: 5,
+ order: 'desc',
+ orderBy: '1',
+ customLabel: '',
+ },
+ },
+ {
+ id: '2',
+ enabled: true,
+ type: 'terms',
+ schema: 'segment',
+ params: {
+ field: 'rule.pci_dss',
+ size: 10,
+ order: 'desc',
+ orderBy: '1',
+ customLabel: 'PCI DSS Requirements',
+ },
+ },
+ ],
+ },
+ };
+};
+
+const getVisStateAgentRuleLevelDistribution = (indexPatternId: string) => {
+ return {
+ id: 'Wazuh-App-Agents-PCI-Rule-level-distribution',
+ title: 'Rule level distribution',
+ type: 'pie',
+ params: {
+ type: 'pie',
+ addTooltip: true,
+ addLegend: false,
+ legendPosition: 'right',
+ isDonut: true,
+ labels: { show: true, values: true, last_level: true, truncate: 100 },
+ },
+ uiState: { vis: { legendOpen: false } },
+ data: {
+ searchSource: {
+ query: {
+ language: 'kuery',
+ query: '',
+ },
+ filter: [],
+ index: indexPatternId,
+ },
+ references: [
+ {
+ name: 'kibanaSavedObjectMeta.searchSourceJSON.index',
+ type: 'index-pattern',
+ id: indexPatternId,
+ },
+ ],
+ aggs: [
+ { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
+ {
+ id: '2',
+ enabled: true,
+ type: 'terms',
+ schema: 'segment',
+ params: {
+ field: 'rule.level',
+ size: 15,
+ order: 'desc',
+ orderBy: '1',
+ otherBucket: false,
+ otherBucketLabel: 'Other',
+ missingBucket: false,
+ missingBucketLabel: 'Missing',
+ },
+ },
+ ],
+ },
+ };
+};
+
+export const getDashboardPanels = (
+ indexPatternId: string,
+ isPinnedAgent: boolean,
+): {
+ [panelId: string]: DashboardPanelState<
+ EmbeddableInput & { [k: string]: unknown }
+ >;
+} => {
+ const overviewDashboard = {
+ g1: {
+ gridData: {
+ w: 24,
+ h: 14,
+ x: 0,
+ y: 0,
+ i: 'g1',
+ },
+ type: 'visualization',
+ explicitInput: {
+ id: 'g1',
+ savedVis: getVisStateTopRequirements(indexPatternId),
+ },
+ },
+ g2: {
+ gridData: {
+ w: 24,
+ h: 14,
+ x: 24,
+ y: 0,
+ i: 'g2',
+ },
+ type: 'visualization',
+ explicitInput: {
+ id: 'g2',
+ savedVis: getVisStateTopAgentsByCount(indexPatternId),
+ },
+ },
+ g3: {
+ gridData: {
+ w: 48,
+ h: 11,
+ x: 0,
+ y: 14,
+ i: 'g3',
+ },
+ type: 'visualization',
+ explicitInput: {
+ id: 'g3',
+ savedVis: getVisStateRequirementsOverTime(indexPatternId),
+ },
+ },
+ g4: {
+ gridData: {
+ w: 48,
+ h: 19,
+ x: 0,
+ y: 25,
+ i: 'g4',
+ },
+ type: 'visualization',
+ explicitInput: {
+ id: 'g4',
+ savedVis: getVisStateRequirementsHeatmap(indexPatternId),
+ },
+ },
+ g5: {
+ gridData: {
+ w: 48,
+ h: 9,
+ x: 0,
+ y: 43,
+ i: 'g5',
+ },
+ type: 'visualization',
+ explicitInput: {
+ id: 'g5',
+ savedVis: getVisStateRequirementsByAgent(indexPatternId),
+ },
+ },
+ };
+
+ const agentDashboard = {
+ a1: {
+ gridData: {
+ w: 16,
+ h: 11,
+ x: 0,
+ y: 0,
+ i: 'a1',
+ },
+ type: 'visualization',
+ explicitInput: {
+ id: 'a1',
+ savedVis: getVisStateAgentTopRuleGroups(indexPatternId),
+ },
+ },
+ a2: {
+ gridData: {
+ w: 16,
+ h: 11,
+ x: 16,
+ y: 0,
+ i: 'a2',
+ },
+ type: 'visualization',
+ explicitInput: {
+ id: 'a2',
+ savedVis: getVisStateAgentTopRules(indexPatternId),
+ },
+ },
+ a3: {
+ gridData: {
+ w: 16,
+ h: 11,
+ x: 32,
+ y: 0,
+ i: 'a3',
+ },
+ type: 'visualization',
+ explicitInput: {
+ id: 'a3',
+ savedVis: getVisStateAgentTopRequirements(indexPatternId),
+ },
+ },
+ a4: {
+ gridData: {
+ w: 35,
+ h: 11,
+ x: 0,
+ y: 11,
+ i: 'a4',
+ },
+ type: 'visualization',
+ explicitInput: {
+ id: 'a4',
+ savedVis: getVisStateAgentTopRequirementsCount(indexPatternId),
+ },
+ },
+ a5: {
+ gridData: {
+ w: 13,
+ h: 11,
+ x: 35,
+ y: 11,
+ i: 'a5',
+ },
+ type: 'visualization',
+ explicitInput: {
+ id: 'a5',
+ savedVis: getVisStateAgentRuleLevelDistribution(indexPatternId),
+ },
+ },
+ };
+
+ return isPinnedAgent ? agentDashboard : overviewDashboard;
+};
diff --git a/plugins/main/public/components/overview/pci/dashboards/dashboard.tsx b/plugins/main/public/components/overview/pci/dashboards/dashboard.tsx
new file mode 100644
index 0000000000..f847211351
--- /dev/null
+++ b/plugins/main/public/components/overview/pci/dashboards/dashboard.tsx
@@ -0,0 +1,145 @@
+import React, { useState, useEffect } from 'react';
+import { SearchResponse } from '../../../../../../../src/core/server';
+import { getPlugins } from '../../../../kibana-services';
+import { ViewMode } from '../../../../../../../src/plugins/embeddable/public';
+import { getDashboardPanels } from './dashboard-panels';
+import { I18nProvider } from '@osd/i18n/react';
+import useSearchBar from '../../../common/search-bar/use-search-bar';
+import './styles.scss';
+import { withErrorBoundary } from '../../../common/hocs';
+import { IndexPattern } from '../../../../../../../src/plugins/data/common';
+import {
+ ErrorFactory,
+ ErrorHandler,
+ HttpError,
+} from '../../../../react-services/error-management';
+import { compose } from 'redux';
+import { SampleDataWarning } from '../../../visualize/components';
+import {
+ AlertsDataSourceRepository,
+ PatternDataSource,
+ tParsedIndexPattern,
+ useDataSource,
+} from '../../../common/data-source';
+import { AlertsPCIDSSDataSource } from '../../../common/data-source/pattern/alerts/pci-dss/alerts-pci-dss-data-source';
+import { DiscoverNoResults } from '../../../common/no-results/no-results';
+import { LoadingSpinner } from '../../../common/loading-spinner/loading-spinner';
+
+const plugins = getPlugins();
+
+const SearchBar = getPlugins().data.ui.SearchBar;
+
+const DashboardByRenderer = plugins.dashboard.DashboardContainerByValueRenderer;
+
+const DashboardPCIDSSComponent: React.FC = () => {
+ const {
+ filters,
+ dataSource,
+ fetchFilters,
+ isLoading: isDataSourceLoading,
+ fetchData,
+ setFilters,
+ } = useDataSource({
+ DataSource: AlertsPCIDSSDataSource,
+ repository: new AlertsDataSourceRepository(),
+ });
+
+ const [results, setResults] = useState({} as SearchResponse);
+
+ const { searchBarProps } = useSearchBar({
+ indexPattern: dataSource?.indexPattern as IndexPattern,
+ filters,
+ setFilters,
+ });
+
+ const { query, dateRangeFrom, dateRangeTo } = searchBarProps;
+
+ useEffect(() => {
+ if (isDataSourceLoading) {
+ return;
+ }
+ fetchData({
+ query,
+ dateRange: {
+ from: dateRangeFrom,
+ to: dateRangeTo,
+ },
+ })
+ .then(results => {
+ setResults(results);
+ })
+ .catch(error => {
+ const searchError = ErrorFactory.create(HttpError, {
+ error,
+ message: 'Error fetching alerts',
+ });
+ ErrorHandler.handleError(searchError);
+ });
+ }, [
+ JSON.stringify(fetchFilters),
+ JSON.stringify(query),
+ JSON.stringify(dateRangeFrom),
+ JSON.stringify(dateRangeTo),
+ ]);
+
+ return (
+ <>
+
+ <>
+ {isDataSourceLoading && !dataSource ? (
+
+ ) : (
+
+
+
+ )}
+ {dataSource && results?.hits?.total === 0 ? (
+
+ ) : null}
+ {dataSource && results?.hits?.total > 0 ? (
+ <>
+
+
+
+
+ >
+ ) : null}
+ >
+
+ >
+ );
+};
+
+export const DashboardPCIDSS = compose(withErrorBoundary)(
+ DashboardPCIDSSComponent,
+);
diff --git a/plugins/main/public/components/overview/pci/dashboards/index.tsx b/plugins/main/public/components/overview/pci/dashboards/index.tsx
new file mode 100644
index 0000000000..b691822976
--- /dev/null
+++ b/plugins/main/public/components/overview/pci/dashboards/index.tsx
@@ -0,0 +1 @@
+export * from './dashboard';
\ No newline at end of file
diff --git a/plugins/main/public/components/overview/pci/dashboards/styles.scss b/plugins/main/public/components/overview/pci/dashboards/styles.scss
new file mode 100644
index 0000000000..a3b1005567
--- /dev/null
+++ b/plugins/main/public/components/overview/pci/dashboards/styles.scss
@@ -0,0 +1,10 @@
+.pci-dss-dashboard-responsive {
+ @media (max-width: 767px) {
+ .react-grid-layout {
+ height: auto !important;
+ }
+ .dshLayout-isMaximizedPanel {
+ height: 100% !important;
+ }
+ }
+}
diff --git a/plugins/main/public/components/visualize/components/sample-data-warning.js b/plugins/main/public/components/visualize/components/sample-data-warning.js
index 7b5b115cbb..28e939b1fe 100644
--- a/plugins/main/public/components/visualize/components/sample-data-warning.js
+++ b/plugins/main/public/components/visualize/components/sample-data-warning.js
@@ -22,35 +22,31 @@ import { RedirectAppLinks } from '../../../../../../src/plugins/opensearch_dashb
export const SampleDataWarning = ({ ...props }) => {
const [isSampleData, setIsSampleData] = useState(false);
+ const request = async () => {
+ try {
+ const result = (
+ await WzRequest.genericReq('GET', '/elastic/samplealerts')
+ ).data.sampleAlertsInstalled;
+ setIsSampleData(result);
+ } catch (error) {
+ const options = {
+ context: `${SampleDataWarning.name}.usesSampleData`,
+ level: UI_LOGGER_LEVELS.ERROR,
+ severity: UI_ERROR_SEVERITIES.UI,
+ error: {
+ error: error,
+ message: error.message || error,
+ title: error.name || error,
+ },
+ };
+ getErrorOrchestrator().handleError(options);
+ }
+ };
+
useEffect(() => {
- (async () => {
- try {
- const result = (
- await WzRequest.genericReq('GET', '/elastic/samplealerts')
- ).data.sampleAlertsInstalled;
- setIsSampleData(result);
- } catch (error) {
- const options = {
- context: `${SampleDataWarning.name}.usesSampleData`,
- level: UI_LOGGER_LEVELS.ERROR,
- severity: UI_ERROR_SEVERITIES.UI,
- error: {
- error: error,
- message: error.message || error,
- title: error.name || error,
- },
- };
- getErrorOrchestrator().handleError(options);
- }
- })();
- }, [
- SampleDataWarning,
- setIsSampleData,
- UI_ERROR_SEVERITIES,
- UI_LOGGER_LEVELS,
- getErrorOrchestrator,
- WzRequest,
- ]);
+ request();
+ }, []);
+
if (isSampleData) {
return (
{
href={getCore().application.getUrlForApp(sampleData.id)}
aria-label='go to configure sample data'
>
- {'here '}
+ {'here'}
- {'to configure the sample data.'}
+ {' to configure the sample data.'}
diff --git a/plugins/main/server/integration-files/visualizations/agents/agents-pci.ts b/plugins/main/server/integration-files/visualizations/agents/agents-pci.ts
deleted file mode 100644
index e4be9be4fc..0000000000
--- a/plugins/main/server/integration-files/visualizations/agents/agents-pci.ts
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
- * Wazuh app - Module for Agents/PCI visualizations
- * Copyright (C) 2015-2022 Wazuh, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Find more information about this on the LICENSE file.
- */
-export default [
- {
- _id: 'Wazuh-App-Agents-PCI-Groups',
- _source: {
- title: 'Top 5 rule groups',
- visState: JSON.stringify({
- title: 'Top 5 rule groups',
- type: 'pie',
- params: {
- type: 'pie',
- addTooltip: true,
- addLegend: true,
- legendPosition: 'right',
- isDonut: true,
- },
- aggs: [
- { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
- {
- id: '2',
- enabled: true,
- type: 'terms',
- schema: 'segment',
- params: { field: 'rule.groups', size: 5, order: 'desc', orderBy: '1' },
- },
- ],
- }),
- uiStateJSON: '{}',
- description: '',
- version: 1,
- kibanaSavedObjectMeta: {
- searchSourceJSON: JSON.stringify({
- index: 'wazuh-alerts',
- filter: [],
- query: { query: '', language: 'lucene' },
- }),
- },
- },
- _type: 'visualization',
- },
- {
- _id: 'Wazuh-App-Agents-PCI-Rule',
- _source: {
- title: 'Top 5 rules',
- visState: JSON.stringify({
- title: 'Top 5 rules',
- type: 'pie',
- params: {
- type: 'pie',
- addTooltip: true,
- addLegend: true,
- legendPosition: 'right',
- isDonut: true,
- },
- aggs: [
- { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
- {
- id: '2',
- enabled: true,
- type: 'terms',
- schema: 'segment',
- params: { field: 'rule.description', size: 5, order: 'desc', orderBy: '1' },
- },
- ],
- }),
- uiStateJSON: '{}',
- description: '',
- version: 1,
- kibanaSavedObjectMeta: {
- searchSourceJSON: JSON.stringify({
- index: 'wazuh-alerts',
- filter: [],
- query: { query: '', language: 'lucene' },
- }),
- },
- },
- _type: 'visualization',
- },
- {
- _id: 'Wazuh-App-Agents-PCI-Requirement',
- _source: {
- title: 'Top 5 requirements',
- visState: JSON.stringify({
- title: 'Top 5 requirements',
- type: 'pie',
- params: {
- type: 'pie',
- addTooltip: true,
- addLegend: true,
- legendPosition: 'right',
- isDonut: true,
- },
- aggs: [
- { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
- {
- id: '2',
- enabled: true,
- type: 'terms',
- schema: 'segment',
- params: { field: 'rule.pci_dss', size: 5, order: 'desc', orderBy: '1' },
- },
- ],
- }),
- uiStateJSON: '{}',
- description: '',
- version: 1,
- kibanaSavedObjectMeta: {
- searchSourceJSON: JSON.stringify({
- index: 'wazuh-alerts',
- filter: [],
- query: { query: '', language: 'lucene' },
- }),
- },
- },
- _type: 'visualization',
- },
- {
- _id: 'Wazuh-App-Agents-PCI-Rule-level-distribution',
- _source: {
- title: 'Rule level distribution',
- visState: JSON.stringify({
- title: 'Rule level distribution',
- type: 'pie',
- params: {
- type: 'pie',
- addTooltip: true,
- addLegend: false,
- legendPosition: 'right',
- isDonut: true,
- labels: { show: true, values: true, last_level: true, truncate: 100 },
- },
- aggs: [
- { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
- {
- id: '2',
- enabled: true,
- type: 'terms',
- schema: 'segment',
- params: {
- field: 'rule.level',
- size: 15,
- order: 'desc',
- orderBy: '1',
- otherBucket: false,
- otherBucketLabel: 'Other',
- missingBucket: false,
- missingBucketLabel: 'Missing',
- },
- },
- ],
- }),
- uiStateJSON: JSON.stringify({ vis: { legendOpen: false } }),
- description: '',
- version: 1,
- kibanaSavedObjectMeta: {
- searchSourceJSON: JSON.stringify({
- index: 'wazuh-alerts',
- filter: [],
- query: { query: '', language: 'lucene' },
- }),
- },
- },
- _type: 'visualization',
- },
- {
- _id: 'Wazuh-App-Agents-PCI-Requirements',
- _source: {
- title: 'Requirements',
- visState: JSON.stringify({
- title: 'Requirements',
- type: 'histogram',
- params: {
- type: 'histogram',
- grid: { categoryLines: false, style: { color: '#eee' } },
- categoryAxes: [
- {
- id: 'CategoryAxis-1',
- type: 'category',
- position: 'bottom',
- show: true,
- style: {},
- scale: { type: 'linear' },
- labels: { show: true, filter: true, truncate: 100, rotate: 0 },
- title: {},
- },
- ],
- valueAxes: [
- {
- id: 'ValueAxis-1',
- name: 'LeftAxis-1',
- type: 'value',
- position: 'left',
- show: true,
- style: {},
- scale: { type: 'linear', mode: 'normal' },
- labels: { show: true, rotate: 0, filter: false, truncate: 100 },
- title: { text: 'Count' },
- },
- ],
- seriesParams: [
- {
- show: 'true',
- type: 'histogram',
- mode: 'stacked',
- data: { label: 'Count', id: '1' },
- valueAxis: 'ValueAxis-1',
- drawLinesBetweenPoints: true,
- showCircles: true,
- },
- ],
- addTooltip: true,
- addLegend: true,
- legendPosition: 'right',
- times: [],
- addTimeMarker: false,
- },
- aggs: [
- { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
- {
- id: '3',
- enabled: true,
- type: 'terms',
- schema: 'group',
- params: {
- field: 'rule.pci_dss',
- size: 5,
- order: 'desc',
- orderBy: '1',
- customLabel: '',
- },
- },
- {
- id: '2',
- enabled: true,
- type: 'terms',
- schema: 'segment',
- params: {
- field: 'rule.pci_dss',
- size: 10,
- order: 'desc',
- orderBy: '1',
- customLabel: 'PCI DSS Requirements',
- },
- },
- ],
- }),
- uiStateJSON: '{}',
- description: '',
- version: 1,
- kibanaSavedObjectMeta: {
- searchSourceJSON: JSON.stringify({
- index: 'wazuh-alerts',
- filter: [],
- query: { query: '', language: 'lucene' },
- }),
- },
- },
- _type: 'visualization',
- },
- {
- _id: 'Wazuh-App-Agents-PCI-Last-alerts',
- _type: 'visualization',
- _source: {
- title: 'Last alerts',
- visState: JSON.stringify({
- title: 'Last alerts',
- type: 'table',
- params: {
- perPage: 10,
- showPartialRows: false,
- showMeticsAtAllLevels: false,
- sort: { columnIndex: 2, direction: 'desc' },
- showTotal: false,
- showToolbar: true,
- totalFunc: 'sum',
- },
- aggs: [
- { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
- {
- id: '3',
- enabled: true,
- type: 'terms',
- schema: 'bucket',
- params: {
- field: 'rule.pci_dss',
- otherBucket: false,
- otherBucketLabel: 'Other',
- missingBucket: false,
- missingBucketLabel: 'Missing',
- size: 50,
- order: 'desc',
- orderBy: '1',
- customLabel: 'Requirement',
- },
- },
- {
- id: '4',
- enabled: true,
- type: 'terms',
- schema: 'bucket',
- params: {
- field: 'rule.description',
- otherBucket: false,
- otherBucketLabel: 'Other',
- missingBucket: false,
- missingBucketLabel: 'Missing',
- size: 10,
- order: 'desc',
- orderBy: '1',
- customLabel: 'Rule description',
- },
- },
- ],
- }),
- uiStateJSON: JSON.stringify({
- vis: { params: { sort: { columnIndex: 2, direction: 'desc' } } },
- }),
- description: '',
- version: 1,
- kibanaSavedObjectMeta: {
- searchSourceJSON: JSON.stringify({
- index: 'wazuh-alerts',
- filter: [],
- query: { query: '', language: 'lucene' },
- }),
- },
- },
- },
-];
diff --git a/plugins/main/server/integration-files/visualizations/agents/index.ts b/plugins/main/server/integration-files/visualizations/agents/index.ts
index a61f4da239..3325360a69 100644
--- a/plugins/main/server/integration-files/visualizations/agents/index.ts
+++ b/plugins/main/server/integration-files/visualizations/agents/index.ts
@@ -15,7 +15,6 @@ import general from './agents-general';
import gcp from './agents-gcp';
import oscap from './agents-oscap';
import ciscat from './agents-ciscat';
-import pci from './agents-pci';
import gdpr from './agents-gdpr';
import hipaa from './agents-hipaa';
import mitre from './agents-mitre';
@@ -36,7 +35,6 @@ export {
gcp,
oscap,
ciscat,
- pci,
gdpr,
hipaa,
nist,
diff --git a/plugins/main/server/integration-files/visualizations/overview/index.ts b/plugins/main/server/integration-files/visualizations/overview/index.ts
index 8f8711b75f..078f03e29f 100644
--- a/plugins/main/server/integration-files/visualizations/overview/index.ts
+++ b/plugins/main/server/integration-files/visualizations/overview/index.ts
@@ -16,7 +16,6 @@ import fim from './overview-fim';
import general from './overview-general';
import oscap from './overview-oscap';
import ciscat from './overview-ciscat';
-import pci from './overview-pci';
import gdpr from './overview-gdpr';
import hipaa from './overview-hipaa';
import nist from './overview-nist';
@@ -37,7 +36,6 @@ export {
general,
oscap,
ciscat,
- pci,
gdpr,
hipaa,
nist,
@@ -48,5 +46,5 @@ export {
office,
osquery,
docker,
- github
+ github,
};
diff --git a/plugins/main/server/integration-files/visualizations/overview/overview-pci.ts b/plugins/main/server/integration-files/visualizations/overview/overview-pci.ts
deleted file mode 100644
index 620d2c81bf..0000000000
--- a/plugins/main/server/integration-files/visualizations/overview/overview-pci.ts
+++ /dev/null
@@ -1,761 +0,0 @@
-/*
- * Wazuh app - Module for Overview/PCI visualizations
- * Copyright (C) 2015-2022 Wazuh, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Find more information about this on the LICENSE file.
- */
-export default [
- {
- _id: 'Wazuh-App-Overview-PCI-DSS-Requirements-over-time',
- _source: {
- title: 'Requirements over time',
- visState: JSON.stringify({
- title: 'Alerts by action over time',
- type: 'area',
- params: {
- type: 'area',
- grid: {
- categoryLines: true,
- style: { color: '#eee' },
- valueAxis: 'ValueAxis-1',
- },
- categoryAxes: [
- {
- id: 'CategoryAxis-1',
- type: 'category',
- position: 'bottom',
- show: true,
- style: {},
- scale: { type: 'linear' },
- labels: { show: true, filter: true, truncate: 100 },
- title: {},
- },
- ],
- valueAxes: [
- {
- id: 'ValueAxis-1',
- name: 'LeftAxis-1',
- type: 'value',
- position: 'left',
- show: true,
- style: {},
- scale: { type: 'linear', mode: 'normal' },
- labels: { show: true, rotate: 0, filter: false, truncate: 100 },
- title: { text: 'Count' },
- },
- ],
- seriesParams: [
- {
- show: 'true',
- type: 'area',
- mode: 'stacked',
- data: { label: 'Count', id: '1' },
- drawLinesBetweenPoints: true,
- showCircles: true,
- interpolate: 'cardinal',
- valueAxis: 'ValueAxis-1',
- },
- ],
- addTooltip: true,
- addLegend: true,
- legendPosition: 'right',
- times: [],
- addTimeMarker: false,
- },
- aggs: [
- {
- id: '1',
- enabled: true,
- type: 'count',
- schema: 'metric',
- params: {},
- },
- {
- id: '1',
- enabled: true,
- type: 'count',
- schema: 'metric',
- params: {},
- },
- {
- id: '3',
- enabled: true,
- type: 'terms',
- schema: 'group',
- params: {
- field: 'rule.pci_dss',
- size: '5',
- order: 'desc',
- orderBy: '1',
- otherBucket: false,
- otherBucketLabel: 'Other',
- missingBucket: false,
- missingBucketLabel: 'Missing',
- },
- },
- {
- id: '2',
- enabled: true,
- type: 'date_histogram',
- schema: 'segment',
- params: {
- field: 'timestamp',
- timeRange: { from: 'now-24h', to: 'now', mode: 'quick' },
- useNormalizedEsInterval: true,
- interval: 'auto',
- time_zone: 'Europe/Berlin',
- drop_partials: false,
- customInterval: '2h',
- min_doc_count: 1,
- extended_bounds: {},
- },
- },
- ],
- }),
- uiStateJSON: '{}',
- description: '',
- version: 1,
- kibanaSavedObjectMeta: {
- searchSourceJSON: JSON.stringify({
- index: 'wazuh-alerts',
- filter: [],
- query: { language: 'lucene', query: '' },
- }),
- },
- },
- _type: 'visualization',
- },
- {
- _id: 'Wazuh-App-Overview-PCI-DSS-Requirements-Agents-heatmap',
- _type: 'visualization',
- _source: {
- title: 'PCI requirements heatmap',
- visState: JSON.stringify({
- title: 'PCI requirements heatmap',
- type: 'heatmap',
- params: {
- type: 'heatmap',
- addTooltip: true,
- addLegend: true,
- enableHover: false,
- legendPosition: 'right',
- times: [],
- colorsNumber: 10,
- colorSchema: 'Greens',
- setColorRange: false,
- colorsRange: [],
- invertColors: false,
- percentageMode: false,
- valueAxes: [
- {
- show: false,
- id: 'ValueAxis-1',
- type: 'value',
- scale: { type: 'linear', defaultYExtents: false },
- labels: {
- show: false,
- rotate: 0,
- overwriteColor: false,
- color: '#555',
- },
- },
- ],
- },
- aggs: [
- {
- id: '1',
- enabled: true,
- type: 'count',
- schema: 'metric',
- params: {},
- },
- {
- id: '2',
- enabled: true,
- type: 'terms',
- schema: 'segment',
- params: {
- field: 'rule.pci_dss',
- size: 5,
- order: 'desc',
- orderBy: '1',
- otherBucket: false,
- otherBucketLabel: 'Other',
- missingBucket: false,
- missingBucketLabel: 'Missing',
- customLabel: 'Requirements',
- },
- },
- {
- id: '3',
- enabled: true,
- type: 'terms',
- schema: 'group',
- params: {
- field: 'agent.name',
- size: 5,
- order: 'desc',
- orderBy: '1',
- otherBucket: false,
- otherBucketLabel: 'Other',
- missingBucket: false,
- missingBucketLabel: 'Missing',
- customLabel: 'Agents',
- },
- },
- ],
- }),
- uiStateJSON: JSON.stringify({
- vis: {
- defaultColors: {
- '0 - 13': 'rgb(247,252,245)',
- '13 - 26': 'rgb(233,247,228)',
- '26 - 39': 'rgb(211,238,205)',
- '39 - 52': 'rgb(184,227,177)',
- '52 - 65': 'rgb(152,213,148)',
- '65 - 78': 'rgb(116,196,118)',
- '78 - 91': 'rgb(75,176,98)',
- '91 - 104': 'rgb(47,152,79)',
- '104 - 117': 'rgb(21,127,59)',
- '117 - 130': 'rgb(0,100,40)',
- },
- },
- }),
- description: '',
- version: 1,
- kibanaSavedObjectMeta: {
- searchSourceJSON: JSON.stringify({
- index: 'wazuh-alerts',
- query: { query: '', language: 'lucene' },
- filter: [],
- }),
- },
- },
- },
- {
- _id: 'Wazuh-App-Overview-PCI-DSS-requirements',
- _source: {
- title: 'PCI DSS requirements',
- visState: JSON.stringify({
- title: 'PCI DSS requirements',
- type: 'line',
- params: {
- type: 'line',
- grid: { categoryLines: true, valueAxis: 'ValueAxis-1' },
- categoryAxes: [
- {
- id: 'CategoryAxis-1',
- type: 'category',
- position: 'bottom',
- show: true,
- style: {},
- scale: { type: 'linear' },
- labels: { show: true, filter: true, truncate: 100 },
- title: {},
- },
- ],
- valueAxes: [
- {
- id: 'ValueAxis-1',
- name: 'LeftAxis-1',
- type: 'value',
- position: 'left',
- show: true,
- style: {},
- scale: { type: 'linear', mode: 'normal' },
- labels: { show: true, rotate: 0, filter: false, truncate: 100 },
- title: { text: 'Count' },
- },
- ],
- seriesParams: [
- {
- show: 'true',
- type: 'line',
- mode: 'normal',
- data: { label: 'Count', id: '1' },
- valueAxis: 'ValueAxis-1',
- drawLinesBetweenPoints: false,
- showCircles: true,
- },
- ],
- addTooltip: true,
- addLegend: true,
- legendPosition: 'right',
- times: [],
- addTimeMarker: false,
- dimensions: {
- x: {
- accessor: 0,
- format: { id: 'date', params: { pattern: 'YYYY-MM-DD' } },
- params: { date: true, interval: 'P1D', format: 'YYYY-MM-DD' },
- aggType: 'date_histogram',
- },
- y: [
- {
- accessor: 2,
- format: { id: 'number' },
- params: {},
- aggType: 'count',
- },
- ],
- z: [
- {
- accessor: 3,
- format: { id: 'number' },
- params: {},
- aggType: 'count',
- },
- ],
- series: [
- {
- accessor: 1,
- format: {
- id: 'terms',
- params: {
- id: 'string',
- otherBucketLabel: 'Other',
- missingBucketLabel: 'Missing',
- },
- },
- params: {},
- aggType: 'terms',
- },
- ],
- },
- radiusRatio: 50,
- },
- aggs: [
- {
- id: '1',
- enabled: true,
- type: 'count',
- schema: 'metric',
- params: {},
- },
- {
- id: '2',
- enabled: true,
- type: 'date_histogram',
- schema: 'segment',
- params: {
- field: 'timestamp',
- timeRange: { from: 'now-1h', to: 'now' },
- useNormalizedEsInterval: true,
- interval: 'auto',
- drop_partials: false,
- min_doc_count: 1,
- extended_bounds: {},
- },
- },
- {
- id: '4',
- enabled: true,
- type: 'count',
- schema: 'radius',
- params: {},
- },
- {
- id: '4',
- enabled: true,
- type: 'count',
- schema: 'radius',
- params: {},
- },
- ],
- }),
- uiStateJSON: '{}',
- description: '',
- version: 1,
- kibanaSavedObjectMeta: {
- searchSourceJSON: JSON.stringify({
- index: 'wazuh-alerts',
- filter: [],
- query: { query: '', language: 'lucene' },
- }),
- },
- },
- _type: 'visualization',
- },
- {
- _id: 'Wazuh-App-Overview-PCI-DSS-Agents',
- _source: {
- title: 'Agents',
- visState: JSON.stringify({
- title: 'Agents',
- type: 'pie',
- params: {
- type: 'pie',
- addTooltip: true,
- addLegend: true,
- legendPosition: 'right',
- isDonut: false,
- },
- aggs: [
- {
- id: '1',
- enabled: true,
- type: 'count',
- schema: 'metric',
- params: {},
- },
- {
- id: '2',
- enabled: true,
- type: 'terms',
- schema: 'segment',
- params: {
- field: 'agent.name',
- size: 10,
- order: 'desc',
- orderBy: '1',
- },
- },
- ],
- }),
- uiStateJSON: '{}',
- description: '',
- version: 1,
- kibanaSavedObjectMeta: {
- searchSourceJSON: JSON.stringify({
- index: 'wazuh-alerts',
- filter: [],
- query: { query: '', language: 'lucene' },
- }),
- },
- },
- _type: 'visualization',
- },
- {
- _id: 'Wazuh-App-Overview-PCI-DSS-Requirements-by-agent',
- _source: {
- title: 'Requirements by agent',
- visState: JSON.stringify({
- title: 'Requirements by agent',
- type: 'histogram',
- aggs: [
- {
- id: '1',
- enabled: true,
- type: 'count',
- params: {},
- schema: 'metric',
- },
- {
- id: '3',
- enabled: true,
- type: 'terms',
- params: {
- field: 'agent.name',
- orderBy: '1',
- order: 'desc',
- size: 5,
- otherBucket: false,
- otherBucketLabel: 'Other',
- missingBucket: false,
- missingBucketLabel: 'Missing',
- },
- schema: 'group',
- },
- {
- id: '2',
- enabled: true,
- type: 'terms',
- params: {
- field: 'rule.pci_dss',
- orderBy: '1',
- order: 'desc',
- size: 5,
- otherBucket: false,
- otherBucketLabel: 'Other',
- missingBucket: false,
- missingBucketLabel: 'Missing',
- customLabel: 'Requirements',
- },
- schema: 'segment',
- },
- ],
- params: {
- type: 'histogram',
- grid: {
- categoryLines: false,
- style: {
- color: '#eee',
- },
- },
- categoryAxes: [
- {
- id: 'CategoryAxis-1',
- type: 'category',
- position: 'bottom',
- show: true,
- style: {},
- scale: {
- type: 'linear',
- },
- labels: {
- show: true,
- filter: true,
- truncate: 100,
- rotate: 0,
- },
- title: {},
- },
- ],
- valueAxes: [
- {
- id: 'ValueAxis-1',
- name: 'LeftAxis-1',
- type: 'value',
- position: 'left',
- show: true,
- style: {},
- scale: {
- type: 'linear',
- mode: 'normal',
- },
- labels: {
- show: true,
- rotate: 0,
- filter: false,
- truncate: 100,
- },
- title: {
- text: 'Count',
- },
- },
- ],
- seriesParams: [
- {
- show: 'true',
- type: 'histogram',
- mode: 'stacked',
- data: {
- label: 'Count',
- id: '1',
- },
- valueAxis: 'ValueAxis-1',
- drawLinesBetweenPoints: true,
- showCircles: true,
- },
- ],
- addTooltip: true,
- addLegend: true,
- legendPosition: 'right',
- times: [],
- addTimeMarker: false,
- radiusRatio: 51,
- labels: {
- show: false,
- },
- thresholdLine: {
- show: false,
- value: 10,
- width: 1,
- style: 'full',
- color: '#E7664C',
- },
- },
- }),
- uiStateJSON: '{}',
- description: '',
- version: 1,
- kibanaSavedObjectMeta: {
- searchSourceJSON: JSON.stringify({
- index: 'wazuh-alerts',
- filter: [],
- query: { query: '', language: 'lucene' },
- }),
- },
- },
- _type: 'visualization',
- },
- {
- _id: 'Wazuh-App-Overview-PCI-DSS-Last-alerts',
- _type: 'visualization',
- _source: {
- title: 'Last alerts',
- visState: JSON.stringify({
- title: 'Last alerts',
- type: 'table',
- params: {
- perPage: 10,
- showPartialRows: false,
- showMeticsAtAllLevels: false,
- sort: { columnIndex: null, direction: null },
- showTotal: false,
- showToolbar: true,
- totalFunc: 'sum',
- },
- aggs: [
- {
- id: '1',
- enabled: true,
- type: 'count',
- schema: 'metric',
- params: {},
- },
- {
- id: '2',
- enabled: true,
- type: 'terms',
- schema: 'bucket',
- params: {
- field: 'agent.name',
- otherBucket: false,
- otherBucketLabel: 'Other',
- missingBucket: false,
- missingBucketLabel: 'Missing',
- size: 50,
- order: 'desc',
- orderBy: '1',
- customLabel: 'Agent name',
- },
- },
- {
- id: '3',
- enabled: true,
- type: 'terms',
- schema: 'bucket',
- params: {
- field: 'rule.pci_dss',
- otherBucket: false,
- otherBucketLabel: 'Other',
- missingBucket: false,
- missingBucketLabel: 'Missing',
- size: 10,
- order: 'desc',
- orderBy: '1',
- customLabel: 'Requirement',
- },
- },
- {
- id: '4',
- enabled: true,
- type: 'terms',
- schema: 'bucket',
- params: {
- field: 'rule.description',
- otherBucket: false,
- otherBucketLabel: 'Other',
- missingBucket: false,
- missingBucketLabel: 'Missing',
- size: 10,
- order: 'desc',
- orderBy: '1',
- customLabel: 'Rule description',
- },
- },
- ],
- }),
- uiStateJSON: JSON.stringify({
- vis: { params: { sort: { columnIndex: 3, direction: 'desc' } } },
- }),
- description: '',
- version: 1,
- kibanaSavedObjectMeta: {
- searchSourceJSON: JSON.stringify({
- index: 'wazuh-alerts',
- filter: [],
- query: { query: '', language: 'lucene' },
- }),
- },
- },
- },
- {
- _id: 'Wazuh-App-Overview-PCI-DSS-Alerts-summary',
- _type: 'visualization',
- _source: {
- title: 'Alerts summary',
- visState: JSON.stringify({
- title: 'Alerts summary',
- type: 'table',
- params: {
- perPage: 10,
- showPartialRows: false,
- showMeticsAtAllLevels: false,
- sort: { columnIndex: 3, direction: 'desc' },
- showTotal: false,
- showToolbar: true,
- totalFunc: 'sum',
- },
- aggs: [
- {
- id: '1',
- enabled: true,
- type: 'count',
- schema: 'metric',
- params: {},
- },
- {
- id: '2',
- enabled: true,
- type: 'terms',
- schema: 'bucket',
- params: {
- field: 'agent.name',
- otherBucket: false,
- otherBucketLabel: 'Other',
- missingBucket: false,
- missingBucketLabel: 'Missing',
- size: 50,
- order: 'desc',
- orderBy: '1',
- customLabel: 'Agent name',
- },
- },
- {
- id: '3',
- enabled: true,
- type: 'terms',
- schema: 'bucket',
- params: {
- field: 'rule.pci_dss',
- otherBucket: false,
- otherBucketLabel: 'Other',
- missingBucket: false,
- missingBucketLabel: 'Missing',
- size: 10,
- order: 'desc',
- orderBy: '1',
- customLabel: 'Requirement',
- },
- },
- {
- id: '4',
- enabled: true,
- type: 'terms',
- schema: 'bucket',
- params: {
- field: 'rule.description',
- otherBucket: false,
- otherBucketLabel: 'Other',
- missingBucket: false,
- missingBucketLabel: 'Missing',
- size: 10,
- order: 'desc',
- orderBy: '1',
- customLabel: 'Rule description',
- },
- },
- ],
- }),
- uiStateJSON: JSON.stringify({
- vis: { params: { sort: { columnIndex: 3, direction: 'desc' } } },
- }),
- description: '',
- version: 1,
- kibanaSavedObjectMeta: {
- searchSourceJSON: JSON.stringify({
- index: 'wazuh-alerts',
- filter: [],
- query: { query: '', language: 'lucene' },
- }),
- },
- },
- },
-];