https://github.com/rogerhoward/promdate
Promdate is a simple Web service which acts as a bridge between the Prometheus Operator's ServiceMonitor objects, and external sites which normally can't be represented by a ServiceMonitor
https://github.com/rogerhoward/promdate
kubernetes prometheus prometheus-operator
Last synced: 6 months ago
JSON representation
Promdate is a simple Web service which acts as a bridge between the Prometheus Operator's ServiceMonitor objects, and external sites which normally can't be represented by a ServiceMonitor
- Host: GitHub
- URL: https://github.com/rogerhoward/promdate
- Owner: rogerhoward
- License: apache-2.0
- Created: 2023-11-13T21:05:13.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-14T02:03:55.000Z (over 2 years ago)
- Last Synced: 2024-04-24T11:00:20.617Z (about 2 years ago)
- Topics: kubernetes, prometheus, prometheus-operator
- Language: Dockerfile
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# promdate
Promdate is a simple Web service which acts as a bridge between the Prometheus Operator's ServiceMonitor objects, and external sites which normally can't be represented by a ServiceMonitor. Simply pass the URL, minus the scheme/protocol, to ServiceMonitor in its `path` property, and the proxy will fetch the contents of that URL and return it.
For instance, if Promdate is hosted at `http://promdate.local`, then this URL:
`http://promdate.local/www.acme.com/metrics/` will return the contents of `https://www.acme.com/metrics`
## getting started
### requirements
1. a working Kubernetes cluster
2. a working Prometheus environment in Kubernetes, with the [Prometheus Operator and CRDs](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md) installed
3. a site with a metrics exporter that is reachable by http/https
### deploy Promdate
You may only need one instance of Promdate per cluster.
The important bits involved are:
- host the [promdate container](https://hub.docker.com/r/rogerhoward/promdate/) and expose it via a Service object. This project provides an [example using a simple Deployment and a Service](k8s/promdate.yaml)
### use Promdate
- create one or more Prometheus ServiceMonitor objects that point at the Service. This project provides an [example ServiceMonitor object](k8s/servicemonitor.yaml)