• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Guide: Setting up and implementing a TIG stack

Solaris17

Dainty Moderator
Staff member
Joined
Aug 16, 2005
Messages
20,537 (4.06/day)
Location
Florida
System Name Venslar
Processor I9 7980XE
Motherboard MSI x299 Tomahawk Arctic
Cooling EK Custom
Memory 32GB Corsair DDR4 3000mhz
Video Card(s) Nvidia Titan RTX
Storage 2x 2TB Micron SSDs | 1x ADATA 128SSD | 1x Drevo 256SSD | 1x 1TB 850 EVO | 1x 250GB 960 EVO
Display(s) 3x AOC Q2577PWQ (2k IPS)
Case Inwin 303 White (Thermaltake Ring 120mm Purple accent)
Audio Device(s) Realtek ALC 1220 on Audio-Technica ATH-AG1
Power Supply Seasonic 1050W Snow
Mouse Roccat Tyon White
Keyboard Ducky Shine 6 Snow White
Software Windows 10 x64 Pro
Hello everyone! Pretty boring sunday, so after I was done recording the video I decided a written guide might be a good idea. So today, I am going to show you how to setup a TIG stack. As always,

I do NOT

Represent any specific company
Stand by any specific product
or
Represent Techpowerup as staff or otherwise

in any official capacity when I post guides. I am doing this because I'm a nerd that thinks you may benefit from the information.

Introduction
In my real job and in my home lab I deal with the TIG stack everyday. So lets first talk a little about what it is and what it does for your lab, or your infrastructure. The TIG stack is:

  • Telegraf (The agent that collects the data)​
  • InfluxDB (The database that contains the data given by telegraf)​
  • Grafana (The webUI that makes all the data in Influx pretty)​
These 3 things are utilized to create a visual representation of data from machines or IoT devices. Here is a glimpse of some readouts.
123767

The possibilities are nearly endless with this kind of graphing and information gathering. Some people like myself monitor things from hardware CPU/Disk usage, to services or uptime. Others utilize it to harness the readouts from home automation, such as KWh draw or temperature. So how do we do it? Thankfully the world is our oyster and the stack itself is easy to setup, after that tweak to your hearts content or base your work off of anothers template.

Lets get started!

To get started our environment example will have a vanilla ubuntu 18.04 server install and a vanilla Server 2019 Standard install. You can test environments like this if you have Windows Pro or higher by installing the Hyper-V feature.

TIP: Make sure your grafana server has a static IP address!

Lets login to our ubuntu server and make sure it is updated!

Code:
sudo apt update
Now lets install them.

Code:
sudo apt upgrade
123771

InfluxDB

Now that we are all patched up lets get cooking! First things first, lets do the databases first. You see we don't have anything for the agent to talk to, and we don't have anything for grafana to take info from. So starting in the middle seems like a great idea.

Now all of the new installation links will be on the install pages above. We will be using the as of current links for this guide.

First things first, we need to download the installer package. Dont forget to 'sudo'!
Code:
sudo wget https://dl.influxdata.com/influxdb/releases/influxdb_1.7.6_amd64.deb
123775


Now we install it! for this dpkg.
Code:
sudo dpkg -i influxdb_1.7.6_amd64.deb
123776


Now we just installed something new, so we need to make sure its running. Lets go ahead and start the process.
Code:
sudo service influxdb start
Cool beans! So we downloaded it, and we installed it, but its not going to work without a database right? right. So first lets talk to influx so we can interface with it. At the prompt just type.

Code:
influx
We want to create a database for our file server. Lets make one with a simple name. Thankfully influx commands are pretty straight forward.

Code:
CREATE DATABASE filesrv
We just made a database called "filesrv" lets make sure we did it right and make sur it exists, maybe you can guess what we will type.

Code:
SHOW DATABASES
I know, earth shatteringly complex commands.

123777


now just exit out of the influx command line with a simple;
Code:
 exit
Grafana

Cool so now that we have influx installed lets move on to Grafana.

Super simple process just like before. I'm sure if your following the guide that may have taken you several minutes, but I bet if you asked yourself if you could do it again you could do it in less than 3.

To start lets download the installer.
Code:
sudo wget https://dl.grafana.com/oss/release/grafana_6.2.0_amd64.deb
Now a little hint, grafana requires a font library to properly display things. If we just installed grafana now ubuntu would get mad. So lets install that library real quick.

