[Cloud Security] Fix typo in sampling rate serverless (#166153)

This commit is contained in:
Ido Cohen 2023-09-14 14:12:34 +03:00 committed by GitHub
parent d78ecfea34
commit 854dd4f7f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -8,7 +8,7 @@
import { cloudSecurityMetringCallback } from './cloud_security_metering';
import type { MetringTaskProperties } from '../types';
const TASK_INTERVAL = 3600; // 1 hour
const TASK_INTERVAL = 1800; // 30 minutes
export const cloudSecurityMetringTaskProperties: MetringTaskProperties = {
taskType: 'cloud-security-usage-reporting-task',

View file

@ -17,7 +17,7 @@ import { INTEGRATION_PACKAGE_NAME } from '@kbn/cloud-defend-plugin/common/consta
const CLOUD_DEFEND_HEARTBEAT_INDEX = 'metrics-cloud_defend.heartbeat';
export const CLOUD_SECURITY_TASK_TYPE = 'cloud_security';
export const AGGREGATION_PRECISION_THRESHOLD = 40000;
export const ASSETS_SAMPLE_GRANULARITY = '124h';
export const ASSETS_SAMPLE_GRANULARITY = '24h';
export const THRESHOLD_MINUTES = 30;
export const CSPM = CSPM_POLICY_TEMPLATE;

View file

@ -42,7 +42,7 @@ export class SecuritySolutionServerlessPlugin
>
{
private config: ServerlessSecurityConfig;
private cspmUsageReportingTask: SecurityUsageReportingTask | undefined;
private cloudSecurityUsageReportingTask: SecurityUsageReportingTask | undefined;
private endpointUsageReportingTask: SecurityUsageReportingTask | undefined;
private readonly logger: Logger;
@ -67,7 +67,7 @@ export class SecuritySolutionServerlessPlugin
pluginsSetup.ml.setFeaturesEnabled({ ad: true, dfa: true, nlp: false });
this.cspmUsageReportingTask = new SecurityUsageReportingTask({
this.cloudSecurityUsageReportingTask = new SecurityUsageReportingTask({
core: coreSetup,
logFactory: this.initializerContext.logger,
config: this.config,
@ -100,7 +100,7 @@ export class SecuritySolutionServerlessPlugin
const internalESClient = _coreStart.elasticsearch.client.asInternalUser;
const internalSOClient = _coreStart.savedObjects.createInternalRepository();
this.cspmUsageReportingTask?.start({
this.cloudSecurityUsageReportingTask?.start({
taskManager: pluginsSetup.taskManager,
interval: cloudSecurityMetringTaskProperties.interval,
});