Convert lower case to upper case from regex in templates

Hi Team,

Is there any way to convert Influxdb query output from lower case to upper case using regex in templates?

Thanks in Advance!!
Himanshu

Hi! No, it’s impossible to do by using regex.

Is there a way to convert case in places other than the regex? For example, I have two metrics that are related by hostname. In one metric, the hostname is lower case. In the other, due to naming conventions, it’s upper case.

I’d like to convert the case of one to use in a template definition or convert the case in my metric query.

Ie., for my query I would like something like this:

.upper([[hostname]]).ORA*Instance

where hostname is a variable defined by the query below:

.ora

I would also be ok defining my hostname template variable as .upper(ora) or something like that.

thanks

Bumping into the same. Wondering if you guys found a workaround here. Thanks.

You can use case-insensitive regex (?i) in WHERE conditions, but you will have still problem with GROUP. The best approach is to have clean and consistent data, so you don’t need to hack it in your TSDB.