Telegraf ingested by elastic (via metricbeat?)

Hello, I have multiple services that have telegraf exposing the metrics of the service on port 9122 to show the metrics of what is running (sql, mongodb, etc) so basically I get the metrics by simply doing a get on SERVER:9122/metrics
I would like to use metricbeat to read the metrics and ingest it into elasticsearch but I just can't find any module that would read telegraf,
My last option would be to ingest in logstash and parse everything there, because it's a lot and there's so much I don't know on a what is really reporting

Anyone has done something like that?

The metrics from telegraf looks something like this:

# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.
# TYPE go_memstats_stack_sys_bytes gauge
go_memstats_stack_sys_bytes 917504
# HELP go_memstats_sys_bytes Number of bytes obtained from system.
# TYPE go_memstats_sys_bytes gauge
go_memstats_sys_bytes 4.1664056e+07
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
go_threads 18
# HELP mongodb_active_reads Telegraf collected metric
# TYPE mongodb_active_reads untyped
mongodb_active_reads{deployment="server1",host="server1",hostname="server1:27017",member_status="SEC",node_type="SEC",role="mongo",rs_name="productionserver01",state="SECONDARY",version="4.4.1"} 1
# HELP mongodb_active_writes Telegraf collected metric
# TYPE mongodb_active_writes untyped
mongodb_active_writes{deployment="productionserver1",host="server1",hostname="server1:27017",member_status="SEC",node_type="SEC",role="mongo",rs_name="productionserver01",state="SECONDARY",version="4.4.1"} 0
# HELP mongodb_aggregate_command_failed Telegraf collected metric
# TYPE mongodb_aggregate_command_failed untyped
mongodb_aggregate_command_failed{deployment="productionserver01",host="server1",hostname="server1:27017",member_status="SEC",node_type="SEC",role="mongo",rs_name="productionserver01",state="SECONDARY",version="4.4.1"} 0

I do not have direct access to mongodb or sql, that's why I can't use the modules mongodb or sql from metricbeat

Thanks

A

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.