Inputs.influxdb_v2_listener can't work properly with "influxdb client java library" because of health check of influxdb

Hi
currently send metric from my java app via “influx java client library” to influxdb.
now need to send telegraf instead of influx , so add below parameter to telegraf.

[[inputs.influxdb_v2_listener]]
service_address = “:8086”

after reset telegraf got this error on my java app:
2023-10-17 09:11:34,731 ERROR [ApiWriter] Can not write to influx, writeApi is null!

I have IF condition that check influx with ping, now issue is, is there anything like that on telegraf that simulate this behavior? i mean return resp 200 on this path http://192.168.1.1:8086/health

FYI: i try [[outputs.health]] but it can’t listen to 8086 because it use by inputs.influxdb_v2_listener

here is the code, ping and data work on port 8086:
if (influxDBClient.ping()) {
writeApi = influxDBClient.makeWriteApi(WriteOptions.builder().batchSize(monitoringBatchSize.get()).flushInterval(monitoringFlushInterval.get()).build());

Any idea?
Thanks

I’ve answered this in your other thread:

Let’s keep responses over there.