How to check application monitoring
Build the image and deploy demo-app, Service and VMServiceScrape.
When application monitoring is configured on a cluster, you can check its operation using any application with metrics in the OpenMetrics format. The instructions use a demo application from VictoriaMetrics.
Before checking, make sure that application requirements are met and VMSingle and VMAgent are deployed in user-monitoring - see application monitoring setup.
What is created in demo-app
| Object | Namespace | Purpose |
|---|---|---|
| Namespace | — | demo-app |
| Deployment | demo-app | Demo app with metrics |
| Service | demo-app | Access to metrics endpoint |
| VMServiceScrape | demo-app | VMAgent metrics collection rule from user-monitoring |
Prerequisites
- host/machine/computer with
gitanddockerinstalled - for downloading sources and building the demo-app image; - local or public registry for publishing the assembled image:
- in a closed loop — local mirror (for example,
mirror.shturval.local); - in an open loop — for example, hub.docker.com.
- in a closed loop — local mirror (for example,
Step 1. Create namespace demo-app
In the cluster GUI, open Namespaces and create demo-app for the VictoriaMetrics demo application.
Screenshot

Step 2. Build and publish the image
From the CLI, clone the repository, build the image, and push it to your registry:
Example:
git clone https://github.com/VictoriaMetrics/demo-app
cd demo-app/
REGISTRY=<YOUR VALUE> TAG=<YOUR VALUE> make docker-push
| Parameter | Description | Data type | Example |
|---|---|---|---|
| REGISTRY | Local or public Registry | string | mirror.shturval.local |
| TAG | Demo application build version | string | 1.2 |
Step 3: Deploy the application and VMServiceScrape
In the GUI, using import manifests, import Deployment, Service and VMServiceScrape into the cluster in the demo-app namespace without changing the parameters (except for the image in Deployment - specify the registry and tag from step 2):
- Deployment
demo-app- container with the demo-app image; - Service
demo-app— porthttpfor scrape; - VMServiceScrape
demo-app-service-scrape- metrics collection rule for VMAgent.
Example manifests:
apiVersion: apps/v1
kind: Deployment
metadata:
name: demo-app
namespace: demo-app
labels:
app.kubernetes.io/name: demo-app
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: demo-app
template:
metadata:
labels:
app.kubernetes.io/name: demo-app
spec:
containers:
- name: app
image: r.shturval.tech/victoriametrics/demo-app:1.2 # replace with your REGISTRY/TAG from step 2
---
apiVersion: v1
kind: Service
metadata:
name: demo-app
namespace: demo-app
labels:
app.kubernetes.io/name: demo-app
spec:
selector:
app.kubernetes.io/name: demo-app
ports:
- port: 8080
name: http
---
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMServiceScrape
metadata:
name: demo-app-service-scrape
namespace: demo-app
spec:
endpoints:
- port: http
selector:
matchLabels:
app.kubernetes.io/name: demo-app
Screenshot

Check
After deployment, demo-app metrics should appear in the selected storage (local VMSingle in user-monitoring or external remoteWrite).