Skip to content

Commit

Permalink
use the configured interval for the ttl expiry on the db instance cache
Browse files Browse the repository at this point in the history
  • Loading branch information
jmeunier28 committed May 30, 2024
1 parent db24f89 commit 13e59a4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/collector/corechecks/oracle/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/collector/corechecks/oracle/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/collector/corechecks/oracle/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 13e59a4

Please sign in to comment.