The python script will print the following line protocol output
NPM_Port,Network=n1,Name=port1,Device_Category=Firewall,Tstatus=Up status=“Up”,inUtil=0.0000,outUtil=0.0000,number=3i,type=“Ethernet”,speed=10000000000.0000,mtu=1500i,InBandwidth=10000000000.0000,OutBandwidth=10000000000.0000,outBps=263.9062,inBps=505.8402,bps=769.7463,outPps=0.7633,inPps=0.8366,inPktSize=76.0000,outPktSize=43.0000,outUcastPps=0.0100,outMcastPps=0.7533,inUcastPps=0.0067,inMcastPps=0.8300 1671528569000000000
Using influx -import -path=datarrr.txt -precision=ns to import manually has no issues.
However using telegraf exe plugin to run the script will result in the following error
Error in plugin: metric parse error: expected field at
Checked the telegraf log,
the auto generated output by telegraf seem to be the following
NPM_Port,Network=n1,Name=port1,Device_Category=Firewall,Tstatus=Up status=\ “Up”,mtu=1500i,InBandwidth=2000000000.0000,OutBandwidth=2000000000.0000,outBps=2050.1516,inBps=2107.7522,bps=4157.9040,outPps=2.0667,inPps=2.1867,inPktSize=120.0000,outPktSize=124.0000,outUcastPps=2.0667,outMcastPps=0.0000,inUcastPps=2.1200,inMcastPps=0.0667 1671527674000000000
Seem like \ is causing the issues.
status= \ “Up”
How do I resolve this? Do I need to change the telegraf settings?
I have tried changing the data_format from “influx” to “value” but to no avail.