Hi all,

I am reaching out with a proposal for two different extensions of your 
project.

In the company that I work for, we needed to extend your project in order 
to collect additional data from non-standard mbeans. I am opening this 
discussion to check if you would be interested in merging these extensions 
in your project.


1. Exposing string-type mbean attributes as labels.

The mbeans that we are working with have a lot of string-type attributes 
which are not converted into metrics by your project.

However, we need to expose the information offered by these string 
attributes to Prometheus, such that they can be used in queries, or be 
displayed in graphs.

The best way to do this (that we were able to find) is to expose these 
attributes as labels on the other metrics. We made this behavior 
configurable in the rules section of the yaml configuration file. Here is 
an example:

rules:

  - pattern: '{some mbean pattern}'

     name: some_metric

     attributesAsLabels:

        - firstStringAttribute

        - secondStringAttribute

This produces a metric that looks like this:

some_metric_attribute{firstStringAttribute="something",secondStringAttribute="something
 
else"} 123

 

2. Adding additional metrics to an mbean.

Some of the mbeans that we are working with do not expose any useful 
metrics, so we implemented a way to define a custom metric through the 
configuration file. This is also configurable in the rules section of the 
yaml configuration file. Here is an example:

  - pattern: '{some mbean pattern}'

     name: some_metric

     extraMetrics:

        - name: someName

          value: someValue

          description: someDescription

This produces a metric that looks like this:

some_metric_someName{...} someValue

The description is used in the "HELP" section of the logs and indicates 
what purpose the metric serves.

Please let me know if you are interested in these features. If you are, I 
will open separate pull requests.

Also, please tell me if there is any way to achieve this behavior in 
another way that is already available in your project.


Kind regards,

Karina Ciupa
karina_ci...@infobest.ro

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-developers/402f2afd-2142-4562-868b-1fd63172f86cn%40googlegroups.com.

Reply via email to