Browse Source

add draft for ip set info

master
Markus Bergholz 3 months ago
parent
commit
e8a901075d
Signed by: m GPG Key ID: B45724801354B174
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      cloudwatchlogs_put_metric_data.py

+ 4
- 3
cloudwatchlogs_put_metric_data.py View File

@ -16,6 +16,7 @@ description:
- Put custom metric data to cloudwatch.
requirements:
- boto3
- botocore
options:
extends_documentation_fragment:
@ -59,10 +60,10 @@ def put_metric_data(cw, params):
for md in params.get('metric_data'):
data = dict()
data['MetricName'] = md.get('metric_name')
data['Value'] = md.get('value')
data['Unit'] = md.get('unit')
data['Value'] = float(md.get('value'))
data['Unit'] = md.get('unit') or 'None'
data['Dimensions'] = list()
data['Timestamp'] = dt
data['Timestamp'] = md.get('timestamp') or dt
for item in md.get('dimensions'):
d = dict()
d['Name'] = item.get('name')


Loading…
Cancel
Save