GithubHelp home page GithubHelp logo

djloude / cloudwatch_exporter_metrics_config_builder Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 5.0 12 KB

CI/CD pipeline that generates aws cloudwatch metrics and dimensions then builds the cloudwatch.yml file.

Jinja 57.72% Shell 20.66% Python 21.62%

cloudwatch_exporter_metrics_config_builder's People

Contributors

daniduhnev1 avatar devahmadmoh avatar djloude avatar

Stargazers

 avatar

Watchers

 avatar

cloudwatch_exporter_metrics_config_builder's Issues

Ansible playbook fails with "<filename>.json must be stored as a dictionary/hash"

Ansible playbook returns error when ran. See example full error message:

failed: [localhost] (item=/cloudwatch_exporter_metrics_config_builder/cloudwatch_config_builder/files/cloudwatch_metrics/auto_scaling.json) => {
    "ansible_facts": {},
    "ansible_included_var_files": [],
    "ansible_loop_var": "item",
    "changed": false,
    "item": "cloudwatch_exporter_metrics_config_builder/cloudwatch_config_builder/files/cloudwatch_metrics/transit_gateway.json",
    "message": "cloudwatch_exporter_metrics_config_builder/cloudwatch_config_builder/files/cloudwatch_metrics/transit_gateway.json must be stored as a dictionary/hash"
}

Here's how the cloudwatch_config_builder/files/cloudwatch_metrics/transit_gateway.json generated from the pipeline.sh script looks like:

cat transit_gateway.json

None
METRICS	BytesDropCountBlackhole	AWS/TransitGateway
DIMENSIONS	TransitGatewayAttachment	tgw-attach-09fcdd27877bd8abd
DIMENSIONS	TransitGateway	tgw-0e0d912367b7a1c3a
METRICS	PacketsOut	AWS/TransitGateway
DIMENSIONS	TransitGatewayAttachment	tgw-attach-06569e5eae5c15d3e
DIMENSIONS	TransitGateway	tgw-07ad63cf278f3f4e7
METRICS	BytesIn	AWS/TransitGateway
DIMENSIONS	TransitGatewayAttachment	tgw-attach-09fcdd27877bd8abd
DIMENSIONS	TransitGateway	tgw-0e0d912367b7a1c3a
METRICS	PacketDropCountBlackhole	AWS/TransitGateway
DIMENSIONS	TransitGatewayAttachment	tgw-attach-09fcdd27877bd8abd
DIMENSIONS	TransitGateway	tgw-0e0d912367b7a1c3a
METRICS	PacketsIn	AWS/TransitGateway
DIMENSIONS	TransitGateway	tgw-0e0d912367b7a1c3a
METRICS	BytesOut	AWS/TransitGateway
DIMENSIONS	TransitGateway	tgw-07ad63cf278f3f4e7
METRICS	BytesDropCountBlackhole	AWS/TransitGateway
DIMENSIONS	TransitGateway	tgw-0e0d912367b7a1c3a
METRICS	PacketDropCountNoRoute	AWS/TransitGateway
DIMENSIONS	TransitGatewayAttachment	tgw-attach-06569e5eae5c15d3e
DIMENSIONS	TransitGateway	tgw-07ad63cf278f3f4e7
METRICS	BytesOut	AWS/TransitGateway
DIMENSIONS	TransitGateway	tgw-0e0d912367b7a1c3a
METRICS	BytesIn	AWS/TransitGateway
DIMENSIONS	TransitGatewayAttachment	tgw-attach-06569e5eae5c15d3e
DIMENSIONS	TransitGateway	tgw-07ad63cf278f3f4e7
METRICS	PacketDropCountNoRoute	AWS/TransitGateway
DIMENSIONS	TransitGateway	tgw-07ad63cf278f3f4e7
METRICS	PacketsOut	AWS/TransitGateway
DIMENSIONS	TransitGateway	tgw-0e0d912367b7a1c3a
METRICS	BytesOut	AWS/TransitGateway
DIMENSIONS	TransitGatewayAttachment	tgw-attach-06569e5eae5c15d3e
DIMENSIONS	TransitGateway	tgw-07ad63cf278f3f4e7
METRICS	PacketsIn	AWS/TransitGateway
DIMENSIONS	TransitGateway	tgw-07ad63cf278f3f4e7
METRICS	BytesDropCountBlackhole	AWS/TransitGateway
DIMENSIONS	TransitGatewayAttachment	tgw-attach-06569e5eae5c15d3e
DIMENSIONS	TransitGateway	tgw-07ad63cf278f3f4e7
METRICS	BytesOut	AWS/TransitGateway
DIMENSIONS	TransitGatewayAttachment	tgw-attach-09fcdd27877bd8abd
DIMENSIONS	TransitGateway	tgw-0e0d912367b7a1c3a
METRICS	BytesDropCountNoRoute	AWS/TransitGateway
DIMENSIONS	TransitGateway	tgw-07ad63cf278f3f4e7
METRICS	PacketsIn	AWS/TransitGateway
DIMENSIONS	TransitGatewayAttachment	tgw-attach-06569e5eae5c15d3e
DIMENSIONS	TransitGateway	tgw-07ad63cf278f3f4e7
METRICS	BytesDropCountBlackhole	AWS/TransitGateway
DIMENSIONS	TransitGateway	tgw-07ad63cf278f3f4e7
METRICS	PacketDropCountBlackhole	AWS/TransitGateway
DIMENSIONS	TransitGatewayAttachment	tgw-attach-06569e5eae5c15d3e
DIMENSIONS	TransitGateway	tgw-07ad63cf278f3f4e7
METRICS	BytesIn	AWS/TransitGateway
DIMENSIONS	TransitGateway	tgw-07ad63cf278f3f4e7
METRICS	PacketsIn	AWS/TransitGateway
DIMENSIONS	TransitGatewayAttachment	tgw-attach-09fcdd27877bd8abd
DIMENSIONS	TransitGateway	tgw-0e0d912367b7a1c3a
METRICS	PacketsOut	AWS/TransitGateway
DIMENSIONS	TransitGateway	tgw-07ad63cf278f3f4e7
METRICS	PacketDropCountNoRoute	AWS/TransitGateway
DIMENSIONS	TransitGatewayAttachment	tgw-attach-09fcdd27877bd8abd
DIMENSIONS	TransitGateway	tgw-0e0d912367b7a1c3a
METRICS	PacketsOut	AWS/TransitGateway
DIMENSIONS	TransitGatewayAttachment	tgw-attach-09fcdd27877bd8abd
DIMENSIONS	TransitGateway	tgw-0e0d912367b7a1c3a
METRICS	BytesIn	AWS/TransitGateway
DIMENSIONS	TransitGateway	tgw-0e0d912367b7a1c3a
METRICS	PacketDropCountNoRoute	AWS/TransitGateway
DIMENSIONS	TransitGateway	tgw-0e0d912367b7a1c3a
METRICS	BytesDropCountNoRoute	AWS/TransitGateway
DIMENSIONS	TransitGatewayAttachment	tgw-attach-06569e5eae5c15d3e
DIMENSIONS	TransitGateway	tgw-07ad63cf278f3f4e7
METRICS	PacketDropCountBlackhole	AWS/TransitGateway
DIMENSIONS	TransitGateway	tgw-07ad63cf278f3f4e7
METRICS	BytesDropCountNoRoute	AWS/TransitGateway
DIMENSIONS	TransitGateway	tgw-0e0d912367b7a1c3a
METRICS	BytesDropCountNoRoute	AWS/TransitGateway
DIMENSIONS	TransitGatewayAttachment	tgw-attach-09fcdd27877bd8abd
DIMENSIONS	TransitGateway	tgw-0e0d912367b7a1c3a
METRICS	PacketDropCountBlackhole	AWS/TransitGateway
DIMENSIONS	TransitGateway	tgw-0e0d912367b7a1c3a

