aws_cloudwatch_exporter

command module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

aws_cloudwatch_exporter

Master branch workflow Go Report Card Docker Pulls

Prometheus exporter for AWS CloudWatch

This exporter used the AWS CloudWatch GetMetricsData API call, please it is important you read

WARNING:

  • The use of this exporter could be expensive, this need be used taking care.

NOTES:

LIMITATIONS:

  • You could define 500 metrics queries in total (a future release will allow more)

Configuration

Server

To configure the server you have 3 ways:

  1. Configuration Files (i.e.: ./server.yaml)
  2. Environment Variables (i.e.: SERVER_PORT, SERVER_ADDRESS, etc)
  3. Program Flags (i.e.: --serverPort, --serverAddress,etc)
Metrics Queries

This exporter used the standard metrics queries format used by AWS CloudWatch API GetMetricData More information at metrics.md

Docs
Running
Docker

Using your own ~/.aws configuration in local

docker run --rm \
    -i \
    -u nobody:nogroup \
    --privileged \
    -v ~/tmp/queries/m1.yaml:/home/nobody/m1.yaml:ro \
    -v ~/tmp/queries/m2.yaml:/home/nobody/m2.yaml:ro \
    -v /tmp/:/home/nobody/tmp/:rw \
    -v ~/.aws:/home/nobody/.aws:ro \
    -e "AWS_SDK_LOAD_CONFIG=true" \
    -e "AWS_PROFILE=slashdevops" \
    slashdevops/aws-cloudwatch-exporter-linux-amd64:develop metrics get --metricsFiles /home/nobody/m1.yaml --outFile /home/nobody/tmp/out.yaml 

Check the result

cat /tmp/out.yaml 
Binary

If you download the binary from releases

AWS_SDK_LOAD_CONFIG="true" \
AWS_PROFILE="slashdevops" \
./aws_cloudwatch_exporter metrics get \
    --metricsFiles ~/tmp/queries/m1.yaml \
    --debug

Development / Contributing

WIP

License

This software is released under the APACHE LICENSE, VERSION 2.0:

Author Information

Documentation

Overview

Copyright © 2020 NAME HERE chritian@slashdevops.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
internal
web

Jump to

Keyboard shortcuts

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