Code:
sudo apt-get install -y adduser libfontconfig1
There all better, now lets get to the meaty part and install grafana.
Code:
sudo dpkg -i grafana_6.2.0_amd64.deb
Alright! Now just like influx lets start it up!
Code:
sudo service grafana-server start
Wew all done! As I'm sure you noticed at like 90mb these two pieces of software are totally brutal on your machine so I imagine it took you hours to download them. :p Moving on. Lets take a peak at your grafana home page. By default the port is 3000. In my case it is

192.168.1.3:3000

Now the degault USN and pass for grafana is

Code:
User: admin
Password: admin
Feel free to change it.

123778

Next we will Add a data source. This basically means we are going to pick the DB we want to use. As I am sure you have noticed via the first start menu Grafana makes this dumb easy, so forgive me if I think I haven't lost you yet.

123779

In our case we are going to pick "InfluxDB" because well if you don't know by now this guide may be a little out of your tech scope.
123780

Now we configure grafana to talk to our database, don't worry this isnt scary and its pretty simple. Name the "Data Source" whatever you want as long as you understand it. Next In the URL field just double click (in case your browser understands autofill) and select the default option of
Code:
http://localhost:8086
Next we type the database name as we named it in Influx. Lastly, we enter the user name and password for grafana.

123781

Now go ahead and click "Save & Test" This should start a quick self test that will let you know all is well and grafana can talk to the databse.

123782

Yay all good! Now lets go "Home" by clicking the grid in the left hand menu and selecting home. Now we can make our first dashboard.

123783

Once we click "New dashboard" we can immediately add data to it. We don't have any data right now so I just usually rename the dashboard at this point. Click the gear at the top right.

123784

From here we can change the name and a few other options of the dash itself. Don't forget to save!

123785

Now we have a blank dash with nothing going on!

123786

Lets fix this and install telegraf.

Telegraf

Telegraf has alot of options for both Windows and *nix systems alike, but don't worry for this we will stick with the basics. (I also included the conf I use and the command to install it.) We need to edit 3 lines in the telegraf.conf file so that we can start getting data.
  • The logfile location​
  • The IP of our database server​
  • The database name in Influx we want to send data too​
Do note in this guide our grafana and influx server are the same.

Boot up your windows machine here we go!

123792

In our case notice we did
Code:
logfile = "/Program Files (x86)/Telegraf/telegraf.log"
This is because we are going to make a telegraf directory with all of our files in the program files folder. This keeps it out of the way and in a place most people would look when troubleshooting.

123793

Now that things are copied over and ready to go lets open CMD as admin and copy the directory path of our telegraf directory. In this case again.
Code:
C:\Program Files (x86)\telegraf
Now lets type the following into CMD to navigate it to that folder.
Code:
cd C:\Program Files (x86)\telegraf
123794

yay, now lets run the command to install telegraf as a service AND use the configuration file sitting in the directory with it.

Code:
telegraf --service install --config "C:\Program Files (x86)\Telegraf\telegraf.conf"
123795

No errors! Last but not least lets open up the services tab in task manager and like influx and grafana start her up!

123796

Now that telegraf has started we also now have a nifty log file generated in the telegraf directory. This is handy incase and problems show up.

123797

Now that the telegraf agent is running on our server lets add some panels to grafana and get to graphing!!

First lets pull our browser backup and add a panel.
123798

Next select "Add Query"

123799


woot! From here we can configure grafana to get certain kinds of data from influx for us. Now this is a little more difficult because data typing is not my strong suite. You can do some really powerful stuff though, and like above you can even copy templates to get close to what you want. Lets start with something like a simple CPU counter.

Make sure to select the database you want to talk to at the top of the query window. In my case "File Server" from here we can plug in the fields we need to get CPU stats. Don't worry it gives you a basic config to build off of, but below I have the finished product.

123800


Yay! we are getting blips on our graph! but graphs aren't a good way to display this....Lets turn it into a gauge! Click on the "Visualization" button on the left hand menu for the panel.

A few seconds later and a drop down or two and we are now getting the Current value of the CPU between a percent of 0-100 and color change threshholds at 50 and 80% and of course we enabled the gauge.

123801


Nice! Hit save at the top right and lets do other cool stuff.

This time, real quick lets get the disk R/W information!

For this we are going to want to hit the "Add Query" button after configuring our first settings. This will add another copy of the settings so we can display two types of data on the same graph! Cool right?

123805

Hm, this seems pretty cool but the axes aren't right at all. Lets change the scale into something I actually understand.

123804

