Segment7 Blog

nushell prometheus plugin

1 min read tags:

A Nushell plugin for retreiving prometheus data including:

  • Instant queries
  • Range queryies
  • Target status
  • Series
  • Label names
  • Label values

Pipe a prometheus query to prometheus query for an instant query:

"up" | prometheus query --url https://prometheus.example:9090/

This will output a table:

namelabelsvaluetimestamp
up{job: prometheus, instance: prometheus.example:9090}11435781451
up{job: node, instance: prometheus.example:9100}01435781451

For the full list of features and details see nu_plugin_prometheus

Search