gitwtfhub

wtf is prometheus-cloud-sd?

ylighgh/prometheus-cloud-sd — explained in plain English

Analysis updated 2026-05-18

24GoAudience · ops devopsComplexity · 4/5LicenseSetup · moderate

TL;DR

A Go service that automatically discovers cloud databases and servers on Alibaba Cloud and AWS so Prometheus can monitor them without manual setup.

Mindmap

mindmap
  root((prometheus-cloud-sd))
    What It Does
      Discovers cloud resources
      Feeds Prometheus targets
      Filters by tags
    Tech Stack
      Go
      Kubernetes
      Prometheus
      AWS
      Alibaba Cloud
    Use Cases
      Monitoring setup
      Multi-cloud ops
      Auto discovery
    Audience
      DevOps engineers
      SREs

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Automatically feed Prometheus a live list of cloud database and server targets to monitor.

REASON 2

Deploy the service on Kubernetes to track Redis, MySQL, PostgreSQL, and MongoDB across cloud accounts.

REASON 3

Filter which resources get monitored using scope and disable tags.

REASON 4

Use a stopped virtual server's disappearance from active targets as a monitoring signal.

What's in the stack?

GoPrometheusKubernetesAWSAlibaba Cloud

How it stacks up

ylighgh/prometheus-cloud-sdjesseduffield/openprayjiangmuran/claude-in-box
Stars242424
LanguageGoGoGo
Setup difficultymoderateeasymoderate
Complexity4/52/54/5
Audienceops devopsgeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires cloud account credentials and a YAML config, runs best inside Kubernetes with provided manifests.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice and include a copy of the license.

Wtf does this do

prometheus-cloud-sd is a tool that helps a monitoring system called Prometheus keep track of databases and servers running in the cloud, specifically on Alibaba Cloud and AWS. Prometheus is a popular tool for watching over software systems and alerting when something goes wrong, but it needs to be told what to watch. Cloud resources like databases get created and deleted often, so manually keeping that list updated is tedious. This project automatically finds those resources and hands Prometheus an up to date list to monitor. It currently discovers a specific set of resources: Redis and Tair caches, MySQL and PostgreSQL databases, MongoDB, and virtual servers, across both Alibaba Cloud's and AWS's equivalent services. It exposes this information through several web addresses that Prometheus can be pointed at, one for each resource type, plus health check addresses to confirm the service itself is running properly. Resources can be filtered in or out using tags, and even a stopped virtual server stays visible as an unreachable target on purpose, since that change in state can itself be a useful signal to monitor. The project is written in Go and is meant to run inside a Kubernetes cluster, with ready made deployment files provided, though it can also be run directly on a local machine for testing. Setting it up means providing cloud account credentials as environment variables or secrets, then writing a YAML configuration file that lists which cloud accounts, regions, and resource types to watch. The maintainers are upfront that some things are intentionally left out of this version, including a visual interface, a database for storing results, and login protection on its own endpoints. The architecture is built so that adding support for another cloud provider later would not require changing how Prometheus talks to the service. Planned future work includes support for Huawei Cloud, built in metrics, endpoint authentication, and an optional read-only interface. The project is licensed under the Apache License 2.0.

Yoink these prompts

Prompt 1
Help me write a YAML config for prometheus-cloud-sd to monitor my Alibaba Cloud Redis instances.
Prompt 2
Walk me through deploying prometheus-cloud-sd and its exporters on Kubernetes.
Prompt 3
Explain how Prometheus would use the /sd/mysql endpoint from this service.
Prompt 4
What least-privilege AWS permissions do I need to grant this service?

Frequently asked questions

wtf is prometheus-cloud-sd?

A Go service that automatically discovers cloud databases and servers on Alibaba Cloud and AWS so Prometheus can monitor them without manual setup.

What language is prometheus-cloud-sd written in?

Mainly Go. The stack also includes Go, Prometheus, Kubernetes.

What license does prometheus-cloud-sd use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice and include a copy of the license.

How hard is prometheus-cloud-sd to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is prometheus-cloud-sd for?

Mainly ops devops.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.