Cinimex / mq-java-exporter

Exporter for IBM MQ metrics https://prometheus.io/
Apache License 2.0
26 stars 16 forks source link

Consider the need to implement "smart" counters #42

Open echerniak opened 5 years ago

echerniak commented 5 years ago

Current exporter implementation manages counters as simple as possible. Every mq counter is a prometheus counter, which can only increase. There are pros and cons of such implementation: pros:

cons:

The idea is to implement mq counters via prometheus gauges (that's how counters become smart). They will increase between scrapes, but after each scrape all "smart" counters will be reset to 0. This implementation also have pros and cons:

pros:

cons:

Need to be discussed.

sberdyshev commented 5 years ago

An alternative - make counters provide "average per second" value. Time interval, that is publish with mq statistics, can be taken to calculate the average.

Both oprions have to be considered.

sberdyshev commented 5 years ago

@echerniak Describe here the decision we agreed on

echerniak commented 5 years ago

The final agreed decision about counters is following:

The idea is to implement mq counters via prometheus gauges (that's how counters become smart). They will increase between scrapes, but after each scrape all "smart" counters will be reset to 0. Main disadvantage of this approach is a significant increase in metrics values in case of long unavailability of prometheus. It was decided to solve this problem as follows: In case prometheus does not collect metrics longer than usual, the exporter will reset counters and will give the last value only for each counter on the next prometheus scrape.