Code Monkey home page Code Monkey logo

aws-meta-aggregator's Introduction

AWS Meta Aggregator

License: MPL 2.0 security: bandit

Aggregates information about all resources in an AWS account

Configuration

Watch your cardinality

⚠️ Make sure you understand the implications of enabling identifier labels before doing so ⚠️

When you're looking to filter on high-cardinality identifiers, Prometheus is probably not the solution you're looking for. Relevant blogpost: https://www.robustperception.io/cardinality-is-key

Some particular things to watch out for are breaking out metrics with labels per customer. This usually works okay when you've tens of customers, but when you get into the hundreds and later thousands this tends not to end well.

(...)

As a general rule of thumb I'd avoid having any metric whose cardinality on a /metrics could potentially go over 10 due to growth in label values.

Add labels to allowlist

Add space separated label names to the PROMETHEUS_API_RESOURCE_LABEL_ALLOWLIST and PROMETHEUS_API_RESOURCE_TAG_LABEL_ALLOWLIST environment variables for the labels you want to include in your results.

Available Metrics

Resource

resource{arn="arn:aws:ec2:eu-central-1:123456789012:subnet/subnet-db06309ec8ce58bb",account="123456789012",partition="aws",id="subnet-db06309ec8ce58bb",service="ec2",region="eu-central-1",type="subnet"} 1

Resource Tag

resource_tag{arn="arn:aws:ec2:eu-central-1:123456789012:subnet/subnet-db06309ec8ce58bb",key="Name",value="MyFavoriteSubnet",account="123456789012",partition="aws",resource_id="subnet-db06309ec8ce58bb",service="ec2",region="eu-central-1",resource_type="subnet"} 1

PromQL Examples

Retrieving all resources with a tag Name

resource and on(arn) (resource_tag {key="Name"})

And all resources that are missing a tag Name

resource unless on(arn) (resource_tag {key="Name"})

Resources without any tags at all

resource unless on(arn) resource_tag

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

Code of Conduct

Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

MPL-2.0

aws-meta-aggregator's People

Contributors

edeckers avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.