Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lightweight On-Premise Monitoring Stack

Docker Grafana VictoriaMetrics OracleLinux

Overview

This repository contains an Infrastructure as Code (IaC) setup for a high-performance, secure observability stack designed for hybrid and on-premise infrastructure. It utilizes VictoriaMetrics as a highly efficient, scalable drop-in replacement for Prometheus, capable of handling large-scale metrics with lower memory/CPU consumption, paired with Grafana for enterprise-grade data visualization.

The stack is configured to scrape hardware and OS metrics via Node Exporter from both the local Docker host and remote on-premise virtual machines (e.g., Oracle Linux/RHEL), ensuring compliance with strict corporate firewall and SELinux policies.

Architecture

The monitoring pipeline consists of three main components, architected for zero-trust environments:

  1. Node Exporter: Deployed as a Docker container (for local host metrics) and as a hardened Systemd service (for remote on-premise servers). Configured to operate seamlessly alongside strict firewalld rules and custom SELinux contexts.
  2. VictoriaMetrics: A robust Time-Series Database (TSDB) that reliably scrapes endpoints defined in the prometheus.yml configuration, optimized for high-availability and low resource overhead.
  3. Grafana: Connects to VictoriaMetrics via the Prometheus API to visualize infrastructure health, providing actionable insights and enabling proactive incident response.

Repository Structure

  • docker-compose.yml - Defines the containerized infrastructure (VictoriaMetrics, Node Exporter, Grafana).
  • prometheus.yml - Defines scraping jobs and target endpoints (Local & Remote IPs).
  • /dashboards/ - Exported JSON models for pre-configured Grafana dashboards.

Quick Start (Deployment)

1. Clone the repository

git clone https://github.com/leoleiden/on-premise-monitoring-stack.git
cd on-premise-monitoring-stack

2. Start the stack

Deploy the monitoring environment using Docker Compose:

docker compose up -d

3. Access Grafana

  • Navigate to http://localhost:3000
  • Default Credentials: admin / admin
  • Import the provided dashboard from /dashboards/node-exporter.json or use Grafana ID 1860.

Adding Remote On-Premise Servers (e.g., Oracle Linux 9)

To monitor additional on-premise servers, install Node Exporter on the target machine as a systemd service and open the required firewall ports:

# On RHEL/Oracle Linux target:
sudo firewall-cmd --add-port=9100/tcp --permanent
sudo firewall-cmd --reload

Then, add the target IP to prometheus.yml and restart the VictoriaMetrics container:

static_configs:
  - targets: ['node-exporter:9100', '192.168.8.2:9100']

Screenshots

Oracle Node Metrics Local Node Metrics VictoriaMetrics Targets

👨‍💻 Author

Leonid Lachmann — DevOps & Platform Engineer

⚖️ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Infrastructure as Code (IaC) setup for a lightweight on-premise monitoring stack (Oracle Linux) using VictoriaMetrics, Grafana, and Node Exporter

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors