Grafana – Start from scratch

Alex's Guardian > Grafana – Start from scratch

So you came across a sweet looking Grafana dashboard and thought: “Gee wish I could do this however I have no idea where to start!” Well guess what, you came to the right place. I am going to walk you through how to:

  • Create a Virtual Machine in Hyper-V. ✅ 
  • Install Ubuntu Server on new VM. ✅ 
    1. Secure SSH access to VM ✅
    2. Secure Linux via IPTables.
  • Setup and install Docker CE. ✅ 
    1. Deploy InfluxDB in Docker. ✅ 
    2. Deploy Grafana in Docker. ✅ 
    3. Deploy Telegraf in Docker. ✅
    4. Deploy Prometheus in Docker. ✅
    5. Other services in Docker.
  • Deploy Telegraf on Linux. ✅
  • Deploy Telegraf on Windows as a service. ✅
  • Bonus: Placing Grafana behind a reverse proxy using Caddy. ✅

✅  – indicates completed guide page. Last updated 1-16-2020

This guide will be written from a Windows user point of view. 90% of you probably use Windows as your daily driver. If not, cool, as you probably already know your way around a cli/bash terminal or you use OSX (yikes).

A few of the files needed in this guide are provided via my selfhosted dogbin instance. If you are unable to curl the files it may be that I am either rebooting Caddy, server is down for maintenance, or its dead. Shoot me an email if you cant get the files!

There are two different ways to set this stuff up (I will be using a virtual machine via Hyper-V for this guide):

  1. A Virtual Machine (Recommended)
  2. A Physical Machine

Things you will need:

  1. Windows 7, 8.1, or 10 Pro+ OR Windows Server 2012 R2+ OR Hyper-V Server.
  2. A decent file editor. I recommend Visual Studio Code for Windows an Nano for Ubuntu CLI.
  3. A USB drive that’s 1GB.+ *
  4. 2-3 hours of free time.
    • A decent internet connection makes this go faster.
  5. Ubuntu Server. Which you can get from here.

* The USB drive is only needed if you are using a physical host over a VM. The setup process for this is the same as if you were installing Windows.

Table of Contents

Page nav links are at the bottom of each page!

Add-ons ToC

Guide Key

Text rendered like this is a NOTE

Text rendered like this is an OPTIONAL step

Text rendered like this is a WARNING


Git Repo for scripts created by members of the Grafana – Experts Exchange Facebook group. How to Contribute: Clone/fork the Repo Create a new branch that isn’t master / other already existing branchs. Do your changes Commit / push your changes Create a pull request against the main repo for master ???

Credits – Special Thanks

These people took the time to go through the guide and help fix issues and make a few more things clearer. Thank you so much!

  • Scott H. – GEE Group Member
  • Tom C. – GEE Group Member

Creating the Virtual Machine >>