I can confirm that running the aws cloudwatch list-metrics command generates the same output. I suspect the problem is with the way the main.py script is written because I tried manually changing one of the files to simply

cat transit_gateway.json

some_variable: value

, then the ansible playbook passes for that particular file.

MIssing dirs

Getting this error when running initially

Python 3.10.8
./pipeline.sh: line 2: cloudwatch_config_builder/files/cloudwatch_metrics/auto_scaling.json: No such file or directory
./pipeline.sh: line 3: cloudwatch_config_builder/files/cloudwatch_metrics/billing.json: No such file or directory
./pipeline.sh: line 4: cloudwatch_config_builder/files/cloudwatch_metrics/dynamo_db.json: No such file or directory
./pipeline.sh: line 5: cloudwatch_config_builder/files/cloudwatch_metrics/ebs.json: No such file or directory
./pipeline.sh: line 6: cloudwatch_config_builder/files/cloudwatch_metrics/ec2.json: No such file or directory
./pipeline.sh: line 7: cloudwatch_config_builder/files/cloudwatch_metrics/elasti_cache.json: No such file or directory
./pipeline.sh: line 8: cloudwatch_config_builder/files/cloudwatch_metrics/events.json: No such file or directory
./pipeline.sh: line 9: cloudwatch_config_builder/files/cloudwatch_metrics/lambda.json: No such file or directory
./pipeline.sh: line 10: cloudwatch_config_builder/files/cloudwatch_metrics/logs.json: No such file or directory
./pipeline.sh: line 11: cloudwatch_config_builder/files/cloudwatch_metrics/network_elb.json: No such file or directory
./pipeline.sh: line 12: cloudwatch_config_builder/files/cloudwatch_metrics/rds.json: No such file or directory
./pipeline.sh: line 13: cloudwatch_config_builder/files/cloudwatch_metrics/s3.json: No such file or directory
./pipeline.sh: line 14: cloudwatch_config_builder/files/cloudwatch_metrics/transit_gateway.json: No such file or directory
./pipeline.sh: line 15: cloudwatch_config_builder/files/cloudwatch_metrics/trusted_advisor.json: No such file or directory
./pipeline.sh: line 16: cloudwatch_config_builder/files/cloudwatch_metrics/usage.json: No such file or directory

It is fixed by adding cloudwatch_config_builder/files/cloudwatch_metrics/ folder

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.