Grafana PLAG Starter Kit

Modern, but complex and highly customizable

The IT industry hasn’t deviated too much from the “fundamentals” of basic Network Monitoring Systems (NMS); software projects like Cacti and Librenms have been a staple for organizations that want to get good infrastructure visibility for decades.

The “default option” for NMS excels at providing basics (CPU, Memory/Disk monitoring, Interface statistics) but it struggles in a few areas:

To solve this problem for my home lab, I’ve set a few objectives:

How it Works

Diagram

Grafana’s ecosystem may feel a little messy, but it’s just how microservices are designed to function. Each service focuses on delivering a specific function instead of trying to do it all.

The IaC (Ansible playbooks, Jinja templates, Docker compose files) here build this out:

Deployment

To build this, I created a new host inventory tag in Netbox, and used the linked inventory. Here is the code:

The Ansible playbook delivers all configurations, adds relevant repositories and installs packages all in one shot.

This took a lot of trial and error to build, and it thoroughly validated my choices to manage the deployment with CI/CD. Here are some of the gotchas I ran into along the way:

After Deployment, it’s still complicated

Here’s where I think most people get stuck with Grafana - there is a dizzying array of different, all highly valuable metrics and none of the monitoring is “canned”; all dashboarding/alerting/presentation must by assembled manually.

Here are the most useful metrics from what I’ve seen so far:

Security

All of this network traffic is cleartext, which with some exporters (json_exporter in particular) is a problem, because it will be sending or storing credentials in cleartext.

If confidentiality is not a concern, a way to enforce some level of hardening would be to implement a firewall (ufw, AWS Security Groups, Azure Network Security Groups) only allowing Prometheus access to the Alloy or exporter agents. This is very simple and should be considered the minimum.

If confidentiality is a concern, each component will need to implement TLS, and it’s done differently:

Takeaways

PLAG (Prometheus, Loki, Alloy, Grafana) is an excellent stack to build extensible and comprehensive monitoring for a platform, but it doesn’t make it easy. Commercial products excel at “easy button” deployments where you don’t really need to comprehensively learn your environment to monitor it effectively, and none of that is provided here.

If the Grafana ecosystem is on your shortlist, I’d recommend having an honest conversation about how much time is available to invest in monitoring; Grafana is high-effort and high-reward. All of this data is worth it, but it will take some work to get things usable.