Sweet, switching it to bytes/sec helped make it MB/s which I understand much much better.

Now lets do some Windows upodates and watch our graphing do stuff!

123806


Sweet!

Thats all folks. I hope you enjoyed this guide and understood it was not supposed to be a deep dive, but a brief introduction to system setup. This guide and the infrastructure and settings within can easily handle multiple servers settings and data points. Its upto you to explore and discover things you want to monitor and how you want it displayed to you visually.
 

Attachments

Joined
Feb 11, 2012
Messages
1,291 (0.48/day)
Location
Anchorage Alaska
System Name Matter's / Helios 300 Predator
Processor Ryzen 5 2700 / i7 7700HQ
Motherboard B450 Tomahawk / Acer Helios 300 Predator
Cooling Arctic Freezer eSports Duo
Memory Patriot Viper ddr4 32gb / 32gb gskill ddr4
Video Card(s) gtx1660TI 6GB MSI Gaming X / GTX 1060 6gb
Storage Patriot Viper nvme M2, crucial MX300 275gb, Samsung 860 qvo 1tb
Display(s) Acer 24" 1080p / 15.6 1080p HD
Case Antec 300 / Acer Helios 300 Predator
Audio Device(s) On Board - Steel Series Arctis Pro Wireless Cans
Power Supply Antec 850watt high current pro
Mouse Steel series Rival 600
Keyboard Corsair K70 / Acer Helios 300 Predator
Software Win 10 Pro / Win 10 Home
Nice walk thru! That beats me putting 1911 back together. :)
 

Solaris17

Dainty Moderator
Staff member
Joined
Aug 16, 2005
Messages
20,537 (4.06/day)
Location
Florida
System Name Venslar
Processor I9 7980XE
Motherboard MSI x299 Tomahawk Arctic
Cooling EK Custom
Memory 32GB Corsair DDR4 3000mhz
Video Card(s) Nvidia Titan RTX
Storage 2x 2TB Micron SSDs | 1x ADATA 128SSD | 1x Drevo 256SSD | 1x 1TB 850 EVO | 1x 250GB 960 EVO
Display(s) 3x AOC Q2577PWQ (2k IPS)
Case Inwin 303 White (Thermaltake Ring 120mm Purple accent)
Audio Device(s) Realtek ALC 1220 on Audio-Technica ATH-AG1
Power Supply Seasonic 1050W Snow
Mouse Roccat Tyon White
Keyboard Ducky Shine 6 Snow White
Software Windows 10 x64 Pro
Thanks appreciate it! I do post more sophisticated ones from time to time, like my diagnostic drive guide. I like posting beginner level stuff the most though as opposed to deep dives. I think showing that anyone can do this kind of stuff is more helpful. A few beginner guides and kids are off being network engineers and system administrators after all!
 
Joined
Dec 16, 2017
Messages
416 (0.75/day)
Location
Argentina
System Name Desktop4
Processor Intel Core i3-4330
Motherboard Gigabyte GA-B85M-D3H v2.1
Cooling Standard Intel Cooler
Memory 32 GB DDR3 1600 MHz (11-10-10-29 CR2)
Video Card(s) Gigabyte AORUS Radeon RX 580 8 GB
Storage Kingston HyperX Fury 240 GB // Toshiba 2 TB HDD // WD 2 TB HDD // Mushkin Triactor 3DL 256 GB
Display(s) LG 22MP55 IPS Display
Case Corsair Carbide 100R
Audio Device(s) Logitech G430 Headset
Power Supply Corsair CX650M
Mouse Logitech Wireless Mouse M280 // Microsoft Trackball Optical 1.0
Keyboard Microsoft Natural Keyboard 4000
Software Windows 10
Benchmark Scores CPU-Z: 327.9 ST / 973.8 MT Cinebench R20: 797 cb
Bookmarked. Now I just gotta find me some time to try this out.
 

Solaris17

Dainty Moderator
Staff member
Joined
Aug 16, 2005
Messages
20,537 (4.06/day)
Location
Florida
System Name Venslar
Processor I9 7980XE
Motherboard MSI x299 Tomahawk Arctic
Cooling EK Custom
Memory 32GB Corsair DDR4 3000mhz
Video Card(s) Nvidia Titan RTX
Storage 2x 2TB Micron SSDs | 1x ADATA 128SSD | 1x Drevo 256SSD | 1x 1TB 850 EVO | 1x 250GB 960 EVO
Display(s) 3x AOC Q2577PWQ (2k IPS)
Case Inwin 303 White (Thermaltake Ring 120mm Purple accent)
Audio Device(s) Realtek ALC 1220 on Audio-Technica ATH-AG1
Power Supply Seasonic 1050W Snow
Mouse Roccat Tyon White
Keyboard Ducky Shine 6 Snow White
Software Windows 10 x64 Pro
Let me know how it goes! No homelab required you can set it all up in hyper-v on your local computer! Bonus points if you main linux and use KVM or similar!
 
