diff --git a/pkg/collector/corechecks/oracle/config/config.go b/pkg/collector/corechecks/oracle/config/config.go index ce1be8b857281..28695f3caf032 100644 --- a/pkg/collector/corechecks/oracle/config/config.go +++ b/pkg/collector/corechecks/oracle/config/config.go @@ -158,7 +158,7 @@ type InstanceConfig struct { UseGlobalCustomQueries string `yaml:"use_global_custom_queries"` CustomQueries []CustomQuery `yaml:"custom_queries"` MetricCollectionInterval int64 `yaml:"metric_collection_interval"` - DatabaseInstanceCollectionInterval uint64 `yaml:"database_instance_collection_interval"` + DatabaseInstanceCollectionInterval int64 `yaml:"database_instance_collection_interval"` Asm asmConfig `yaml:"asm"` ResourceManager resourceManagerConfig `yaml:"resource_manager"` Locks locksConfig `yaml:"locks"` @@ -229,7 +229,7 @@ func NewCheckConfig(rawInstance integration.Data, rawInitConfig integration.Data instance.UseGlobalCustomQueries = "true" - instance.DatabaseInstanceCollectionInterval = 1800 + instance.DatabaseInstanceCollectionInterval = 300 instance.Loader = defaultLoader initCfg.Loader = defaultLoader diff --git a/pkg/collector/corechecks/oracle/metadata.go b/pkg/collector/corechecks/oracle/metadata.go index 2f06a76d66193..d81a66f325a7d 100644 --- a/pkg/collector/corechecks/oracle/metadata.go +++ b/pkg/collector/corechecks/oracle/metadata.go @@ -28,7 +28,7 @@ type dbInstanceEvent struct { AgentVersion string `json:"agent_version"` Dbms string `json:"dbms"` Kind string `json:"kind"` - CollectionInterval uint64 `json:"collection_interval"` + CollectionInterval int64 `json:"collection_interval"` DbmsVersion string `json:"dbms_version"` Tags []string `json:"tags"` Timestamp float64 `json:"timestamp"` diff --git a/pkg/collector/corechecks/oracle/oracle.go b/pkg/collector/corechecks/oracle/oracle.go index 94779cb4a5c82..b52683c17f46a 100644 --- a/pkg/collector/corechecks/oracle/oracle.go +++ b/pkg/collector/corechecks/oracle/oracle.go @@ -182,7 +182,7 @@ func (c *Check) Run() error { c.connection = conn } - dbInstanceIntervalExpired := checkIntervalExpired(&c.dbInstanceLastRun, 1800) + dbInstanceIntervalExpired := checkIntervalExpired(&c.dbInstanceLastRun, c.config.DatabaseInstanceCollectionInterval) if dbInstanceIntervalExpired && !c.legacyIntegrationCompatibilityMode && !c.config.OnlyCustomQueries { err := sendDbInstanceMetadata(c)