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

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.

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

FYI: i try [[]] 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 ( {
writeApi = influxDBClient.makeWriteApi(WriteOptions.builder().batchSize(monitoringBatchSize.get()).flushInterval(monitoringFlushInterval.get()).build());

Any idea?

I’ve answered this in your other thread:

Let’s keep responses over there.