https://github.com/luxchanlu/freshping-prometheus-exporter
Freshping prometheus exporter
https://github.com/luxchanlu/freshping-prometheus-exporter
freshping go golang prometheus prometheus-exporter
Last synced: 3 months ago
JSON representation
Freshping prometheus exporter
- Host: GitHub
- URL: https://github.com/luxchanlu/freshping-prometheus-exporter
- Owner: LuxChanLu
- License: mit
- Created: 2020-10-15T10:32:49.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-10-16T03:49:04.000Z (over 4 years ago)
- Last Synced: 2025-01-12T08:16:59.484Z (5 months ago)
- Topics: freshping, go, golang, prometheus, prometheus-exporter
- Language: Go
- Homepage:
- Size: 29.3 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Freshping prometheus exporter
[](https://github.com/LuxChanLu/freshping-prometheus-exporter/actions)
[](https://www.codacy.com/gh/LuxChanLu/freshping-prometheus-exporter/dashboard?utm_source=github.com&utm_medium=referral&utm_content=LuxChanLu/freshping-prometheus-exporter&utm_campaign=Badge_Grade)
[](https://github.com/LuxChanLu/freshping-prometheus-exporter/releases)
[](https://goreportcard.com/report/github.com/LuxChanLu/freshping-prometheus-exporter)
[](https://pkg.go.dev/github.com/LuxChanLu/freshping-prometheus-exporter)
[](https://hub.docker.com/r/luxchan/freshping-prometheus-exporter)
This is a simple prometheus exporter for [freshping.io](https://www.freshping.io/)
## Configuration
You first need to have a status page enable (This exporter use the status page api)
To run you only need to provide one of these envionment variables :
- `FRESHPING_URL` : URL to your status page (`https://statuspage.freshping.io/XXXXX-XXXXX/`)
- `FRESHPING_URL_FILE` : A file containing the URL (In case you want to use a vault with secrets if your url have an url or password `https://username:[email protected]/XXXXX-XXXXX/`)## Kubernetes
(You can add the `prometheus.io/scrape` if your deployment use it)```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: freshping-exporter
labels:
app.kubernetes.io/name: freshping-exporter
spec:
selector:
matchLabels:
app.kubernetes.io/name: freshping-exporter
template:
metadata:
labels:
app.kubernetes.io/name: freshping-exporter
spec:
containers:
- name: freshping-exporter
image: luxchan/freshping-prometheus-exporter:
env:
- name: FRESHPING_URL
value: https://statuspage.freshping.io/XXXXX-XXXXX/
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "150m"
ports:
- containerPort: 9705
protocol: TCP
name: metrics
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
privileged: false
capabilities:
drop:
- ALL
securityContext:
runAsNonRoot: true
runAsUser: 10001
```And if needed the `Service` and `ServiceMonitor`
```yaml
---
apiVersion: v1
kind: Service
metadata:
name: freshping-exporter
labels:
app.kubernetes.io/name: freshping-exporter
spec:
selector:
app.kubernetes.io/name: freshping-exporter
ports:
- port: 9705
targetPort: 9705
name: metrics
protocol: TCP
---
kind: ServiceMonitor
apiVersion: monitoring.coreos.com/v1
metadata:
name: freshping-exporter
labels:
app.kubernetes.io/name: freshping-exporter
spec:
selector:
matchLabels:
app.kubernetes.io/name: freshping-exporter
jobLabel: app.kubernetes.io/name
endpoints:
- port: "metrics"
targetPort: 9705
interval: 15s
```Need more than one status page ? Add a container into your deployment and a port into your service