monitoring: platform VictoriaLogs (vlinsert-generic) silently unavailable — logs dropped while HelmRelease is Ready #3181
Description
Describe the bug
On a management cluster the platform monitoring stack (system/monitoring, released as monitoring in cozy-monitoring) reports Ready and its VMClusters (shortterm/longterm) run fine, but VictoriaLogs ingestion is completely broken and all logs are silently dropped.
The observed cause is a vlinsert-generic Service in cozy-monitoring that is a dangling ExternalName pointing at a VictoriaLogs instance that does not exist:
packages/system/cozystack-basics/templates/monitoring-external-services.yamlunconditionally creates threeExternalNameServices incozy-monitoring—vlinsert-generic,vminsert-shortterm,vminsert-longterm— all targeting*.tenant-root.svc.cluster.local.packages/core/platform/sources/monitoring.yamlinstallssystem/monitoringintocozy-monitoringwith nologsStoragesoverride, so the chart default (logsStorages: [{name: generic}]) applies and the release is expected to create a localVLCluster/generic. The VictoriaMetrics operator then owns an insert Service namedvlinsert-generic— the same name and namespace as the ExternalName above.- For metrics this resolves cleanly: the operator's real
vminsert-shortterm/vminsert-longtermClusterIP Services take over the ExternalName aliases. - For logs, the
VLCluster/genericobject was absent (noVLCluster/VLogspresent in the cluster at all), so the operator never created the realvlinsert-genericService. Thecozystack-basicsExternalName therefore stays and points tovlinsert-generic.tenant-root.svc, which does not resolve because the root Tenant hasmonitoring: false(the CRD default) and hosts no VictoriaLogs.
Net effect: fluent-bit ships to vlinsert-generic.cozy-monitoring.svc:9481, the ExternalName CNAME dead-ends in tenant-root, DNS returns no data, chunks fail and are dropped. The monitoring HelmRelease still reports Ready, so the failure is completely silent.
Environment
- Cozystack version: v1.4.2 (code paths also present on current
main, v1.5.0) - Provider: on-prem, bare-metal Talos
To Reproduce
- Install Cozystack with the platform monitoring stack; leave the root Tenant at the default
monitoring: false. - Reach a state where
cozy-monitoring/monitoringisReadybutVLCluster/genericis not present (in the observed cluster the release had gone through theVLogs->VLClustermigration). kubectl -n cozy-monitoring get vlcluster-> none;kubectl -n cozy-monitoring get svc vlinsert-generic->ExternalName->vlinsert-generic.tenant-root.svc.- Inspect fluent-bit logs (below).
Expected behaviour
Platform log ingestion must not fail silently. Either the local VLCluster/generic is reliably present whenever the monitoring release is Ready, or a missing log store surfaces as a not-ready/failing condition instead of logs being dropped. A vlinsert-generic ExternalName pointing at a non-existent tenant-root VictoriaLogs (default monitoring: false) should not be a silent fallback.
Actual behaviour
monitoringHelmRelease:Ready; VMClusters running.- No
VLCluster/VLogsanywhere; no realvlinsert-genericService. vlinsert-genericincozy-monitoringis anExternalName->vlinsert-generic.tenant-root.svc(owned by thecozystack-basicsrelease);tenant-roothas no VictoriaLogs.- All logs dropped.
Logs
[net] getaddrinfo(host='vlinsert-generic.cozy-monitoring.svc', err=1): DNS server returned answer with no data
[output:http:http.0] no upstream connections available to vlinsert-generic.cozy-monitoring.svc:9481
[engine] chunk '...' cannot be retried
Additional context
Two things combine into a silent failure:
cozystack-basicsunconditionally injects avlinsert-genericExternalName intocozy-monitoringthat shadows the platform monitoring's own log-insert Service and points attenant-root, which by default has no VictoriaLogs (monitoring: false).- The
monitoringHelmRelease reportsReadyeven though itsVLCluster/genericis not present, so nothing surfaces the broken log pipeline.
Question for maintainers: is platform VictoriaLogs intended to live locally in cozy-monitoring, or to be centralized in tenant-root (which would require the root Tenant to have monitoring: true)? The unconditional ExternalName -> tenant-root and the local logsStorages: [generic] default appear to pull in opposite directions.
Checklist
- I have checked the documentation
- I have searched for similar issues
- I have included all required information
- I have provided clear steps to reproduce
- I have included relevant logs
Activity
fix(monitoring): surface missing VictoriaLogs and gate dead-end vlins…
fix(monitoring): surface missing VictoriaLogs and gate dead-end vlins…
scooby87 commentedon Jul 6, 2026
Opened #3215 to address this.
The PR tackles the two failure modes from the report as independent, complementary fixes:
Silent
Readywhile the log store is missing — themonitoring-systemHelmRelease now uses apollerwaitStrategywith ahealthCheckExprsgate on theVLCluster'sstatus.updateStatus. During install/upgrade (including theVLogs → VLClustermigration that triggered this in the first place) the release waits for theVLClusterto reachoperationaland goes not-ready (up totimeout) if it never does — instead of reportingReadywith no log store. Mirrors the existing seaweedfs CNPG pattern.Dangling
vlinsert-genericExternalName — thecozy-monitoring → tenant-rootvlinsert/vminsertredirects incozystack-basicsare now created only when the root tenant actually hosts monitoring. The template reads the liveTenant/rootspec.monitoringvialookup(authoritative on a real cluster, so it can't drift from the tenant's real state) and falls back to a new platform valuemonitoring.rootEnabledwhenlookupis empty (dry-run / first render).I also made an empty
logsStoragesa hard render error, so that degenerate config can't silently reproduce the same "Ready with no log store" hole.On the local vs centralized question: the PR commits to the centralized-in-
tenant-rootmodel (which the platform bundle already assumes viaglobal.target: tenant-root) and makes both failure modes loud rather than picking a new topology.Known limitation / follow-up: the readiness gate is evaluated during helm install/upgrade, not on a no-op periodic reconcile — so it covers the migration/upgrade root cause here, but not arbitrary post-install deletion of the
VLCluster(that would needdriftDetection). Also, the legacycozystack.monitoringPackageSource that installs directly intocozy-monitoringcan't carry the gate yet (vendored helm-controller API lacks the fields); it isn't referenced by any active bundle.fix(monitoring): surface missing VictoriaLogs and gate dead-end vlins…
fix(monitoring): surface missing VictoriaLogs and gate dead-end vlins…
fix(monitoring): surface missing VictoriaLogs and gate dead-end vlins…
fix(monitoring): surface missing VictoriaLogs and gate dead-end vlins…
fix(platform): forward backupStorage overrides to the backupstrategy-…
test(monitoring): assert VTCluster/VTSingle readiness-gate entries
feat(monitoring,tenant): shared-central tracing topology (phase 4)
Address review: tracing off by default; defer fail-on-empty guard
feat(monitoring,tenant): shared-central tracing topology (phase 4)
6 remaining items
feat(monitoring,tenant): shared-central tracing topology (phase 4)
Address review: couple tracingCollector.backend to tracingCentral
feat(monitoring,tenant): shared-central tracing topology (phase 4)
Address review: couple tracingCollector.backend to tracingCentral
feat(monitoring): add VictoriaTraces backend + Grafana datasource for…
test(monitoring): assert VTCluster/VTSingle readiness-gate entries
fix(monitoring): default tracing off and defer fail-on-empty guard
lexfrei commentedon Sep 23, 2026
Fixed by #3215: the
vlinsert-genericandvminsert-*services are gated on monitoring being enabled, and the release waits for the VLCluster.feat(monitoring): add VictoriaTraces backend + Grafana datasource for…
fix(monitoring): default tracing off and defer fail-on-empty guard
feat(monitoring): add VictoriaTraces backend + Grafana datasource for…
fix(monitoring): default tracing off and defer fail-on-empty guard