[Guide] InfluxDB / Grafana on Windows

Going to slowly add to this as we go. Hopefully will be a full guide by the end.

1. Install InfluxDB (we will use the latest version)

The Influx Docs are good, follow this guide: Install InfluxDB | InfluxDB OSS 2.4 Documentation

  • Select the Windows option at the top
  • You will need to get the CLI executable as well and set that up.
  • For the Set up InfluxDB section, do the UI Setup.
    • Do not worry about creating new tokens yet
    • For Oganization I am using "home"
    • For Bucket I am using "hubitat_events"
  • (Optional) Set up and use the influx CLI - Recommended for later use in setting up the compatibility mappings
  • Bookmark the login page so you have it handy later

DO NOT delete the Operator Token, I did this by mistake once, not fun. I have since renamed it to prevent future blundering.
image

You should now be able to run Influx from the command line (we will setup as a service later)

2. Install Grafana (latest version)

Grafana docs are also good: Install on Windows | Grafana documentation

  • Get the latest Open Source (OSS), Windows Installer version when you go to download
  • Bookmark the login page so you have it handy later

After Installing you can then follow up with the Getting Started to log in and setup your password: Build your first dashboard | Grafana documentation

This should setup Grafana as a system service so you are all set and it should launch itself in the background on reboot.

7 Likes

Jeff, appreciate you putting this together. I started to install InfluxDB and Grafana today along with the InfluxDB Logger in HE. I'm running into two noob issues that I can't seem to find answers to....

  1. After I installed InfluxDB, I went to install the Influx CLI. It installed no problem. After installation, there are instructions to "Provide required authentication credentials". The instructions give you the commands (clear enough), but not where to issue them. Doesn't seem to work from Powershell or from the windows command prompt. Confused about where to issue these commands?

  2. Recognizing the Influx CLI is optional, I pushed ahead anyway. I setup the logger app in HE,--the log shows this error: Values of types "BOOLEAN" and "INTEGER" are not comparable; SQL statement: SELECT COUNT() FROM EVENT_SUBSCRIPTION WHERE FILTER = ? AND HANDLER = ? AND INSTALLED_APP_ID = ? AND SUBSCRIBED_INST_APP_ID = ? [90110-214] Query: SELECT COUNT() FROM EVENT_SUBSCRIPTION WHERE FILTER = ? AND HANDLER = ? AND INSTALLED_APP_ID = ? AND SUBSCRIBED_INST_APP_ID = ? Parameters: [0, handleAppTouch, 1921, 1921] on line 876 (method updated). I suspect I'm doing something wrong on the Influx side with loading a data source.

Sorry for the noob questions. I'll take any pointers you've got!

Since no one was showing interest I had not added to this. I will have to follow it along myself and see how it goes. I will see if I can get into to within the next couple of days.

1 Like

I did this with Docker containers, one for Grafana, that I had from another thing I play with (Tesla logging), and another for InfluxDB. This provides a lot more flexibility when it comes to modifying settings, and backup. My primary Win11 machine that's on 24/7 isn't required to run the containers. I can restore my backups to any of my machines, NAS, etc, without dealing with config/install junk.

I used to run both on Windows directly, and it just caused issues as things changed over the years.

1 Like

I'm interested in this, It's just been towards the bottom of the to-do list. I always willing to be a guinea pig if you are ok working with me..

Would you be interested in running it on Docker for Windows? As I look into this more, setting up both apps and then configuring Influx to run as a system service is a hassle in windows. Now that I have experience with docker, a single docker compose file could install and launch both applications with minimal effort. It is also cross-platform and could work on any system with Docker.

1 Like

Do you know how you want it to run. There are a ton of ways to get this stack potentially. Some are much simpler to setup then others.

I know he wants to run it on Windows. I really think Docker is going to be the way to go for an "easy" install. Not a pre-compiled image but just a pre-configured stack/compose file. I was looking at the options for Influx and you can specify in a compose file the default login / org and bucket. Might be able to pre-load Grafana with a data source pointing to Influx as well, need to check into that. That would make it a very simple install.

If people do not want to use docker honestly both Influx and Grafana have really good docs so its not hard to figure out on your own.

1 Like

I've never even looked at Docker, but Im willing to learn something new if you are game to guide me along in that too.

Ok so I am investigating Docker and just about have it figured out. Can pre-configure most of it with a docker-compose file. The one side effect of using Docker on Windows is by default it will allocate 2Gb of RAM to the WSL virtual system that runs the linux for Docker. Sort of makes me want to flop back to just doing a regular install.