Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 8 days 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: 2024-11-13T02:14:40.971Z (2 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
[![Build Status](https://github.com/LuxChanLu/freshping-prometheus-exporter/workflows/Build/badge.svg)](https://github.com/LuxChanLu/freshping-prometheus-exporter/actions)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/55034b0716704ad388252aa3a1789b1a)](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)
[![GitHub release](https://img.shields.io/github/release/LuxChanLu/freshping-prometheus-exporter.svg)](https://github.com/LuxChanLu/freshping-prometheus-exporter/releases)
[![Go Report Card](https://goreportcard.com/badge/github.com/LuxChanLu/freshping-prometheus-exporter)](https://goreportcard.com/report/github.com/LuxChanLu/freshping-prometheus-exporter)
[![go-doc](https://godoc.org/github.com/LuxChanLu/freshping-prometheus-exporter?status.svg)](https://pkg.go.dev/github.com/LuxChanLu/freshping-prometheus-exporter)
[![Docker Pulls](https://img.shields.io/docker/pulls/luxchan/freshping-prometheus-exporter.svg?maxAge=604800)](https://hub.docker.com/r/luxchan/freshping-prometheus-exporter)
![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/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