Exporting metrics

Problem/Question

How to export the metrics for viewing as text file?

Relevant docs you followed/actions you took to solve the issue

(Exporting Metrics | Learn Netdata)

Environment/Browser/Agent’s version etc

Chrome 134.0.6998.36, agent v2.2.6, Windows 11 24H2 (Выпуск Windows 11 Pro
Версия 24H2
Дата установки ‎24.‎02.‎2025
Сборка ОС 26100.3194
Взаимодействие Пакет интерфейса компонентов Windows 1000.26100.48.0)

What I expected to happen

Should be export metrics via agent

Hi. You can use Prometheus exporting (/api/v1/allmetrics?format=prometheus endpoint) + curl and redirect the output to a file.

what about windows? curl doesn’t exist on windows

I am not Windows user, but chatGPT suggests using PowerShell

Invoke-WebRequest -Uri "http://localhost:19999/api/v1/allmetrics?format=prometheus" -OutFile "metrics.txt"