i wanted migrate to telegraf from msi afterburner exporter to prometheus.
msi afterburner remote server uses XML by http://x.x.x.x:82/mahm
so i have :
# Read formatted metrics from one or more HTTP endpoints
[[inputs.http]]
## One or more URLs from which to read formatted metrics.
urls = ["http://192.168.0.101:82/mahm"]
data_format = "xml"
## Multiple parsing sections are allowed
[[inputs.http.xpath]]
## Optional: XPath-query to select a subset of nodes from the XML document.
metric_selection = "//HardwareMonitorEntry | //HardwareMonitorHeader | //HardwareMonitorGpuEntry"
## Optional: XPath-query to set the metric (measurement) name.
metric_name = "string('afterburner')"
## Field specifications using a selector.
field_selection = "child::*"
# Configuration for the Prometheus client to spawn
[[outputs.prometheus_client]]
listen = ":9892"
## Only metrics whose measurement name matches a pattern in this list are emitted.
namepass = ["afterburner*"]
telegraf --config --test --debug
/etc/telegraf $ telegraf --config /etc/telegraf/telegraf.conf --test --debug 2>&1 | grep -Fi afterburner
> afterburner,host=f79d85ae76b2,url=http://192.168.0.101:82/mahm data="15.002",flags="None",gpu="0",localizedSrcName="Power",localizedSrcUnits="W",maxLimit="400",minLimit="0",recommendedFormat="%.1f",srcId="97",srcName="Power",srcUnits="W" 1730317717000000000
> afterburner,host=f79d85ae76b2,url=http://192.168.0.101:82/mahm data="9",flags="None",gpu="0",localizedSrcName="Power percent",localizedSrcUnits="%",maxLimit="150",minLimit="0",recommendedFormat="%.0f",srcId="96",srcName="Power percent",srcUnits="%" 1730317717000000000
> afterburner,host=f79d85ae76b2,url=http://192.168.0.101:82/mahm data="50",flags="SHOW_IN_OSD",gpu="0",localizedSrcName="GPU temperature",localizedSrcUnits="C",maxLimit="100",minLimit="0",recommendedFormat="%.0f",srcId="0",srcName="GPU temperature",srcUnits="C" 1730317717000000000
> afterburner,host=f79d85ae76b2,url=http://192.168.0.101:82/mahm data="5",flags="SHOW_IN_OSD",gpu="0",localizedSrcName="GPU usage",localizedSrcUnits="%",maxLimit="100",minLimit="0",recommendedFormat="%.0f",srcId="48",srcName="GPU usage",srcUnits="%" 1730317717000000000
> afterburner,host=f79d85ae76b2,url=http://192.168.0.101:82/mahm data="8",flags="None",gpu="0",localizedSrcName="FB usage",localizedSrcUnits="%",maxLimit="100",minLimit="0",recommendedFormat="%.0f",srcId="50",srcName="FB usage",srcUnits="%" 1730317717000000000
.
.
. reducted
.
.
> afterburner,host=f79d85ae76b2,url=http://192.168.0.101:82/mahm data="641",flags="SHOW_IN_OSD",gpu="0",localizedSrcName="EKWB TOP Radiator Fans",localizedSrcUnits="RPM",maxLimit="2500",minLimit="0",recommendedFormat="%.0f",srcId="255",srcName="EKWB TOP Radiator Fans",srcUnits="RPM" 1730317717000000000
> afterburner,host=f79d85ae76b2,url=http://192.168.0.101:82/mahm data="684",flags="SHOW_IN_OSD",gpu="0",localizedSrcName="Phanteks FRONT Fans",localizedSrcUnits="RPM",maxLimit="2500",minLimit="0",recommendedFormat="%.0f",srcId="255",srcName="Phanteks FRONT Fans",srcUnits="RPM" 1730317717000000000
> afterburner,host=f79d85ae76b2,url=http://192.168.0.101:82/mahm data="752",flags="SHOW_IN_OSD",gpu="0",localizedSrcName="PSU Fan",localizedSrcUnits="RPM",maxLimit="1500",minLimit="0",recommendedFormat="%.0f",srcId="255",srcName="PSU Fan",srcUnits="RPM" 1730317717000000000
> afterburner,host=f79d85ae76b2,url=http://192.168.0.101:82/mahm entryCount="103",entrySize="1324",gpuEntryCount="1",gpuEntrySize="1304",headerSize="32",signature="1296123981",time="1730317716",version="131072" 1730317717000000000
> afterburner,host=f79d85ae76b2,url=http://192.168.0.101:82/mahm BIOS="86.02.39.00.23",device="NVIDIA GeForce GTX 1080 Ti",driver="565.90",family="GP102-A",gpuId="VEN_10DE&DEV_1B06&SUBSYS_85EA1043&REV_A1&BUS_101&DEV_0&FN_0",memAmount="0" 1730317717000000000
/etc/telegraf $
also i can get to http://192.168.0.199:9892/metrics but here no data from input
is i missed some step ?