8000 Add EC2 Instance Metadata to metrics sent to CW. (Custom Dimensions) by Tucker459 · Pull Request #77 · awslabs/collectd-cloudwatch · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add EC2 Instance Metadata to metrics sent to CW. (Custom Dimensions) #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Tucker459
Copy link

Issue #10

Description of changes:
Added a feature where a user can specify in a dimension file the instance metadata that he/she wants to be pushed to aws cloudwatch along with the metric information. For example, a user can specify region, availability-zone, private-ip, instanceid, and more in the dimension file. In effect those attributes will be pushed along with the metric data to aws cloudwatch giving more clarity and information to the user about the particular metric(s).

Usage:
Create dimensions file in whatever location you want.
Recommended Path: /opt/collectd-plugins/cloudwatch/config/dimensions

Add Instance Dimensions to file:
Host
PrivateIp
InstanceId
Region
etc.

Run: Python setup.py

For more information on instance dimensions to be added: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tucker459 and others added 4 commits December 14, 2018 16:21
* changed readme

* Feature/add dimension file (#2)

* added non-interactive dimension_file creation

* added prompt for dimensions file path

* added dimensions metadata info pull

* added dimensionsreader.py file and created get_dimensions method in readerutils.py

* added info to configreader.py file & created _get_dimensions_path method

* created _load_dimensions method

* removed logger info code blocks

* troubleshooting metadata grab

* returning a list back from DimensionsReader

* pulling dimnesions from config instead of vaule_list

* returned dimensions from _build_metric_dimensions()

* testing dimension name format

* make sure that the first letter of the dimension is lowercase for metric pull & first letter is capitlized for AWS CW Metric

* corrected dim for plugininstance

* added more info to dimensions file and used urllib2 instead of subprocess for pulling dimensions

* added logging if dimensions file is empty

* added nondimension regex pattern

* corrected regex match

* testing non-interactive setup then switch to dimensions used

* cleaned-up logging

* Update README.md

* cleanup for master

* Summary: Added custom metadata EC2 support
@Tucker459 Tucker459 changed the title Awslabs integration Add EC2 Instance Metadata to metrics sent to CW. (Custom Dimensions) Dec 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0