metrics injection | acceptance | api | install | setup | reverse proxy | dashboard
reach the dashboard either through tunne
ssh vmetrics -L 8428:localhost:8428
or direct adress
https://vmetrics.nethence.com/vmui/
and proceed with some API request queries e.g.
curl -s "http://localhost:8428/api/v1/query?query=log_metric_gauge_cpu_p" | jq
here is some more
log_metric_gauge_cpu_p log_metric_gauge_mem.used / log_metric_gauge_mem.total * 100 log_metric_gauge_write_size log_metric_gauge_read_size log_metric_gauge_eth0.tx.bytes log_metric_gauge_eth0.rx.bytes log_metric_gauge_eth0.tx.packets log_metric_gauge_eth0.rx.packets
on some monitored server (NOT production)
apt install stress cd /var/log/ # overall cut -f2 -d' ' fluent-bit.vmetrics.log | cut -f1 -d'{' | sort -u # process grep process_ fluent-bit.vmetrics.log | cut -f2 -d' ' | cut -f1 -d'{' | sort -u
server { listen 80; listen [::]:80; server_name vmetrics.nethence.com; access_log /var/log/nginx/vmetrics.access.log main; error_log /var/log/nginx/vmetrics.error.log warn; # deal with http-01 challenges (no http2 there) location ^~ /.well-known/acme-challenge/ { default_type "text/plain"; # trailing slash matters alias /var/www/dehydrated/; } ssi off; autoindex off; autoindex_exact_size off; location = /robots.txt { access_log off; log_not_found off; } location = /favicon.ico { access_log off; log_not_found off; } location ~ /apple-touch-icon { access_log off; log_not_found off; } } server { listen 443 ssl; listen [::]:443 ssl; server_name vmetrics.nethence.com; http2 on; access_log /var/log/nginx/vmetrics.access.ssl.log mainssl; error_log /var/log/nginx/vmetrics.error.ssl.log warn; # http-01 sample ssl_certificate /etc/dehydrated/certs/vmetrics.nethence.com/fullchain.pem; ssl_certificate_key /etc/dehydrated/certs/vmetrics.nethence.com/privkey.pem; ssl_certificate /etc/dehydrated/certs/ECC/vmetrics.nethence.com/fullchain.pem; ssl_certificate_key /etc/dehydrated/certs/ECC/vmetrics.nethence.com/privkey.pem; auth_basic "restricted area"; auth_basic_user_file passwd; location / { proxy_pass http://127.0.0.1:8428/; } ssi off; autoindex on; autoindex_exact_size off; location = /robots.txt { access_log off; log_not_found off; } location = /favicon.ico { access_log off; log_not_found off; } location ~ /apple-touch-icon { access_log off; log_not_found off; } }
https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/app/vmui#predefined-dashboards