Giter Club home page Giter Club logo

dockercompose-prometheus's Introduction

prometheus+grafana+pushgateway+alertmanager

通过Docker Compose在单机上面部署prometheus+grafana+pushgateway+alertmanager;里面覆盖邮件告警模板、微信告警模板等

1 将prometheus配置文件里面的IP改为自己节点的IP

# cat prometheus/prometheus.yaml 
scrape_configs:
  - job_name: "prometheus-gather"
    static_configs:
      - targets:
        - 192.168.3.97:9090
        - 192.168.3.97:9091
        - 192.168.3.97:3000

#说明:
9090:prometheus
9090:pushgateway
3000:grafana

2 执行init脚本,添加grafana数据目录及修改权限

bash ./init.sh

3 启动

启动
docker-compose up -d

停止
docker-compose down

4 访问地址

Prometheus:   http://localhost:9090
Grafana:      http://localhost:3000  \(User\: admin / Password\: admin@123\)
Pushgateway:  http://localhost:9091
Alertmanager: http://localhost:9093

5 测试数据

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

#登陆pushgateway进行查看会有一条数据 job="some_job"

dockercompose-prometheus's People

Contributors

ives22 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.