Habr•October 26, 2026•🇷🇺Translated from Russian

Multi-Tenancy Isolation in VictoriaMetrics, VictoriaLogs and Grafana: Building Client Separation in a Shared Stack

Voltir provides monitoring for servers, 1C systems and databases as both a cloud service and on-premise installation. In the cloud all clients share one stack containing vmstorage, vmselect, vminsert, VictoriaLogs, Grafana, vmalert, Alertmanager and Postgres. Separate stacks per customer would require ten full copies of caches and ten update cycles per release, so the company keeps a single stack and implements isolation manually at each layer.

Every tenant receives a numeric account_id. VictoriaMetrics routes writes and reads through paths such as /insert/<account>/… and /select/<account>/…, while VictoriaLogs and VictoriaTraces read the account from the AccountID header. Nginx sits in front and calls the platform API via auth_request to determine the tenant from the Bearer token before forwarding requests. Storage endpoints are never exposed externally.

Each tenant has its own Grafana organization whose data sources are created by the platform with the account ID embedded in the URL or secureJsonData header. Users receive at most the Editor role; Org Admin is deliberately withheld because an administrator could change the data-source URL or header and read another tenant’s metrics or logs. The platform explicitly checks role values and rejects anything higher than Editor for tenant users.

Write authorization compares the account supplied in the URL with the account belonging to the token; a mismatch returns 403. For logs and traces the platform returns the correct account in the auth_request response and nginx overwrites any client-supplied header. VictoriaLogs only understands the AccountID header and silently ignores X-Tenant-ID, writing everything to account 0 if the header is missing.

A single vmalert instance reads all rule files. Each tenant’s rules file contains groups narrowed by an extra_filters clause containing the tenant’s account ID. VictoriaMetrics appends this filter to every selector, preventing a rule from seeing data outside its tenant. Global rules without filters were removed after one self-test rule began scanning thousands of deleted tenants and consuming excessive CPU.

During testing a rule containing the Russian string “пять минут” instead of a valid duration value caused vmalert to reject the entire rules directory on reload. Subsequent changes to other tenants stopped being applied, and a container restart would have left alerting completely disabled. The platform now validates durations, severity levels and Go templates before writing rule files, performs atomic replacement under lock, and reverts on reload failure.

Deleted tenants left behind rule files, Grafana organizations, users and time series. Over several months the team accumulated 196 orphaned rule files, 705 phantom Grafana users and more than three thousand stale accounts visible in /admin/tenants. A single cleanup module now removes every external artifact when a tenant is deleted, and an hourly reconciliation job compares files, organizations and storage accounts against the database, failing CI if any residue remains.

Resource isolation remains incomplete. All tenants share memory, CPU and disk. Heavy parallel queries from one dashboard or high-cardinality series from a single Kubernetes cluster can still trigger OOM events that affect every tenant. Per-container memory limits, reduced cache sizes in VictoriaLogs and request queuing mitigate but do not eliminate the shared-resource risk.

Related articles

AntiMalware•Other

The Real Costs of Using Claude and GPT for Russian Businesses Exposed

Accessing generative AI models like Claude and GPT has become straightforward for Russian companies, yet calculating their true expenses remains complex. Hidden factors such as intermediary commissions, currency conversion rates, taxes, and the often-overlooked costs of model reasoning tokens can double or triple initial estimates. Founder Vitaly Nagay of the Heli service analyzed these financial and organizational risks for Russian firms relying on foreign AI providers. In one example, a support department processing 20,000 monthly queries sees costs rise from $240 to $480 when reasoning tokens are included. Nagay recommends evaluating providers by dividing actual ruble charges by the model's official dollar pricing to reveal hidden markups. Additional concerns involve data control, document compliance, and access history when employees use personal subscriptions. Companies are advised to verify billing details, data storage policies, and issue dedicated API keys with spending limits before procurement.

Securitylab•Other

Decoding Windows 10 and 11 Error Codes: How to Identify Root Causes and Fix System Failures

Windows frequently reports problems using codes that seem aimed only at developers, leaving users to decipher issues like 0xc000007b, 0x800f081f, and Kernel-Power 41 on their own. The article explains that error codes typically describe failed operations rather than underlying causes, such as access denials stemming from permissions, security software conflicts, or corrupted components. It provides a structured diagnostic approach starting with version checks via winver, context analysis of when errors occur, and preservation of critical data before troubleshooting. Detailed tables cover common codes across update, application launch, driver, and boot failure categories, while sections address Blue Screens of Death, Windows Update problems, driver errors like Code 43, and event log analysis. Recovery methods including DISM, SFC, safe mode, and point-in-time restore are outlined with warnings against risky generic fixes. The guide emphasizes sequential diagnosis to avoid data loss and notes the end of Windows 10 support.

Habr•Other

Prod is Down: Free gVisor-Based Simulator Gives Strangers Root Access for Realistic Linux Incident Training

A Russian systems administrator has launched Prod is Down, a free online platform that lets users practice real incident response by granting them root consoles on deliberately broken Linux servers. The tool currently offers 13 scenarios covering PostgreSQL failures, OOM Killer events, full disks, expired certificates, nginx 502 errors, inode exhaustion, DNS issues, and open file limits. Each exercise runs inside gVisor sandboxes with strict resource limits, internal-only networking, and automated verification that checks service health rather than player commands. The author implemented an emulated systemd in Python so trainees can use familiar systemctl and journalctl commands without running a real init system. Multiple layers of isolation, including overlay filesystem tweaks and size monitoring, prevent abuse while still allowing sudo and realistic debugging. The platform records three random variants per scenario so memorized fixes from previous runs do not work on subsequent attempts.

Habr•Other

Home Lab Guide: Deploying Active Directory, Windows 7 Client and ELK Stack for Security Logging

A detailed tutorial walks readers through building an isolated VirtualBox lab featuring a Windows Server 2019 domain controller with DNS and DHCP, a Windows 7 client joined to the domain, and an ELK stack running Elasticsearch, Logstash and Kibana 9.4.2. The guide covers creation of organizational units, Group Policy Objects for advanced auditing, and configuration of Winlogbeat 7.17 to forward Security, System and Application logs to Logstash. Special attention is given to common pitfalls such as missing GPO extension attributes that prevent audit policies from applying and memory constraints when running the full ELK stack on limited RAM. The author emphasizes that Windows 7 is unsupported and should only be used in isolated lab networks. All steps are provided with exact PowerShell commands, netplan configurations, and Logstash pipeline examples suitable for a 192.168.100.0/24 NAT network.