Manipulate output in Telegraf

Hi Guys,

I am using Telegraf to collect metrics and export to Prometheus as per the below path

Somecalculations(scripts) --> Telegraf --> Prometheus

I am trying to display below metrics as output from Telegraf . I have written script which will collect data for Telegraf and want Telegraf to return metrics in below format .

Here last 1 means , java is installed .

With below metrics I can display in panel the version of any product such as Java , using prometheus query . Thanks

java_version{version=“1.8.0_191-b12”,vendor"Oracle Corporation",} 1