Repository navigation
Infra alers in tenants monitoring #2775
Copy link
Copy link
Open
Labels
area/monitoringIssues or PRs related to the monitoring stack (vlogs, vmstack, grafana, workloadmonitor)Issues or PRs related to the monitoring stack (vlogs, vmstack, grafana, workloadmonitor)kind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a bugpriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to completeImportant over the long term, but may not be staffed and/or may need multiple releases to completetriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Description
Describe the bug
In tenant alerta i see 5 alerts:
- CDI operator is down
- Kubelet has disappeared from Prometheus target discovery.
- KubeAPI has disappeared from Prometheus target discovery.
- KubeControllerManager has disappeared from Prometheus target discovery.
- KubeScheduler has disappeared from Prometheus target discovery.
All of alerts shows that no infra metrics in tenant VM. As expected.
Environment
- Cozystack version: any
- Provider: any
To Reproduce
Steps to reproduce the behavior:
- Add tenant with monitoring
- Go to tenant alerta -> /alerts
- Look at alerts table
Expected behaviour
No infra alerts deployed in tenants monitoring
Actual behaviour
https://github.com/cozystack/cozystack/blob/main/packages/system/monitoring-agents/templates/alerts.yaml
no custom logic for infra and tenant monitoring.
Logs
Additional context
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/monitoringIssues or PRs related to the monitoring stack (vlogs, vmstack, grafana, workloadmonitor)Issues or PRs related to the monitoring stack (vlogs, vmstack, grafana, workloadmonitor)kind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a bugpriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to completeImportant over the long term, but may not be staffed and/or may need multiple releases to completetriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on

Activity
dosubot commentedon Jun 1, 2026
This is a valid issue. The monitoring-agents package currently deploys all alert rules globally without distinguishing between infrastructure and tenant contexts [1]. The alerts for Kubelet, KubeAPI, KubeControllerManager, and KubeScheduler are defined in the
alerts/directory and included unconditionally via a Helm glob pattern.This is the same class of problem that was addressed for dashboards in issue #2194 [2] — infrastructure dashboards were scoped to
tenant-root/cozy-monitoringnamespaces via conditional rendering in PR #2197 [3]. However, the same scoping was never applied to the alert rules.A similar fix could be applied to
alerts.yamlby wrapping infrastructure-specific alert files in a namespace conditional, following the established dashboard pattern [4]:This would require splitting the alert files in the
alerts/directory into infrastructure-specific (kubelet, kube-apiserver, kube-controller-manager, kube-scheduler) and workload-generic (apps, storage, node resources) groups, then conditionally including only the infrastructure alerts when deploying totenant-rootorcozy-monitoring.To reply, just mention @dosu.
Share context across your team and agents. Try Dosu.
dvc commentedon Jun 1, 2026
see also vmalert setting
https://docs.victoriametrics.com/operator/resources/vmalert/#rules
related to discussion about grafana dashboards. IMHO ))
fix(monitoring): scope tenant VMAlert to its own rule namespaces