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.
The monitoring pipeline consists of three main components, architected for zero-trust environments:
- 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
firewalldrules and custom SELinux contexts. - VictoriaMetrics: A robust Time-Series Database (TSDB) that reliably scrapes endpoints defined in the
prometheus.ymlconfiguration, optimized for high-availability and low resource overhead. - Grafana: Connects to VictoriaMetrics via the Prometheus API to visualize infrastructure health, providing actionable insights and enabling proactive incident response.
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.
git clone https://github.com/leoleiden/on-premise-monitoring-stack.git
cd on-premise-monitoring-stack
Deploy the monitoring environment using Docker Compose:
docker compose up -d
- Navigate to
http://localhost:3000 - Default Credentials:
admin/admin - Import the provided dashboard from
/dashboards/node-exporter.jsonor use Grafana ID1860.
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']
Leonid Lachmann — DevOps & Platform Engineer
- 💼 LinkedIn: linkedin.com/in/leonid-lachmann
- 🧞♂️ Djinni: djinni.co/q/7273c5f6f8/
- 🐙 GitHub: @leoleiden
- 📧 Email: leocyanid@gmail.com
This project is licensed under the MIT License - see the LICENSE file for details.


