Skip to content

Commit abd5ac8

Browse files
committed
Add an external scrape endpoint
1 parent 86985f7 commit abd5ac8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

internal/local_runner.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,18 @@ func CreatePrometheusServices(manifest *Manifest, out *output) error {
759759
// Read all the components to be deployed and find all the ports with name 'metrics'
760760
// to create the prometheus scrapper config
761761
var scrapeConfigs []map[string]interface{}
762+
763+
// global scrape config
764+
scrapeConfigs = append(scrapeConfigs, map[string]interface{}{
765+
"job_name": "external",
766+
"metrics_path": "/metrics",
767+
"static_configs": []map[string]interface{}{
768+
{
769+
"targets": []string{"host.docker.internal:5555"},
770+
},
771+
},
772+
})
773+
762774
for _, c := range manifest.services {
763775
for _, port := range c.ports {
764776
if port.Name == "metrics" {

0 commit comments

Comments
 (0)