# Can't see metrics on InfluxDB coming from telegraf

**URL:** <https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487>\
**Category:** Telegraf\
**Tags:** influxdb, telegraf, getting-started\
**Created:** [September 9, 2022, 9:50pm UTC](https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487 "2022-09-09T21:50:23Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![RGeisen](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@RGeisen](https://community.influxdata.com/u/RGeisen)\
**Post date:** [September 9, 2022, 9:50pm UTC](https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487/1 "2022-09-09T21:50:23Z")

</div>

I have the latest version of telegraf and the latest version of InfluxDB set up so that telegraf will send data from a file to InfluxDB, however even though after using debug mode, it says that both the input and the output are connected successfully and I can see the metrics being pulled from my file when I use test; I cannot see the metrics being pushed to InfluxDB. Please help!!!

---

<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:** [September 9, 2022, 9:55pm UTC](https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487/2 "2022-09-09T21:55:47Z")

</div>

Hi,

Can you please share your telegraf logs with debug mode enabled? With debug enabled there should be a message anytime you send metrics to your output, influxdb in this case.

If possible can you also share your telegraf config?

Thanks!

---

<div class="post-metadata">

**Author:** ![RGeisen](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@RGeisen](https://community.influxdata.com/u/RGeisen)\
**Post date:** [September 9, 2022, 10:23pm UTC](https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487/3 "2022-09-09T22:23:01Z")

</div>

Agent Configuration:

 ![AgentConfig](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/e/e9e83fedfd9a92458cb337dc28f1e7b4b58e1616.png)

Hopefully this works! Thanks 🙂

---

<div class="post-metadata">

**Author:** ![RGeisen](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@RGeisen](https://community.influxdata.com/u/RGeisen)\
**Post date:** [September 9, 2022, 10:23pm UTC](https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487/4 "2022-09-09T22:23:34Z")

</div>

Sorry I have to make multiple posts since I’m a new user  
Input Configuration:

 ![InputPluginConfig](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/0/05c055ff22f2de3762eb3d8fb9447b1bba43f8f4.png)

---

<div class="post-metadata">

**Author:** ![RGeisen](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@RGeisen](https://community.influxdata.com/u/RGeisen)\
**Post date:** [September 9, 2022, 10:24pm UTC](https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487/5 "2022-09-09T22:24:09Z")

</div>

Output Configuration:

 ![OutputPluginConfig](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/8/8a3e3a066964633d121fd2d2a1ed8f56a1337eb3.png)

---

<div class="post-metadata">

**Author:** ![RGeisen](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@RGeisen](https://community.influxdata.com/u/RGeisen)\
**Post date:** [September 9, 2022, 10:24pm UTC](https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487/6 "2022-09-09T22:24:54Z")

</div>

The Top portion of the telegraf debug logs:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/3/3865fbb76f58eb2a978c285fd7b33a9555e3f6cf.png)

---

<div class="post-metadata">

**Author:** ![RGeisen](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@RGeisen](https://community.influxdata.com/u/RGeisen)\
**Post date:** [September 9, 2022, 10:25pm UTC](https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487/7 "2022-09-09T22:25:36Z")

</div>

The bottom portion of the telegraf logs:

 ![Telegraf_Debug(2)](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/3/326bba07e04fc4571c7cc36997c19228b0ca0fff.png)  
Thanks for putting up with the multiple posts. I didn’t know a better way to do it.

---

<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:** [September 10, 2022, 12:30am UTC](https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487/8 "2022-09-10T00:30:07Z")

</div>

> [@RGeisen](#):
>
> Thanks for putting up with the multiple posts. I didn’t know a better way to do it.

No worries 🙂 Looking at your posted logs you will see the following message at each interval:

`[outputs.influxdb_v2] Wrote batch of N metrics in...`

That means that Telegraf is reading your file and pushing metrics to InfluxDBv2 successfully.

When you are in InfluxDB, how are you looking up these metrics?  
If you use the data explorer, do you see the metric name?  
Are you sure you are using a wide enough time frame to see the metrics in the UI?

---

<div class="post-metadata">

**Author:** ![RGeisen](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@RGeisen](https://community.influxdata.com/u/RGeisen)\
**Post date:** [September 12, 2022, 12:07am UTC](https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487/9 "2022-09-12T00:07:28Z")

</div>

Yeah I was looking at it through the data explorer. It won’t even show me any tags in the filter section after selecting my bucket so no I can’t see any of the metric names. I’ve been sure to make my timestamp within the last 30 days and then expand the scope of the filter to be the last 30 days but nothing shows up. It just stays as shown below:  
 ![image](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/a/aebb719bc54b176086156bfd956338b3b9f1e7fd.png)

---

<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:** [September 12, 2022, 3:24pm UTC](https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487/10 "2022-09-12T15:24:41Z")

</div>

Two questions, when you output using test:

1. do you see timestamps in the lat 30 days
2. what tags are there?

---

<div class="post-metadata">

**Author:** ![RGeisen](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@RGeisen](https://community.influxdata.com/u/RGeisen)\
**Post date:** [September 12, 2022, 4:06pm UTC](https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487/11 "2022-09-12T16:06:27Z")

</div>

I didn’t realize this, but all the entries are having the same timestamp. It’s weird because the timestamp key value pair isn’t showing up in the entry, but the current timestamp is being applied to all of them. Any idea as to why? Thanks!  
 ![image](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/a/ab4b8910144986455dc72c23994289c97b307e6a.png)

---

<div class="post-metadata">

**Author:** ![RGeisen](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@RGeisen](https://community.influxdata.com/u/RGeisen)\
**Post date:** [September 12, 2022, 4:09pm UTC](https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487/12 "2022-09-12T16:09:27Z")

</div>

I do have the json\_time\_key = “timestamp” in my telegraf config file and have confirmed that it is spelled the same way as the json log timestamp key

---

<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:** [September 12, 2022, 4:11pm UTC](https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487/13 "2022-09-12T16:11:51Z")

</div>

Are you sure your time stamp is a unix\_ms? (e.g. 13 digits)?  
edit: and the timestamp is not nested? it is directly available as a top level key “timestamp”?

---

<div class="post-metadata">

**Author:** ![RGeisen](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@RGeisen](https://community.influxdata.com/u/RGeisen)\
**Post date:** [September 12, 2022, 4:22pm UTC](https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487/14 "2022-09-12T16:22:51Z")

</div>

Here’s an example of one of our logs. timestamp is not nested and is 13 digits.

 ![image](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/5/5b7a224d4ed90e82e43af2705d03dab2a3d29bb6.png)

---

<div class="post-metadata">

**Author:** ![RGeisen](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@RGeisen](https://community.influxdata.com/u/RGeisen)\
**Post date:** [September 12, 2022, 4:27pm UTC](https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487/15 "2022-09-12T16:27:25Z")

</div>

It shouldn’t have the period should it…

---

<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:** [September 12, 2022, 5:59pm UTC](https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487/16 "2022-09-12T17:59:14Z")

</div>

Correct that would explain why it may be failing to parse it and then is using the current timestamp.

---

<div class="post-metadata">

**Author:** ![RGeisen](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@RGeisen](https://community.influxdata.com/u/RGeisen)\
**Post date:** [September 14, 2022, 10:13pm UTC](https://community.influxdata.com/t/cant-see-metrics-on-influxdb-coming-from-telegraf/26487/17 "2022-09-14T22:13:26Z")

</div>

This was the problem and everything is working perfectly now. Thanks so much for your help!!!
