Regular Expression in Query

HI

I am using grafana to plot the graph from Elasticsearch data.

Here, I have to plot the graph for the individual java processes for their metrics. We are doing this using system process cmdline which differs for every service as below.

system.process.cmdline:“java -noverify -Xmx2048m -jar /home/ec2-user/mgmtservice/jars/mgmt-service-1.3.30-runnable.jar server /home/ec2-user/deployment/ymls/prod/mgmtservice.yml”

But here, jar snapshot version changes often. As mgmt-service-1.3.30-runnable.jar , mgmt-service-1.3.31-runnable.jar,mgmt-service-1.3.32-runnable.jar ,mgmt-service-1.3.33-runnable.jar ,mgmt-service-1.3.34-runnable.jar …

Please suggest how I can achieve templating here.

Here is the query,

metricset.module:system AND metricset.name:process AND beat.hostname:“server11” AND system.process.cmdline:“java -noverify -Xmx2048m -jar /home/ec2-user/mgmtservice/jars/mgmt-service-1.3.30-runnable.jar server /home/ec2-user/deployment/ymls/prod/mgmtservice.yml”

hello @daniellee, Kindly let us know if its possible on grafana?

You’ve probably figured this out already. This is just a normal lucene query with regex:

Docs for elasticsearch and regexp:

https://www.elastic.co/guide/en/elasticsearch/reference/6.2/query-dsl-regexp-query.html#regexp-syntax