Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to quickly build Influxdb+cadvisor+grafana Monitoring

2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

How to quickly build Influxdb+cadvisor+grafana monitoring, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

Installation process

All three download the image startup container directly.

Cadvisor: data acquisition

Influxdb: data storage

Grafana: data presentation

Start the influxdb container

Docker run-d-p 8083-p 8086-- expose 8090-- expose 8099-- name influxsrv tutum/influxdb

Access the console through the host IP+8083 port

Go to the influxdb container to install the cadvisor database

# docker exec-ti influxsrv / bin/bash

$influx

Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.

Connected to http://localhost:8086 version 0.9.6.1

InfluxDB shell 0.9.6.1

> CREATE DATABASE cadvisor

> use cadvisor

> CREATE USER "root" WITH PASSWORD 'root' WITH ALL PRIVILEGES

> exit

Start the cadvisor container

Docker run-volume=/:/rootfs:ro-volume=/var/run:/var/run:rw-volume=/sys:/sys:ro-volume=/var/lib/docker/:/var/lib/docker:ro-publish=8080:8080-detach=true-link influxsrv:influxsrv-name=cadvisor google/cadvisor:latest storage_driver=influxdb storage_driver_db=cadvisor storage_driver_host=influxsrv:8086

Access the console through the host IP+8080 port

Start the grafana container

Docker run-d-p 3000 INFLUXDB_NAME=cadvisor 3000-e INFLUXDB_HOST= 10.105.72.79-e INFLUXDB_PORT=8086-e INFLUXDB_NAME=cadvisor-e INFLUXDB_USER=root-e INFLUXDB_PASS=root-- link influxsrv:influxsrv-- name grafana grafana/grafana

Access the console through the host IP+3000 port with a user name and password of admin/admin

Configure grafana

Adding the data source

Configure the connection information of Influxdb (port 8060) and the authentication information of CAdvisor database (root/root) in this panel.

Adding Dashboards

Adding Query Editor

If the data is not displayed and an error is reported in the upper left corner:

Error parsing query: time dimension must have one duration argument

You need to change the group by time (internal) in the query condition to a specific time.

After reading the above, have you mastered how to quickly build Influxdb+cadvisor+grafana monitoring? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report