Skip to content

Commit

Permalink
PMM-13020 fix scrape config and rds tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Apr 23, 2024
1 parent dda8276 commit 94e43d4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion managed/services/agents/rds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ instances:
disable_basic_metrics: true
disable_enhanced_metrics: false
labels:
agent_id:
agent_id: agent1
agent_type: rds_exporter
az: us-east-1c
foo: bar
Expand Down
42 changes: 21 additions & 21 deletions managed/services/victoriametrics/scrape_configs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestScrapeConfig(t *testing.T) {
}

expected := []*config.ScrapeConfig{{
JobName: "node_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
JobName: "node_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -98,7 +98,7 @@ func TestScrapeConfig(t *testing.T) {
"vmstat",
}},
}, {
JobName: "node_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
JobName: "node_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
ScrapeInterval: config.Duration(s.MR),
ScrapeTimeout: scrapeTimeout(s.MR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -127,7 +127,7 @@ func TestScrapeConfig(t *testing.T) {
"textfile.mr",
}},
}, {
JobName: "node_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
JobName: "node_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
ScrapeInterval: config.Duration(s.LR),
ScrapeTimeout: scrapeTimeout(s.LR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -189,7 +189,7 @@ func TestScrapeConfig(t *testing.T) {
}

expected := []*config.ScrapeConfig{{
JobName: "node_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
JobName: "node_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -258,7 +258,7 @@ func TestScrapeConfig(t *testing.T) {
}

expected := []*config.ScrapeConfig{{
JobName: "mysqld_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
JobName: "mysqld_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -292,7 +292,7 @@ func TestScrapeConfig(t *testing.T) {
"standard.process",
}},
}, {
JobName: "mysqld_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
JobName: "mysqld_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
ScrapeInterval: config.Duration(s.MR),
ScrapeTimeout: scrapeTimeout(s.MR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -331,7 +331,7 @@ func TestScrapeConfig(t *testing.T) {
"slave_status",
}},
}, {
JobName: "mysqld_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
JobName: "mysqld_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
ScrapeInterval: config.Duration(s.LR),
ScrapeTimeout: scrapeTimeout(s.LR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -412,7 +412,7 @@ func TestScrapeConfig(t *testing.T) {
}

expected := []*config.ScrapeConfig{{
JobName: "mysqld_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
JobName: "mysqld_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -445,7 +445,7 @@ func TestScrapeConfig(t *testing.T) {
"standard.process",
}},
}, {
JobName: "mysqld_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
JobName: "mysqld_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
ScrapeInterval: config.Duration(s.MR),
ScrapeTimeout: scrapeTimeout(s.MR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -482,7 +482,7 @@ func TestScrapeConfig(t *testing.T) {
"slave_status",
}},
}, {
JobName: "mysqld_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
JobName: "mysqld_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
ScrapeInterval: config.Duration(s.LR),
ScrapeTimeout: scrapeTimeout(s.LR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -559,7 +559,7 @@ func TestScrapeConfig(t *testing.T) {
}

expected := []*config.ScrapeConfig{{
JobName: "mysqld_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
JobName: "mysqld_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -590,7 +590,7 @@ func TestScrapeConfig(t *testing.T) {
"standard.process",
}},
}, {
JobName: "mysqld_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
JobName: "mysqld_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
ScrapeInterval: config.Duration(s.MR),
ScrapeTimeout: scrapeTimeout(s.MR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -625,7 +625,7 @@ func TestScrapeConfig(t *testing.T) {
"slave_status",
}},
}, {
JobName: "mysqld_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
JobName: "mysqld_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
ScrapeInterval: config.Duration(s.LR),
ScrapeTimeout: scrapeTimeout(s.LR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -717,7 +717,7 @@ func TestScrapeConfig(t *testing.T) {

expected := []*config.ScrapeConfig{
{
JobName: "mongodb_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
JobName: "mongodb_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -747,7 +747,7 @@ func TestScrapeConfig(t *testing.T) {
}},
},
}, {
JobName: "mongodb_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
JobName: "mongodb_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
ScrapeInterval: config.Duration(s.LR),
ScrapeTimeout: scrapeTimeout(s.LR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -835,7 +835,7 @@ func TestScrapeConfig(t *testing.T) {
}

expected := []*config.ScrapeConfig{{
JobName: "postgres_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
JobName: "postgres_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -868,7 +868,7 @@ func TestScrapeConfig(t *testing.T) {
"standard.go",
}},
}, {
JobName: "postgres_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
JobName: "postgres_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
ScrapeInterval: config.Duration(s.MR),
ScrapeTimeout: scrapeTimeout(s.MR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -898,7 +898,7 @@ func TestScrapeConfig(t *testing.T) {
"custom_query.mr",
}},
}, {
JobName: "postgres_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
JobName: "postgres_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
ScrapeInterval: config.Duration(s.LR),
ScrapeTimeout: scrapeTimeout(s.LR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -980,7 +980,7 @@ func TestScrapeConfig(t *testing.T) {
}

expected := []*config.ScrapeConfig{{
JobName: "proxysql_exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
JobName: "proxysql_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -1162,7 +1162,7 @@ func TestScrapeConfig(t *testing.T) {
}

expected := []*config.ScrapeConfig{{
JobName: "external-exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
JobName: "external-exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
ServiceDiscoveryConfig: config.ServiceDiscoveryConfig{
Expand Down Expand Up @@ -1210,7 +1210,7 @@ func TestScrapeConfig(t *testing.T) {
}

expected := []*config.ScrapeConfig{{
JobName: "external-exporter_agent_id_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
JobName: "external-exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
MetricsPath: "/some-metric-path",
Expand Down

0 comments on commit 94e43d4

Please sign in to comment.