A set of monitoring scripts that publish metrics to AWS CloudWatch.
Note the namespace used is MyNamespace/Custom!. This should be changed within the code.
- Python 3.x
- boto (AWS SDK) or on debian python3-boto
./dragonfly CONFIG
See config.json.example for a configuration example.
Security credentials to authenticate with AWS are looked up in the following order:
- When role is specified in CONFIG check for temporary security credentials via instance meta-data
- If no role or no temporary security credentials were found look for environment variables ACCESS_KEY_ID and SECRET_ACCESS_KEY.
- Use values from CONFIG by looking for the keys access_key_id and secret_access_key.
A list of allowed options:
- role
- The role that is attached to the instance, that allows it to access AWS services
- access_key_id
- The AWS access key id used for authentication
- secret_access_key
- The AWS secret key used for authentication
- processes
- A list of dicts defining processes that should be counted
- A dict must have the following keys:
- process: A name for the process to count. This is used to create the metric name as follows ProcessCount
- regex: A regular expression that is used to count matches in the systems process table that identify the specified process
- dimensions
- A way of grouping the metrics (see here for examples)
- A list of dicts defining dimensions
- i.e.: {'name1': 'value1', 'name2': 'value2'}