You are welcome @ziebarthj ! You really took this one to the finish line!
@ldrascic is a real pro at InfluxDB and a Regex Ninja…maybe he can offer some advice on the Regex issue.
You are welcome @ziebarthj ! You really took this one to the finish line!
@ldrascic is a real pro at InfluxDB and a Regex Ninja…maybe he can offer some advice on the Regex issue.
Would also help others immensely if you provided sample csv data or line protocol
I can do that @yosiasz! Sorry…I didn’t even think about posting a copy of that earlier. Here is a small snippet of the line protocol data that I’m sending in through the API:
Ak,point_id=RTU\ Comms CS=0,AS=0,ND=0,OD=0,QU=0,SI=0,MO=0,ERRF=0,INFO=0,UA=0,0_State=On-Line,1_State=Off-Line 1694788932000000000
Ak,point_id=D20C1\ Comms CS=0,AS=1,ND=0,OD=0,QU=0,SI=1,MO=0,ERRF=0,INFO=0,UA=0,0_State=On-Line,1_State=Off-Line 1694788932000000000
Ak,point_id=WAPA\ RTU\ Comms CS=1,AS=0,ND=0,OD=0,QU=0,SI=1,MO=0,ERRF=0,INFO=0,UA=0,0_State=Off-Line,1_State=On-Line 1694788932000000000
Ak,point_id=D20AC1\ Comms CS=0,AS=1,ND=0,OD=0,QU=0,SI=0,MO=0,ERRF=0,INFO=0,UA=0,0_State=On-Line,1_State=Off-Line 1694788932000000000
Ak,point_id=D20AC2\ Comms CS=1,AS=1,ND=0,OD=0,QU=0,SI=0,MO=0,ERRF=0,INFO=0,UA=0,0_State=On-Line,1_State=Off-Line 1694788932000000000
Sur\ ek,point_id=RTU\ Comms CS=0,AS=0,ND=0,OD=0,QU=0,SI=0,MO=0,ERRF=0,INFO=0,UA=0,0_State=On-Line,1_State=Off-Line 1694788932000000000
Sur\ ek,point_id=D20S1\ Comms CS=0,AS=1,ND=0,OD=0,QU=0,SI=0,MO=0,ERRF=0,INFO=0,UA=0,0_State=On-Line,1_State=Off-Line 1694788932000000000
Sur\ ek,point_id=D20KI1\ Comms CS=0,AS=1,ND=0,OD=0,QU=0,SI=0,MO=0,ERRF=0,INFO=0,UA=0,0_State=On-Line,1_State=Off-Line 1694788932000000000
Sur\ ek,point_id=D20AC1\ Comms CS=0,AS=1,ND=0,OD=0,QU=0,SI=0,MO=0,ERRF=0,INFO=0,UA=0,0_State=On-Line,1_State=Off-Line 1694788932000000000
Sur\ ek,point_id=D20AC2\ Comms CS=0,AS=1,ND=0,OD=0,QU=0,SI=0,MO=0,ERRF=0,INFO=0,UA=0,0_State=On-Line,1_State=Off-Line 1694788932000000000
Sur\ ek,point_id=CB-152 CS=1,AS=0,ND=0,OD=0,QU=0,SI=0,MO=0,ERRF=0,INFO=0,UA=1,0_State=Tripped,1_State=Closed 1694788932000000000
Sur\ ek,point_id=CB-152\ Trip\ Coil\ 1 CS=1,AS=1,ND=0,OD=0,QU=0,SI=0,MO=0,ERRF=0,INFO=0,UA=0,0_State=Alarm,1_State=Normal 1694788932000000000
Sur\ ek,point_id=CB-152\ Trip\ Coil\ 2 CS=1,AS=1,ND=0,OD=0,QU=0,SI=0,MO=0,ERRF=0,INFO=0,UA=0,0_State=Alarm,1_State=Normal 1694788932000000000
Sur\ ek,point_id=CB-152\ Hot\ Line\ Order CS=0,AS=1,ND=0,OD=0,QU=0,SI=0,MO=0,ERRF=0,INFO=0,UA=0,0_State=Inactive,1_State=Active 1694788932000000000
Sur\ ek,point_id=CB-152\ Reclosing CS=0,AS=1,ND=0,OD=0,QU=0,SI=0,MO=0,ERRF=0,INFO=0,UA=1,0_State=Enabled,1_State=Disabled 1694788932000000000
Hi @ziebarthj ,
I don’t see any issue with your regex while testing on regex101. Can you try with this regex:
.*point_id="([^"]*)".*
Best regards,
ldrascic
Hi @ldrascic Thanks for the reply.
I still receive the same error (I misread it and then accordingly mistyped it earlier) when I try to use the Partition by Values transform, stating that I can only use it with a single frame. And, this Regex string doesn’t change anything at all when I put it in the Rename by Regex transform. My series are still named status and point_id name. In all honesty, the overrides were not hard to take care of once we got the start and stop times out of the series names, so we are just moving forward with that. It’s interesting to me that the series does not get renamed to take "status " out with this, but I’m still new enough to Grafana that this may just be how it defaults putting series names together and I haven’t figured that out yet.
Responding to @yosiasz 's message that came through to my email but that I cannot find in this thread string:
what is the backslash in this measurements and tags?
Sur\ ek
is the
RTU\ Comms
the tag? as inRTU Comms
Hello. InfluxDB’s documentation on Line Protocol states that, in the measurement name and the tag names and values, spaces must be escaped, so those backslashes are all escaping the spaces in the measurement and tag values. Quotes are allowed, but they will actually be interpreted as part of the measurement name or tag name or value rather than as enclosing a text field. So, some of the measurement names are Ak and some of them are Sur ek and yes, RTU Comms is indeed one of my tag values in the point_id tag.
See this page for the reference that I followed to get my Line Protocol set up right: Line protocol | InfluxDB OSS v2 Documentation
Sorry I deleted it because I remembered the escape stuff in the doc. I still cannot import your line protocol as is to a bucket
Anyways this has been answered so I won’t beat a dead horse