普通视图

Deploy Grafana & Prometheus metrcs tracking system for your Go program

2019年9月10日 14:06
Step 1: integrate prometheus for let prometheus get metrics from go program, we need prometheus/client_golang to collect some informations import ( "github.com/prometheus/client_golang/prometheus/promhttp" "net/http" ) func main() { // ... http.Handle("/metrics", promhttp.Handler()) http.ListenAndServe(":9200", nil) } Step 2: Set up Prometheus Server configuration for Prometheus Server global: scrape_interval: 15s # Set the scrape interval to every 15 … Continue reading Deploy Grafana & Prometheus metrcs tracking system for your Go program
❌