Joined
Jul 25, 2006
Messages
5,379 (1.14/day)
Location
Nebraska, USA
System Name Brightworks Systems BWS-6 E-IV
Processor Intel Core i5-6600 @ 3.9GHz
Motherboard Gigabyte GA-Z170-HD3 Rev 1.0
Cooling Quality case, 2 x Fractal Design 140mm fans, stock CPU HSF
Memory 16GB (2 x 8GB) DDR4 3000 Corsair Vengeance
Video Card(s) EVGA GEForce GTX 1050Ti 4Gb GDDR5
Storage Samsung 850 Pro 256GB SSD, Samsung 860 Evo 500GB SSD
Display(s) Samsung S24E650BW LED x 2
Case Fractal Design Define R4
Power Supply EVGA Supernova 550W G2 Gold
Mouse Microsoft Wireless 5000
Keyboard Microsoft Wireless Comfort 5050
Software W10 Pro 64-bit
Very nice!
 
Joined
Jun 5, 2007
Messages
2,123 (0.48/day)
Location
Metro Manila, Philippines
System Name Zangief (Reborn)
Processor AMD Ryzen R7 1700X @ 3.825ghz , 1.35v
Motherboard Gigabyte GA-AX370 Gaming K7 Rev 1.0 BIOS F10
Cooling Noctua NH-D15 Push / Push Config | 2x ML120 | 2x Phanteks 120 mm
Memory 2x8GB G.Skill Trident Z @ 3200mhz cl 16 @ 1.45v
Video Card(s) Gigabyte Aorus GTX 1080 +100 core / +550 mem
Storage 250 GB Samsung Evo 850 / 1tb WD Black / 4tb WD Blue
Display(s) Acer Predator XB271HU |Asus VX239H 23" AH-IPS Led
Case Phanteks Enthoo Pro M TG
Audio Device(s) On Board Realtek HD / Logitech G633/G933 Gaming Headset
Power Supply Corsair HX750i
Mouse Logitech G903 and G602 Wireless Gaming | Logitech Proteus Core G502
Keyboard Corsair K70 Cherry Red | Corsair K70 RGB MK.2 Cherry Browns
Software Windows 10 Pro x64 (1809)
As always another awesome guide! Might give this a try on our local computer shop that I manage, to monitor them machines.
 

Solaris17

Dainty Moderator
Staff member
Joined
Aug 16, 2005
Messages
20,537 (4.06/day)
Location
Florida
System Name Venslar
Processor I9 7980XE
Motherboard MSI x299 Tomahawk Arctic
Cooling EK Custom
Memory 32GB Corsair DDR4 3000mhz
Video Card(s) Nvidia Titan RTX
Storage 2x 2TB Micron SSDs | 1x ADATA 128SSD | 1x Drevo 256SSD | 1x 1TB 850 EVO | 1x 250GB 960 EVO
Display(s) 3x AOC Q2577PWQ (2k IPS)
Case Inwin 303 White (Thermaltake Ring 120mm Purple accent)
Audio Device(s) Realtek ALC 1220 on Audio-Technica ATH-AG1
Power Supply Seasonic 1050W Snow
Mouse Roccat Tyon White
Keyboard Ducky Shine 6 Snow White
Software Windows 10 x64 Pro
As always another awesome guide! Might give this a try on our local computer shop that I manage, to monitor them machines.
Go for it! When settings up you could just keep adding databases for each machine! Then you could just change the name of the database in the config file for each machine you put it on. In no time at all you have a dash that shows you the status of the entire fleet!

Remember Grafana also isnt so 2D you can have multiple dashboards, you can have groups of panels that you can collapse (look at my very first pic (its from my production infra!) I have a few collapsed) so it doesnt look so crowded. I personally dont have any talent, but some people make the dashboards look gorgeous.


Don't be afraid to set it up! I'm a terrible teacher so some of my guides are pretty verbose. After you setup the actual graphing server though you can have the basics setup and displaying info in minutes!

all for free!
 
Top