# Telegraf + exec plugin + python writing the data into cloudwatch issues

**URL:** <https://community.influxdata.com/t/telegraf-exec-plugin-python-writing-the-data-into-cloudwatch-issues/26087>\
**Category:** Telegraf\
**Created:** [August 10, 2022, 4:00pm UTC](https://community.influxdata.com/t/telegraf-exec-plugin-python-writing-the-data-into-cloudwatch-issues/26087 "2022-08-10T16:00:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![girish\_babu](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/girish_babu/32/10734_2.png) [@girish\_babu](https://community.influxdata.com/u/girish_babu)\
**Post date:** [August 10, 2022, 4:00pm UTC](https://community.influxdata.com/t/telegraf-exec-plugin-python-writing-the-data-into-cloudwatch-issues/26087/1 "2022-08-10T16:00:52Z")

</div>

Hello,

I am using s3 boto3 framework in python to print the bucket name and object details and printed in the o/p format as

metadata,fname=DMS-20220810-20220810-20220810T103000.zip file\_creation\_date=“2022-08-10”,file\_creation\_time=“13:44:25”,file\_storage\_size=7679i, source\_bucket=from

The values file\_creation\_date, file\_creation\_time and source\_bucket are not appearing in cloud watch as metric, only fname and file\_storage\_size are appearing

This is python program is called by input plugin exe and writes the data into AWS cloud watch. The issue I am having is how to distinguish between the tags and values in the print statement( in python). or else can I print the output in JSON and ingested required keys into cloudwatch.

What is the expected format of print in python to send the data into cloud watch ?

---

<div class="post-metadata">

**Author:** ![jpowers](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/jpowers/32/8569_2.png) [@jpowers](https://community.influxdata.com/u/jpowers)\
**Post date:** [August 10, 2022, 6:17pm UTC](https://community.influxdata.com/t/telegraf-exec-plugin-python-writing-the-data-into-cloudwatch-issues/26087/2 "2022-08-10T18:17:09Z")

</div>

Hi,

The Cloudwatch plugin will only write fields that can be converted to float64; other fields, like strings are skipped. This is why the file creation date and time, and source bucket are ignored.

---

<div class="post-metadata">

**Author:** ![girish\_babu](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/girish_babu/32/10734_2.png) [@girish\_babu](https://community.influxdata.com/u/girish_babu)\
**Post date:** [August 10, 2022, 8:29pm UTC](https://community.influxdata.com/t/telegraf-exec-plugin-python-writing-the-data-into-cloudwatch-issues/26087/3 "2022-08-10T20:29:27Z")

</div>

Thanks for your reply. Is there any workaround to solve this problem statement please ?.

How about the outputting same thing in JSON and writing into cloud watch ?

---

<div class="post-metadata">

**Author:** ![jpowers](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/jpowers/32/8569_2.png) [@jpowers](https://community.influxdata.com/u/jpowers)\
**Post date:** [August 11, 2022, 2:21pm UTC](https://community.influxdata.com/t/telegraf-exec-plugin-python-writing-the-data-into-cloudwatch-issues/26087/4 "2022-08-11T14:21:57Z")

</div>

My experience with Cloudwatch is very limited, but what I can say is if you want those string fields, you may want to make them tags when you send them in to Telegraf. As tags, I believe CloudWatch turns them into properties of the metric.

That would mean turning this:

```nohighlight
metadata,fname=DMS-20220810-20220810-20220810T103000.zip file_creation_date=“2022-08-10”,file_creation_time=“13:44:25”,file_storage_size=7679i,source_bucket=from

```

into this

```nohighlight
metadata,fname=DMS-20220810-20220810-20220810T103000.zip,file_creation_date=“2022-08-10”,file_creation_time=“13:44:25”,source_bucket=from file_storage_size=7679i

```
