Write directory title here
1. Basic Performance Monitoring System Composition
Collectd + InfluxdDB + Grafana
Collectd is a daemon process that collects system and application performance indicators on a regular basis, and provides a
mechanism to store these indicator values in different ways; InfluxDB is an open source, high-performance time-series database
Grafana is a very cool The data visualization platform is often used to display monitoring data and supports multiple data sources
2. Environment construction
Use Docker to deploy the environment
Steps:
- Prepare data file types.db collectd.conf
- Start influxDB
- start grafana
- start collectd
1. Prepare the data file type.db collectd.conf
docker create --name temporary mwaeckerlin/collectd
docker cp temporary:/usr/share/collectd/types.db types.db
docker cp temporary:/etc/collectd/collectd.conf collectd.conf
mkdir -p <your path>
mv -i types.db <your path>
mv -i collectd.conf <your path>
docker rm temporary
docker create --name temporary mwaeckerlin/collectd
[root@mylinux1 ~]# docker cp temporary:/usr/share/collectd/types.db types.db
Preparing to copy...
Copying from container - 512B
Copying from container - 17.7kB
Copying from container - 17.92kB
Copying from container - 18.43kB
Copying from container - 18.94kB
Successfully copied 18.94kB to /root/types.db
[root@mylinux1 ~]# docker cp temporary:/etc/collectd/collectd.conf collectd.conf
Preparing to copy...
Copying from container - 512B
Copying from container - 32.77kB
Copying from container - 42.56kB
Copying from container - 43.01kB
Copying from container - 43.52kB
Copying from container - 44.03kB
Successfully copied 44.03kB to /root/collectd.conf
[root@mylinux1 ~]# mkdir -p collectd
[root@mylinux1 ~]# mv -i collectd.conf collectd
[root@mylinux1 ~]# mv -i types.db collectd
[root@mylinux1 ~]# docker rm temporary
2. Start InfluxDB
The container name is fixed: influxdb
docker run -d \
--name influxdb \
-e INFLUXDB_COLLECTD_ENABLED=true \
-e INFLUXDB_COLLECTD_DATABASE=_internal \
-e INFLUXDB_COLLECTD_TYPESDB=/usr/share/collectd/types.db \
-e INFLUXDB_COLLECTD_SECURITY_LEVEL=none \
-v /root/collectd/types.db:/usr/share/collectd/types.db \
influxdb:1.8
3. Start grafana
[root@mylinux1 collectd]# docker run -d --name=grafana1 -p 3001:3000 --link influxdb:influxdb grafana/grafana
Default username and password: admin, admin
My new password is: 123456
4. Start collectd
docker run -d \
--name collectd \
--hostname 192.168.22.3 \
--link influxdb :influxdb \
-v /root/collectd/collectd.conf:/etc/collectd/collectd.conf \
mwaeckerlin/collectd
5. Configure data source in Grafana
Type: InfluxDB
URL: http://influxdb:8086
Database:_internal
Configure Dashboard
Import id 555 in Grafana