Skip to content

Commit

Permalink
config-generator: Enable version scraping for pipelines deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
hjpotter92 committed Jan 9, 2025
1 parent 9d85ba3 commit 6ea5139
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion config-generator/src/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ function generate() {
default: "0",
type: "string",
},
"prometheus-pipelines-monitor-enabled": {
describe: "Enable pipelines monitoring through prometheus",
default: false,
type: "boolean",
},
"prometheus-pipelines-domain": {
describe: "Comma separated domain(s) for pipelines metrics aggregator",
default: false,
type: "string",
},
"prometheus-kafka-monitor-enabled": {
describe: "Enable kafka monitoring through prometheus",
default: false,
Expand Down Expand Up @@ -383,7 +393,20 @@ function prometheusConfig(params) {
`mode ${params.mode} does not have a defined prometheus.yml config`
);
}
} else {
}

if (params && params.prometheusPipelinesMonitorEnabled) {
obj.scrape_configs.push({
job_name: "Pipelines version metrics.",
scrape_interval: "1m",
scrape_timeout: "1m",
honor_timestamps: true,
static_configs: [
{ targets: [params.prometheusPipelinesDomain.split(",")] },
],
scheme: "https",
metrics_path: "/api/metrics",
});
}

if (params && params.prometheusKafkaMonitorEnabled) {
Expand Down

0 comments on commit 6ea5139

Please sign in to comment.