美文网首页
Prometheus-结合-Grafana

Prometheus-结合-Grafana

作者: xsren2019 | 来源:发表于2020-06-22 11:52 被阅读0次

    Install Grafana

    Linux安装方式:

    # Download and unpack Grafana from binary tar (adjust version as appropriate).
    curl -L -O https://grafanarel.s3.amazonaws.com/builds/grafana-2.5.0.linux-x64.tar.gz
    tar zxf grafana-2.5.0.linux-x64.tar.gz
    
    # Start Grafana.
    cd grafana-2.5.0/
    ./bin/grafana-server web
    

    我本机是MAC,安装方式:

    brew update
    brew install grafana
    brew services start grafana
    

    Usage

    访问http://localhost:3000/login默认用户名密码是admin:admin。
    登录成功以后如下图:

    image.png

    创建数据源

    To create a Prometheus data source:

    1. Click on the Grafana logo to open the sidebar menu.
    2. Click on "Data Sources" in the sidebar.
    3. Click on "Add New".
    4. Select "Prometheus" as the type.
    5. Set the appropriate Prometheus server URL (for example, http://localhost:9090/)
    6. Adjust other data source settings as desired (for example, turning the proxy access off).
    7. Click "Add" to save the new data source.
      效果图如下:


      image.png

    创建Prometheus图表

    比较好的方式是引入网上别人已经做好的,然后改动。

    访问https://grafana.com/dashboards?dataSource=prometheus,设置“Data Source”为“Prometheus”,如下图:

    image.png
    点击进入第一个,复制ID
    image.png
    然后在自己部署的grafana点击加号,然后点击“import”
    image.png
    然后输入ID
    image.png
    设置源,点击Import
    image.png
    可以看到引入成功了

    相关文章

      网友评论

          本文标题:Prometheus-结合-Grafana

          本文链接:https://www.haomeiwen.com/subject/xuqywctx.html