Skip to content

A short demo using the Prometheus python client pushing metrics to the Pushgateway

Notifications You must be signed in to change notification settings

Oro/prometheus-pushgateway-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prometheus Pushgateway Demo

Prerequisites

  • docker 19.03.12
  • kubectl 1.18
  • helm 3.2.1
  • k3d 1.7

Or, if using Nix, run nix-shell (you will still have to have docker installed)

Create the cluster with k3d

k3d create cluster promgateway-demo

set environment for kubectl

export KUBECONFIG=$(k3d get-kubeconfig)

add helm repo

helm repo add stable https://kubernetes-charts.storage.googleapis.com/
helm repo update

install prometheus helm chart

helm install promgateway-demo stable/prometheus

Forward prometheus dashboard to localhost:9090

kubectl port-forward svc/promgateway-demo-prometheus-server 9090:80 &

build the docker image

docker build -t promgateway-demo:1 .

load the image into k3d

k3d import-images promgateway-demo:1

apply the cronjob and configmap

kubectl apply -f kubernetes.yml

visit http://localhost:9090/new/graph?g0.expr=promgatewaydemo_http_request_last_run_unixtime

About

A short demo using the Prometheus python client pushing metrics to the Pushgateway

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published