Prometheus metrics
GET
/metrics
const url = 'http://pwrman.local/metrics';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://pwrman.local/metricsPrometheus text format: the chassis totals, the input voltage, and
every port metric labeled with port and name. See
Prometheus.
Authorizations
Section titled “Authorizations”- None
- token
Responses
Section titled “Responses”The metrics.
Media typetext/plain; version=0.0.4; charset=utf-8
string
Example
# TYPE pwrman_total_power_watts gaugepwrman_total_power_watts 110.42# TYPE pwrman_port_power_watts gaugepwrman_port_power_watts{port="1",name="Laptop"} 54.30Auth_read is on and the token is missing or wrong.
Media typeapplication/json
object
error
required
Why the request was refused, in words.
string
Example
{ "error": "bearer token required"}Another scrape is still being sent. Try again.
Media typetext/plain
string
Example
scrape in progressUSB Type-C® and USB-C® are registered trademarks of USB Implementers Forum.