项目作者: iamseth

项目描述 :
Prometheus exporter for Azure SQL metrics.
高级语言: Go
项目地址: git://github.com/iamseth/azure_sql_exporter.git
创建时间: 2016-04-13T14:01:01Z
项目社区:https://github.com/iamseth/azure_sql_exporter

开源协议:MIT License

下载


Azure SQL Exporter

Build Status
GoDoc
Report card

Prometheus exporter for Azure SQL metrics. See this post for details.

Metrics are collected from each database using SQL so this could easily be modified or extended to support SQL Server though it may have better metrics exporting natively than through SQL.

Databases are only queries when fetching /metrics from the exporter so that you may control the interval from your scrape_config section in Prometheus.

Install

  1. go get -u github.com/iamseth/azure_sql_exporter

Usage

  1. Usage of azure_sql_exporter:
  2. -config.file string
  3. Specify the config file with the database credentials. (default "./config.yaml")
  4. -log.level value
  5. Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal, panic]. (default info)
  6. -web.listen-address string
  7. Address to listen on for web interface and telemetry. (default ":9139")
  8. -web.telemetry-path string
  9. Path under which to expose metrics. (default "/metrics")

Configuration

This exporter requires a configuration file. By default, it will look for the config.yaml file in the CWD and can be specified with the -config.file parameter.

The file is in YAML format and contains the information for connecting to the databases you want to export. This file will contain sensitive information so make sure your configuration management locks down access to this file (chmod [46]00) and it is encouraged to create an SQL user with the least amount of privilege.

  1. databases:
  2. - name: Sales
  3. user: prometheus
  4. port: 1433
  5. password: str0ngP@sswordG0esHere
  6. server: salesdb.database.windows.net
  7. - name: Inventory
  8. user: prometheus
  9. port: 1433
  10. password: str0ngP@sswordG0esHere
  11. server: inventorydb.database.windows.net

Binary releases

Pre-compiled versions may be found in the release section.