Steampipe Plugin Prometheus

Use SQL to instantly query Prometheus metrics, alerts, labels and more. Open source CLI. No DB required.
Alternatives To Steampipe Plugin Prometheus
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Devops Exercises43,460
4 days ago14otherPython
Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions
Devops Resources6,995
4 days ago13Groovy
DevOps resources - Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP
Promscale1,32375 days ago80April 23, 2021133apache-2.0Go
[DEPRECATED] Promscale is a unified metric and trace observability backend for Prometheus, Jaeger and OpenTelemetry built on PostgreSQL and TimescaleDB.
Query Exporter350
14 days ago36February 18, 202225gpl-3.0Python
Export Prometheus metrics from SQL queries
Sql_exporter281
2 years agoNovember 28, 201743mitGo
Database agnostic SQL exporter for Prometheus
Sql_exporter250
a year ago8July 15, 202217mitGo
Flexible SQL Exporter for Prometheus.
Prometheus Sql185
7 months agoAugust 05, 201713bsd-2-clauseGo
Service that exposes Prometheus metrics for a SQL result set.
Sql_exporter129
7 hours ago4April 15, 20218mitGo
Database agnostic SQL exporter for Prometheus
Sqlstats121142 years ago13June 25, 20211mitGo
A Go library for collecting sql.DBStats in Prometheus format
Docker Compose112
4 days ago
Some examples of docker-compose stacks used at home and at work...
Alternatives To Steampipe Plugin Prometheus
Select To Compare


Alternative Project Comparisons
Readme

image

Prometheus Plugin for Steampipe

Use SQL to query instances, domains and more from Prometheus.

Quick start

Install the plugin with Steampipe:

steampipe plugin install prometheus

Configure the server address in ~/.steampipe/config/prometheus.spc:

connection "prometheus" {
  plugin  = "prometheus"
  address = "http://localhost:9090"
}

Run steampipe:

steampipe query

Query all the labels in your prometheus metrics:

select
  name,
  values
from
  prometheus_label
> select name, values from prometheus_label
+---------------+----------------------------------------------+
| name          | values                                       |
+---------------+----------------------------------------------+
| alertname     | ["TotalRequests"]                            |
| alertstate    | ["firing"]                                   |
| reason        | ["refused","resolution","timeout","unknown"] |
| interval      | ["10s"]                                      |
| version       | ["2.30.3","go1.17.1"]                        |
| code          | ["200","302","400","500","503"]              |
+---------------+----------------------------------------------+

Query data for a given metric (tables are dynamically created):

select
  code,
  handler,
  value
from
  prometheus_http_requests_total
+------+----------------------------+-------+
| code | handler                    | value |
+------+----------------------------+-------+
| 302  | /                          | 1     |
| 200  | /-/ready                   | 1     |
| 200  | /api/v1/alerts             | 1     |
| 200  | /api/v1/label/:name/values | 421   |
| 200  | /api/v1/labels             | 16    |
| 200  | /graph                     | 1     |
| 200  | /static/*filepath          | 4     |
+------+----------------------------+-------+

Developing

Prerequisites:

Clone:

git clone https://github.com/turbot/steampipe-plugin-prometheus.git
cd steampipe-plugin-prometheus

Build, which automatically installs the new version to your ~/.steampipe/plugins directory:

make

Configure the plugin:

cp config/* ~/.steampipe/config
vi ~/.steampipe/config/prometheus.spc

Try it!

steampipe query
> .inspect prometheus

Further reading:

Contributing

Please see the contribution guidelines and our code of conduct. All contributions are subject to the Apache 2.0 open source license.

help wanted issues:

Popular Prometheus Projects
Popular Sql Projects
Popular Operations Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Go
Postgresql
Sql
Prometheus