Regex in Templating

Hey guys, I am pulling Sensu data into Grafana via InfluxDB. I want to have Templating build around subscriptions but I can not get a regex to match. The subscriptions are separated by “:”, so i need the regex to exclude. I tried more than a few options with no luck including ([^:]+)/g.

When I use https://regex101.com/, ([^:]+)/g. works great.

Linux_Servers:Docker:Vision_Hosts
Linux_Servers:Docker:Vision_Hosts:Database_Servers
Linux_Servers:WAS_Testing

Thanks for the help!!

64d5ed70ad6169be3d05f3b6f4ae49b7ba0c4830_1_690x242

66f2b36233cb86d8baa01b666c45961cb765e516_1_690x253

Hi,

I don’t understand what you’re trying to accomplish. Do you want to get rid of sensu: or all :?

Marcus

I want to split the names, this is how it looks today:

Linux_Servers:Docker:Vision_Hosts:Database_Servers

So I want to break it down like this:
Linux_Servers
Vision_Hosts
Database_Servers

I’m afraid you cannot do that with regex in Grafana. Only possibility is if influxdb has that functionality so that you can accomplish what you want/need query wise.

Marcus

Ok, thank you for your help