rds_exporter

command module
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

README

CloudWatch Exporter

Build Status Go Report Card CLA assistant

An AWS RDS exporter for Prometheus. It gets metrics from both basic CloudWatch Metrics and RDS Enhanced Monitoring via CloudWatch Logs.

Based on Technofy/cloudwatch_exporter, but very little of the original code remained.

Quick start

Create configration file config.yml:

---
instances:
  - instance: rds-aurora1
    region: us-east-1
  - instance: rds-mysql57
    region: us-east-1
    aws_access_key: AKIAIOSFODNN7EXAMPLE
    aws_secret_key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

If aws_access_key and aws_secret_key are present, they are used for that instance. Otherwise, default credential provider chain is used, which includes AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables, ~/.aws/credentials file, and IAM role for EC2.

Start exporter by running:

rds_exporter

To see all flags run:

rds_exporter --help

Configure Prometheus:

---
scrape_configs:
  - job_name: rds-basic
    scrape_interval: 60s
    scrape_timeout: 55s
    metrics_path: /basic
    honor_labels: true
    static_configs:
      - targets:
        - 127.0.0.1:9042

  - job_name: rds-enhanced
    scrape_interval: 10s
    scrape_timeout: 9s
    metrics_path: /enhanced
    honor_labels: true
    static_configs:
      - targets:
        - 127.0.0.1:9042

honor_labels: true is important because exporter returns metrics with instance label set.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.
generate
The following directive is necessary to make the package coherent: This program generates metrics.go.
The following directive is necessary to make the package coherent: This program generates metrics.go.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL