In this tutorial, I will talk about Prometheus and Grafana. You will learn to install both on CentOS/RHEL and understand how to use Prometheus and Grafana

running a lemmy instance has learned me a lot about devops already!

I love playing around with this, the lemmy instance was a great reason. lemmyfly.org doesn’t have a lot of traffic yet, I think it can handle some more. Currently running on 2 vcpu/4gb ram.

After chatting to my devops colleague at work I wanted to set up a Grafana dashboard with metrics on the server. Seems it’s pretty pretty doable!

  • I installed prometheus node_exporter on my lemmy server
  • I created a second server at my VPS. Very cheap, and don’t think I’ll be running the Prometheus/Grafana 24/7 so I’ll just create a snapshot of it, destroy the server and re-create when wanted
  • Created an internal private network so the instances can communicate without exposing ports to the public
  • Installed Prometheus on the new prometheus server
  • Installed Grafana
  • log in to Grafana, admin:admin then change password
  • Go to the Grafana home dashboard, click on + sign and click on Import. In Import via grafana.com, put the dashboard id 1860 (preset for all prometheus node_exporter metrics) and click on Load.
  • Done!

Last 2 hours in the garden with a beer on the side, WFH FTW

Very cool! What’s bandwidth and system consumption been like so far?

@majorswitcher@lemmyfly.org
creator
link
fedilink
English
11Y

actually I did delete the server (after creating a snapshot of it) a week or so ago. But this morning I wanted to check lemmyfly.org, couldn’t load the page. Checking my Hetzner dashboard I noticed CPU was spiked at 200%?! It did drop again though, but apparently had last for 2-3 minutes. But prometheus was down, so no graphs apart from the hetzner ones. I doesn’t relate to network traffic spikes, so I don’t know what caused it. I’ve started the prometheus server again (that snapshot was really useful :) ) and will leave it on for a couple of months now.

current system consumption:

I might need to get an extra volume for storage, Lemmy is starting to eat up the root filesystem… Does anyone know how I re-configure Lemmy to look at a different volume for storage ?

Create a post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

  • 1 user online
  • 279 users / day
  • 589 users / week
  • 1.34K users / month
  • 4.55K users / 6 months
  • 1 subscriber
  • 3.5K Posts
  • 70K Comments
  • Modlog