Unable to see metrics in the influx CLI

Hi,

I cannot see any metrics in the influx CLI.
I have Telegraf plugin output to influxd and Telegraf input is the gnmi client -https://github.com/influxdata/telegraf/blob/master/plugins/inputs/gnmi/

Some debugging:

  1. I have logs turned on both telegraf and influxd.

  2. I see a new tsm file in the /var/lib/influxdb/data/telegraf/autogen (output of ls -al–> -rw-r–r-- 1 root root 1025107 Jan 4 18:20 000000004-000000002.tsm

  3. I also see that telegraf has written some data into the influxd.
    log snippet from telegraf:
    01-04T18:22:14Z D! [outputs.influxdb] Wrote batch of 1 metrics in 971.334µs
    2023-01-04T18:22:14Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics

  4. Logs in the influxd show data written from telegraf in the database that I created:
    snippet:
    [httpd] 127.0.0.1 - - [04/Jan/2023:18:21:18 +0000] "POST /write?db=telegraf-deepali HTTP/1.1 " 204 0 “-” “Telegraf/1.24.3 Go/1.19.3” 9538aae8-8c5c-11ed-805f-fa163ec08e36 5470

  5. I also printed statements inside the telegraf accumulator AddMetric() function and in the func (g *SeriesGrouper) Add(…) to check if the expected metrics is added. I see that the grouper has added the expected measurement and key to the accumulator and AddMetric returnms no error.

Problem: The influx CLI does not show the added metrics.
influx -database ‘telegraf-deepali’ -host ‘127.0.0.1’ -port ‘8086’ -format=json -pretty
Connected to http://127.0.0.1:8086 version 1.8.10
InfluxDB shell version: 1.8.10

show field keys
{
“results”: [
{}
]
}

show series
{
“results”: [
{}
]
}