Using Proxmox METRICS In Your Homelab

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so as an engineer one thing I absolutely love is data there's nothing better than some good hard numbers to set some ground truths for project so today I'm going to set up proxmox metrics logging to influxdb and view it in grafana on a beautiful dashboard this will help me look at how many resources all of my VMS and containers are using so I can better balance my proxmox cluster decide what Hardware I need to buy what Hardware I can shut down if I can move services around all that kind of good stuff having this data is really important if you want to expand or scale your home lab it also looks really cool too so hop in with me on this adventure so let's get this software installed we have to install influxdb our time series database server grafana our graph and we need to configure all of those so let's hop over I'm going to use a standard Debian 12 container lxc container in proximox you can use w11 if you want Debian 12 is the latest so I'm gonna use it thank you does not need any special permissions unprivileged is fine we're going to put our influx DB database on the root partition so you'll need enough space for influx the data isn't massive we're logging at a relatively low rate so I don't get the 32 gigs so both influx and grafana have repositories available for Debian so we can add that to our sources.list and add our signing key then we can use apt update to keep these packages up to date each of them have a slightly different way of Distributing their signing key I have all the commands in my blog post if you just want to copy and paste that read through them make sure you like them so I'm just going to copy and paste both ones from influx and grafana and that'll get them installed so basically they distribute their key in a way that needs to be de-armored and then we add it to the sources.list and install influx and for grafana they distribute the key directly we just download it and then add it to our sources that list install grafana [Applause] so now that the install is done we need to configure both of them through the web UI both of them have the default port and default password for influx it's Port 8086 and for grafana it's port 3000. so influx says it's beautiful getting started guide where we can set up our username and password this is going to become our admin account that we use to create buckets and stuff later so instead it does something good [Applause] so while we're in influx let's create an API user so proxmock can push data to its bucket and a bucket for proximox to push to [Applause] and under API tokens we're going to generate an API token that's custom and give it access to read write to only the proxbox bucket [Applause] so now it's given us an API key and it's never going to tell it to us again so you have to take this and copy it over to proximox so proxmox can push its metrics into influx Data Center metric server add inflex DB so it defaults to UDP which is used for influx DB1 since we're using inflex db2 we can use HTTP on Port 8086 then we need to set the organization the bucket and the API token [Applause] so now that proxmox is pushing data to influx and influx is all set let's set up grafana it's going to default to http Port 3000 and the default username and password are admin and admin [Applause] so grafana is extremely powerful so to get started we need to set up a data source that points to our influx DB server and then we can add a dashboard that shows a proximox system I'm not going to go through the full setup of how to set up a dashboard in this video but there's some really good examples online I'll show you how to import them so influx DB for query language and influx db2 usually we want to use flux the more modern language you can still use the older influx ql if you have a need for it I'm going to set up flux in this video you can obviously set your own stuff up foreign [Applause] [Applause] I'm going to create a new API token again this one's going to have access to all of our buckets but read only since grafana doesn't need to write any data [Applause] so now that grafana is able to connect let's add our dashboard so this point I gave proxmox a few days to push his log files to influxdb you could do this right away but you wouldn't have very much data in the log which is fine I guess so let's add a dashboard to grafana so we can see all that data I've collected so coming over here I chose this beautiful dashboard that somebody already made for proximox written in flux so it can use influx db2 we can go over here and add it so we could say import dashboard we need the URL or we can import the Json file so we could say copy ID to clipboard and paste it now it's going to go onto grafana find it it's going to name its proximox flux we can just call that proxmox let's click our data source so approxbox is going to be created in the last step so we will say import so data source is proxmox a bucket is default that needs to be proxbox and server right here is my only server so here's what we have two cores not a whole lot of loads a whole lot of memory yeah that looks about right so we got some storage pools some VMS some containers we can see what our CPU usage looks like so it's honestly really low memory we're using about half of it so now to save this it defaults to last six hours we can change this to wherever we want so we want 24 hours when we hit the save button here we probably want to say save current variable values that would be over here the data source bucket and server and you can also say save current time ranges if you want as well and whenever you make a change you'll have to go hit save button so this will mean it'll default to 24 hours maybe on a default into seven days you'll see I've only been logging for about two days you can save that up here save current time range as a default or not whatever whatever you like so now that I have this dashboard set up and running I can add this to all of my servers all of my servers can push to it I can look at all in the same grafana instance that'll let me get a feel for how many resources a lot of my systems are actually using so when I go to build the three node cluster that I'm working towards I won't be oversizing the hardware and using too much power things like that so if you like this video don't forget to Thumbs Up And subscribe all that good stuff I have a Discord server link down below if you want to share your proximox dashboards or your grafana dashboards I would love to hear about it um yeah and as always I'll see you on the next adventure
Info
Channel: apalrd's adventures
Views: 4,477
Rating: undefined out of 5
Keywords:
Id: -RCE1dQUnEQ
Channel Id: undefined
Length: 8min 12sec (492 seconds)
Published: Fri Jul 07 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.