prometheus

command
v0.0.0-...-d7b2d65 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

README

1.Prometheus
docker run -d --name prometheus \
  --restart=always \
  -p 9090:9090 \
  -v $(pwd)/prometheus.yml:/etc/prometheus/prometheus.yml \
  prom/prometheus

curl http://192.168.126.128:9090

2.node_exporter
docker run -d --name node_exporter \
  --restart=always \
  --net="host" \
  --pid="host" \
  -v "/proc:/host/proc:ro" \
  -v "/sys:/host/sys:ro" \
  -v "/:/rootfs:ro" \
  quay.io/prometheus/node-exporter:latest \
  --path.procfs=/host/proc \
  --path.sysfs=/host/sys \
  --path.rootfs=/rootfs \
  --collector.filesystem.ignored-mount-points='^/(sys|proc|dev|host|etc)($$|/)'

curl http://192.168.126.128:9100/metrics

3.Grafana
docker run -d -p 3000:3000 --name grafana grafana/grafana

curl http://192.168.126.128:3000
admin
admin

https://grafana.com/grafana/dashboards

4.Pushgateway
docker run -d -p 9091:9091 --name pushgateway prom/pushgateway

curl http://192.168.126.128:9091

echo "some_metric 3.14" | curl --data-binary @- http://192.168.126.128:9091/metrics/job/some_job

5.cAdvisor
docker run \
  --volume=/:/rootfs:ro \
  --volume=/var/run:/var/run:ro \
  --volume=/sys:/sys:ro \
  --volume=/var/lib/docker/:/var/lib/docker:ro \
  --volume=/dev/disk/:/dev/disk:ro \
  --publish=8080:8080 \
  --detach=true \
  --name=cadvisor \
  --privileged \
  --device=/dev/kmsg \
  gcr.io/cadvisor/cadvisor:latest

curl http://192.168.126.128:8080

6.Alertmanager

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL