Cinimex/mq-java-exporter

Modify output parameters

tsoft-globalproject opened this issue · 11 comments

Hello,

I would like to know if it is possible to modify the output format, example:

This is how they are currently published:
HELP mq_mqinq_mqinq_count_totalcalls MQINQ count
TYPE mq_mqinq_mqinq_count_totalcalls counter
mq_mqinq_mqinq_count_totalcalls{QMGR_NAME="QM1",} 0.0
HELP mq_put_failed_mqput1_count_totalcalls Failed MQPUT1 count
TYPE mq_put_failed_mqput1_count_totalcalls counter
mq_put_failed_mqput1_count_totalcalls{QMGR_NAME="QM1",} 0.0
HELP mq_mqclose_failed_mqclose_count_totalcalls Failed MQCLOSE count
TYPE mq_mqclose_failed_mqclose_count_totalcalls counter
mq_mqclose_failed_mqclose_count_totalcalls{QMGR_NAME="QM1",} 0.0
HELP mqobject_put_mqput_persistent_message_count_totalmessages MQPUT persistent message count

You may be able to modify the fonts to appear like this:

mq_mqinq_mqinq_count_totalcalls:0.0,
mq_put_failed_mqput1_count_totalcalls:0.0,
mq_mqclose_failed_mqclose_count_totalcalls:0.0,

or

[[mq_mqinq_mqinq_count_totalcalls][0.0]],
[[mq_put_failed_mqput1_count_totalcalls][0.0],
[[mq_mqclose_failed_mqclose_count_totalcalls][0.0],
.....

Please could you help me.
Thank you very much

Hello,

MQ exporter uses this library to expose metrics for Prometheus. We do not modify this data, because the only purpose of it is to be consumed by Prometheus.

Best regards.

OK understood.

Another query, can you see information on all channels, the status for example?

Thank you very much.

Yes, sure. Just fill "channels" section in the configuration file. Channel statuses mapping is located here.

Hello,

How do I see the states of the MQ:

MQ listener status
-RUNNING
-STARTING
-STOPPING
-STOPPED

I have to activate something in the file: exporter_config.yaml

Please your comments.
Regards.

Just add to your config file filters for listeners. For example, something like this:

listeners:
  include:
    - '*'
  exclude:
    - SYSTEM.*

This configuration will monitor all, but system listeners.
Check this for configuration example.

Hello,
It works perfect thank you very much.

I wanted to ask you for the last help.

How can I pass the content of the "Registry.getRegistry ()"

I've tried a list or array in thousands of ways and it doesn't work for me.

Could you please send me an example loop.

Thank you.

Not sure, that I'm getting your point, but this method for Registry returns all metrics. Where are you trying to pass the content of Registry.getRegistry()?

Hello,

It is only for a topic training in java (a personal laboratory of lists, arrays, map, etc), I want to pass all the content to an array or list, but I don't know how to extract it from Registry.getRegistry ()

Could you help me please.

You can get metricFamilySamples by calling this method:
registry.metricFamilySamples()
and then simply iterate via next() and hasNext() methods.

Hello,

We are trying to implement monitoring in production, but we have problems installing maven, the server for security reasons has no internet connection.
You know how we could solve this, to be able to install maven offline.

Please your comments.

Hello,

Solved, we copy the maven directory to the server and edit the pom.xml file

Regards.