Some metrics that generate by jolokia and send via telegraf to questdb drop because hast dot in it

Is there any way to fix this issue with telegraf?

need to send metric with jolokia to questdb but some metrics has dot in their name and questdb drop them.

like these:

Any idea?


I put this in the issue, but I’ll drop it here as well:

Please also take a look at the various processors we over. I would start with the rename processor if you know what specific tag or field names you need to rename.

1 Like

Thanks work perfectly, totally forgot rename feature of telegraf :smile:

i have another issue, i have java app that generate some monitoring metric and use influxdb java client and directly write to influxdb.

now want to write to questdb instead of influxdb. the problem is 1-i don’t want change my code, questdb has library.
2-questdb only accept tcp while influxdb java client send over http protocol.

now question is, is it possible to use telegraf to input http from influxdb then sent to output tcp to questdb?

any idea?

To be clear, you are trying to export your data from influxdb? With influxdb v3 you can use the sql plugin to query data, but there is no real query plugin for influxdb v1 or influxdb v2.

@jpowers actually i have performance issue on influxdb2 because of cardinalities.
Seems high cardinalities issue resolve on influx 3 but still there is no oss 3 publicly available.
So I decided to replace questdb instead of influxdb2, now questdb2 only accept over tcp protocol, and I’m already use influxdb java client on my code and don’t want to change the code.
So look up for solution that received data like i was send to influxdb then send it over tcp to questdb.

Any idea?

I am not familiar at all with questdb, but they do have a whole page for using Telegraf to write to QuestDB: Telegraf | QuestDB

You could take your Java code, and send it to Telegraf using the http_listener_v2 plugin, which is essentially the influxdb v2 API, and then use Telegraf to output to questdb using the above methods.

1 Like

ok try second solution. here is the result:

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!

here is the code:

import com.influxdb.client.*;
import com.influxdb.client.write.Point;

public void write(Point point) {
if (writeApi == null) {
LOGGER.error(“Can not write to influx, writeApi is null!”);

Any idea?

I have if condition that check influx with ping, now issue is, is there anything like that on telegraf that simulate this behavior?

        if ( {
            writeApi = influxDBClient.makeWriteApi(WriteOptions.builder().batchSize(monitoringBatchSize.get()).flushInterval(monitoringFlushInterval.get()).build());

No, telegraf does not have the full API, only the write endpoint.

@jpowers Is it possible to add health check to this plugin inputs.influxdb_v2_listener? Can i submit feature request on github of telegraf repo?

I would probably not add that as that and other API calls simply do not make sense for telegraf to replicate. Additionally, the path parameter is something a user can set how they want so I don’t want any conflicts.