Skip to content

Simple system metrics collection and monitoring using InfuxDB, Telegraf, and Grafana running in Docker using Docker Compose.

Notifications You must be signed in to change notification settings

wurangbo/pi-metrics

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pi Metrics 🥧📊

Simple system metrics collection and monitoring using InfuxDB, Telegraf, and Grafana running in Docker using Docker Compose.

GitHub Logo

Requirements

  • Docker
  • Docker Compose

Quickstart

Start the Containers

docker-compose up -d

This will create a network called pi-metrics_default and start 3 containers running on that network.

Run docker ps to check the container statuses.

Run docker-compose logs to check container logs.

Grafana Setup

Grafana might need permission to write to the mounted directory for it's data. Run sudo chown -R 472:472 /tmp/grafana/ where /tmp/grafana is the default directory where data is stored on the host machine.

Once the container processes have started, you can access the Grafana dashboard at http://localhost:3000 .

Default Grafana credentials are admin/admin.

On first run, go to Configuration > Data Sources and add an InfluxDB datasource and edit the following details:

  • url: http://metricsdb:8086
  • database: telegraf

Save & Test the connection. Once successful, you can go to Dashboards > Manage and create a new Dashboard. Select your InfluxDB datasouce and pick some default system metrics being reported like disk or cpu to visualize.

Telegraf is also configured to ping the 8.8.8.8 DNS server as well as some common websites like Google and Amazon to poll and record network latencies.

Customizations

The telegraf.conf file can be edited to report on many more metrics. You can check the telegraf docs for more information or check the full example conf file.

Acknowledgements

This was created by roughly following a tutorial here with some enhancements.

The commands used in the original tutorial (which was written specifically to be run on a Raspberry Pi) can be found in the setup.sh script.

About

Simple system metrics collection and monitoring using InfuxDB, Telegraf, and Grafana running in Docker using Docker Compose.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%