Monitoring Pack Quickstart¶
Why Monitoring Pack?¶
Monitoring Pack is a modular monitoring deployment architecture that allows you to install monitoring components incrementally based on team needs. This solution is particularly useful for:
- Separation of responsibilities: OPS teams can deploy a basic monitoring set (pack-one), while DEV teams can add their own dashboards and alerts (pack-two) without interfering with the shared infrastructure
- Data isolation: Each team can have its own VictoriaMetrics instance for storing metrics while reusing shared exporters
- Configuration flexibility: Ability to configure different Grafana instances with different dashboards and datasources
- Gradual deployment: Start with a minimal baseline (operators only), then add the OPS set, and finally the DEV set as needed
This quickstart covers three components:
- Operators-only baseline – install Monitoring Operator, VictoriaMetrics Operator, and Grafana Operator with nothing except the mandatory exporters.
- Pack-one – extend that baseline with the minimal OPS bundle (vmagent, vmalert, ServiceMonitors, remote write) plus shared exporter configuration.
- Pack-two – provision a DEV-focused monitoring bundle (dedicated VMSingle/VMAgent/VMAlert, Grafana objects, and ingress) that reuses the exporters from pack-one via label selectors.
Follow the sections below in order. The steps assume you already cloned this repository and have kubectl and helm
configured against your target cluster.
Namespaces used
monitoring– all operators (Monitoring Operator, VictoriaMetrics Operator, Grafana Operator);pack-one– pack-one components (VMAgent, VMAlert, VMAuth, VMUser);pack-two– pack-two components (DEV VMSingle/VMAgent/VMAlert/VMAuth, Grafana resources);vmsingle-standalone– a standalone VictoriaMetricsvmsingleinstance for functional checks;
1. Deploy the baseline Monitoring Operator¶
Install the Monitoring Operator with only the mandatory exporters enabled (baseline scenario):
helm upgrade --install qubership-monitoring-operator \
charts/qubership-monitoring-operator \
--namespace monitoring \
--create-namespace \
-f docs/examples/deploy-parameters/monitoring-pack/operators-only-baseline-values.yaml
This chart deploys Monitoring Operator, VictoriaMetrics Operator, and Grafana Operator without any dashboards, datasources, or VictoriaMetrics clusters.
Mandatory exporters installed in the baseline:
- nodeExporter – collects node-level metrics (CPU, memory, disk, network)
- kubeStateMetrics – collects Kubernetes object state metrics (pods, nodes, services, etc.)
- cloudEventsExporter – exports cloud infrastructure events
- versionExporter – exports component version information
These exporters provide basic infrastructure and Kubernetes metrics necessary for cluster monitoring.
2. Deploy a standalone vmsingle (optional test target)¶
Create an isolated namespace and apply the provided manifest to run a minimal VictoriaMetrics vmsingle. This instance
is useful for validating remote write from vmagent:
kubectl create namespace vmsingle-standalone
kubectl apply -f docs/examples/deploy-parameters/monitoring-pack/tests/vmsingle-direct.yaml
3. Deploy test resources for checking Grafana resources managed by the operator (optional test target)¶
This step together with the previous one creates a test GrafanaFolder, GrafanaDatasource, and GrafanaDashboard
for the baseline Grafana deployment managed by Grafana Operator in the monitoring namespace. This allows you to verify
that Grafana Operator correctly manages Grafana resources and binds them to the expected Grafana instance.
kubectl apply -f docs/examples/deploy-parameters/monitoring-pack/monitoring-folder.yaml
kubectl apply -f docs/examples/deploy-parameters/monitoring-pack/monitoring-vmsingle-datasource.yaml
kubectl apply -f docs/examples/deploy-parameters/monitoring-pack/monitoring-test-dashboard.yaml
4. Install pack-one (OPS monitoring bundle)¶
Pack-one acts as the operational baseline: it wires the mandatory exporters to a managed VMAgent/VMSingle pair, ships a starter alerting pipeline, and exposes the endpoints through VMAuth/Ingress so OPS teams can observe the platform even before DEV-focused features (like pack-two dashboards) are installed. The chart delivers:
vmagentconfigured with Remote Write to the testvmsinglevmalertplus default ServiceMonitors for the mandatory exportersvmauthfor authentication and routing (optional)vmuserCRD for user credentials and routing configuration (optional)- Ingress resources for external access (optional)
- RBAC required by VictoriaMetrics Operator
Install it in pack-one namespace:
helm upgrade --install pack-one docs/examples/deploy-parameters/monitoring-pack/pack-one \
--namespace pack-one \
--create-namespace \
-f docs/examples/deploy-parameters/monitoring-pack/pack-one/values.yaml
Shared exporters label: every ServiceMonitor rendered by pack-one automatically receives the
monitoring-pack: "one"label. OverridemonitoringPackLabelinvalues.yamlif you need a different value. Downstream bundles (for example, pack-two) rely on this label to reuse exporters.
4.1. Configure VMAuth and VMUser (optional)¶
By default, VMAuth and VMUser are installed with basic authentication (admin/admin). VMAuth automatically discovers
VMUser resources using the label selector app.kubernetes.io/name: vmuser together with the pack-specific
monitoring-pack label. Routing is automatically configured to route requests to installed components (vmagent,
vmsingle, and vmalert when enabled) based on path patterns.
For pack-one (pack-one/values.yaml):
- Update credentials:
vmUser:
install: true
spec:
username: your-username
password: your-password
# Or use passwordRef for secret-based authentication
# passwordRef:
# name: vmuser-secret
# key: password
- VMAuth configuration (if needed):
vmAuth:
install: true
spec:
selectAllByDefault: false # Default: false - uses userSelector to find VMUser
# userSelector: {} # Default: matches app.kubernetes.io/name: vmuser + monitoring-pack: one
# userNamespaceSelector: {} # Default: empty (searches in all namespaces)
For pack-two (pack-two/values.yaml):
By default pack-two deploys vmuser-dev with admin/admin credentials and labels that limit VMAuth discovery to
pack-two users only:
vmUser:
install: true
spec:
username: your-username
passwordRef:
name: vmuser-secret
key: password
# or use bearerToken / tokenRef for API access tokens
vmAuth:
spec:
# Optional: broaden discovery to multiple monitoring packs
userSelector:
matchLabels:
app.kubernetes.io/name: vmuser
monitoring-pack: "two"
4.2. Configure Ingress (optional)¶
To enable Ingress resources:
For pack-one (pack-one/values.yaml):
ingress:
install: true
vmAuth:
host: vmauth.example.com
ingressClassName: traefik # default controller in the quickstart cluster
servicePort: 8427
# Optional: TLS configuration
# tlsSecretName: vmauth-tls
vmAgent:
host: vmagent.example.com
ingressClassName: traefik
servicePort: 8429
vmSingle:
host: vmsingle.example.com
ingressClassName: traefik
servicePort: 8429
vmalert:
host: vmalert.example.com
ingressClassName: traefik
servicePort: 8080
For pack-two (pack-two/values.yaml):
ingress:
install: true
vmAuth:
host: vmauth-dev.example.com
ingressClassName: traefik
servicePort: 8427
vmAgent:
host: vmagent-dev.example.com
ingressClassName: traefik
servicePort: 8429
vmSingle:
host: vmsingle-dev.example.com
ingressClassName: traefik
servicePort: 8429
vmalert:
host: vmalert-dev.example.com
ingressClassName: traefik
servicePort: 8080
grafana:
host: grafana-dev.example.com
ingressClassName: traefik
servicePort: 3000
Access services:
- pack-one:
http://vmauth.example.com,http://vmagent.example.com,http://vmsingle.example.com,http://vmalert.example.com - pack-two:
http://vmauth-dev.example.com,http://vmagent-dev.example.com,http://vmsingle-dev.example.com,http://vmalert-dev.example.com,http://grafana-dev.example.com - If TLS is configured, use
https://instead ofhttp://
Note: If VMAuth is enabled, access vmagent, vmsingle, and vmalert through VMAuth using the configured credentials.
5. Install pack-two (DEV monitoring bundle)¶
Pack-two targets development teams that need their own VictoriaMetrics + Grafana stack while still scraping the shared exporters delivered by pack-one. The chart installs:
- VMSingle – a DEV-only VictoriaMetrics cluster (
vmSingle) - VMAgent – collects metrics from both
monitoring-pack=oneandmonitoring-pack=twoServiceMonitors - VMAlert – rules and alert delivery scoped to DEV workloads
- VMAuth / VMUser (optional) – authentication and routing facade for DEV access
- ServiceMonitors – pack-two specific exporters (each labeled
monitoring-pack: "two") - Grafana objects – datasource, example dashboards, and alerting rules bound to the DEV VMSingle
5.1 Reusing pack-one exporters¶
- Ensure pack-one ServiceMonitors carry
monitoring-pack: "one"(this is automatic unless you overridemonitoringPackLabel). - Pack-two's VMAgent is rendered with
serviceScrapeSelector.matchExpressionsthat includes both"one"and"two", so it automatically discovers the shared exporters alongside its own. - Each pack still keeps an isolated storage/alerting stack—only the scrape configuration is shared.
How ServiceMonitors are used now:
- In pack-one, ServiceMonitor objects are created only for the four mandatory exporters from the baseline
(
kube-state-metrics,node-exporter,cloud-events-exporter,version-exporter). They live in a single, fixed namespace (by defaultmonitoring) and are labeled withmonitoring-pack: "one", so both pack-one and pack-two can safely reuse them. - In pack-two, the chart does not recreate these mandatory ServiceMonitors. Instead, it reuses the ones from pack-one via label selectors and provides a simple template for adding additional ServiceMonitors for DEV-specific exporters when needed.
5.2 Install pack-two¶
Note: Pack-two assumes VictoriaMetrics Operator is already running (from baseline/pack-one) in the
monitoringnamespace. If your operator lives elsewhere, updatevmOperatorNamespaceindocs/examples/deploy-parameters/monitoring-pack/pack-two/values.yamlbefore installing.
helm upgrade --install pack-two docs/examples/deploy-parameters/monitoring-pack/pack-two \
--namespace pack-two \
--create-namespace \
-f docs/examples/deploy-parameters/monitoring-pack/pack-two/values.yaml
5.3 Grafana and Dashboards¶
5.3.1 Brief explanation of how Grafana Operator works¶
Grafana Operator manages the lifecycle of Grafana instances and related resources (dashboards, datasources, folders, alerting rules) through Custom Resources (CR). The operator monitors changes in these resources and synchronizes them with actual Grafana instances.
Main components:
- Grafana Operator Deployment – deployed in the
monitoringnamespace, manages all Grafana resources - Grafana CR – defines a Grafana instance (Deployment, Service, ConfigMap, etc.)
- GrafanaDashboard CR – defines a dashboard that will be imported into Grafana
- GrafanaDatasource CR – defines a datasource for connecting to metrics storage (e.g., VMSingle)
5.3.2 Cross-namespace configuration¶
Grafana configuration resources (dashboards, datasources, folders, alerting rules) can be located in different namespaces than where the Grafana instance is deployed. This allows teams to manage their dashboards independently while using a shared Grafana instance.
To connect resources from another namespace:
- Set
allowCrossNamespaceImport: truein the resource'sspec(GrafanaDashboard, GrafanaDatasource, GrafanaFolder, or GrafanaAlertRuleGroup):
-
Configure
instanceSelectorto specify which Grafana instance to connect to (see section 5.3.3) -
Ensure Grafana Operator tracks the namespace where resources are located (see section 5.3.3)
5.3.3 Configuring resource filtering¶
Filtering which dashboards and other resources will be connected to a Grafana instance happens at two levels:
Recommended approach used in this quickstart:
- At the operator level: Specify
watchNamespacesin Grafana Operator configuration to limit tracked namespaces:
# In operators-only-baseline-values.yaml
grafana:
operator:
watchNamespaces: "" # Operator tracks all namespaces, binding is controlled by instanceSelector
- At the resource level: Use a simple label in
instanceSelector.matchLabelsfor binding:
# In dashboard/datasource
spec:
allowCrossNamespaceImport: true
instanceSelector:
matchLabels:
monitoring-pack: "two"
And ensure the Grafana CR has the corresponding label:
Important: If
watchNamespacesis left empty (""), the operator will track all namespaces in the cluster. In this case, resource selection will occur only byinstanceSelector. This may impact performance in loaded systems as the operator will process more resources.
Interaction of instanceSelector and allowCrossNamespaceImport:
- Empty
instanceSelector: {}(without cross-namespace): the resource is applied only to Grafana instances in the same namespace as the dashboard/datasource (per Grafana Operator behaviour). - Empty
instanceSelector: {}withallowCrossNamespaceImport: true: the operator applies the resource to all Grafana instances in the namespaces specified inwatchNamespaces(WATCH_NAMESPACE). So a pack-two dashboard withinstanceSelector: {}andallowCrossNamespaceImport: truewill appear in both baseline Grafana (monitoring) and pack-two Grafana. To limit dashboards to a single instance, use an explicitinstanceSelector(e.g.matchLabels: monitoring-pack: "two"). allowCrossNamespaceImport: false: the resource is limited to Grafana instances in the same namespace as the dashboard/datasource. UseallowCrossNamespaceImport: trueonly when the dashboard/datasource and the Grafana instance are in different namespaces.
Additional capabilities (for advanced scenarios):
If the recommended approach is insufficient, additional filtering mechanisms are available that can be combined:
- At the operator level: Three operator parameters:
watchNamespaces– comma-separated list of namespaces (e.g.,"monitoring,pack-two")watchNamespaceSelector– label selector for dynamic namespace discovery (e.g.,"monitoring.enabled=true")watchLabelSelectors– label selector for filtering CRs by their labels (e.g.,"environment=production")
For more details, see the Grafana Operator Helm chart documentation.
- At the Grafana instance level: The
instanceSelectorparameter in resources (GrafanaDashboard, GrafanaDatasource, etc.): matchLabels– exact label matchingmatchExpressions– flexible expressions for label matching (In, NotIn, Exists, DoesNotExist)
For more details, see the Grafana Operator v5 documentation.
5.3.4 Separate Deployment for Grafana instances¶
Monitoring Pack implements the ability to create separate Grafana instances for different teams or environments. Each Grafana instance has its own Deployment and operates independently, while all instances are managed by a single Grafana Operator.
Example:
- Baseline Grafana (namespace
monitoring): used by the OPS team, test resources bind to it viaapp.kubernetes.io/instance: grafana-monitoring - Pack-two Grafana (namespace
pack-two): used by the DEV team, dashboards/datasource bind to it viamonitoring-pack: "two"
Each instance can have its own dashboards, datasources, and settings, while they are isolated from each other at the Deployment level.
6. Access services¶
If Ingress is enabled, access services through the configured hosts:
- Baseline Grafana:
https://grafana.example.com - Pack-one VMAuth:
http://vmauth.example.com(authenticate with credentials fromvmUser.spec, default:admin/admin) - Access VMUI through VMAuth:
http://vmauth.example.com/vmui/ - Access vmagent through VMAuth:
http://vmauth.example.com/targets - Pack-one VMAgent:
http://vmagent.example.com(or through VMAuth if enabled) - Pack-one VMSingle:
http://vmsingle.example.com(or through VMAuth if enabled) - Pack-one VMAlert:
http://vmalert.example.com(or through VMAuth if enabled) - Pack-two VMAuth:
http://vmauth-dev.example.com - Pack-two VMAgent:
http://vmagent-dev.example.com(or through VMAuth if enabled) - Pack-two VMSingle:
http://vmsingle-dev.example.com(or through VMAuth if enabled) - Pack-two VMAlert:
http://vmalert-dev.example.com(or through VMAuth if enabled) - Pack-two Grafana:
https://grafana-dev.example.com
7. Validate the data flow¶
- vmagent targets – open the vmagent UI via Ingress →
/targetsand check that all mandatory exporter targets are in theUPstate.

- vmsingle query – open the vmsingle UI via Ingress →
/vmui/→Query, typeup, run the query, and confirm that vmagent's scraped metrics arrive in vmsingle (results should include the exporters you enabled).

- VMAuth routing (if enabled) – access vmagent or vmsingle through VMAuth using the configured credentials
(
admin/adminby default). - Access VMUI:
http://vmauth.example.com/vmui/ - Access vmagent targets:
http://vmauth.example.com/targets - Access vmsingle query:
http://vmauth.example.com/vmui/query
The VMAuth service automatically routes requests to the appropriate backend (vmagent or vmsingle) based on the path
patterns defined in VMUser's targetRefs. The root path / is included to support VMUI access.