I have created a JMX check for a com.mchange.v2.c3p0 domain, mbean, and attribute.
The token in the mbean is uniq to everyhost and changes on each host ever time the java services is restarted. Right now I have the token explicitly set for testing the creation of an item, but to make this all managable at scale I need this value to be queried on some type of interval and the value of the macro changed when the change is detected.
Here is an example:
The value in the above that changes on every restart and is different on every host is
I need to replace this part with a macro and I need the value of this macro to be checked and updated on an interval and updated when ever the corresponding service is restarted and be updated if.
While it may not be relevant to this request, I am monitoring up to 20 separate JMX ports on a host where I had by a very nasty method to produce uniq jmx results by port instead of aggregated results which zabbix provides normally.
The token in the mbean is uniq to everyhost and changes on each host ever time the java services is restarted. Right now I have the token explicitly set for testing the creation of an item, but to make this all managable at scale I need this value to be queried on some type of interval and the value of the macro changed when the change is detected.
Here is an example:
Code:
jmx["com.mchange.v2.c3p0:identityToken=1bqov4c9hahtmgt1dbuz5n|388ffbc2,name=1bqov4c9hahtmgt1dbuz5n|388ffbc2,type=PooledDataSource",numConnections]
Code:
1bqov4c9hahtmgt1dbuz5n|388ffbc2
While it may not be relevant to this request, I am monitoring up to 20 separate JMX ports on a host where I had by a very nasty method to produce uniq jmx results by port instead of aggregated results which zabbix provides normally.