I’ve got a Mule ESB application that Dynatrace needs to monitor, I see SaaS supports Mule ESB but there are a number of problems. Most pressing is the inability to pick out JMX metrics from Jetty/Mule ESB, which is probably down to me defining the plugin.json incorrectly.
>I have an issue defining the plugin.json, tried multiple ways of accessing the MBeans which unfortunately have "'s and a space in the “name” part of the MBean. Can be seen below for an example app in MuleESB →
$>beans -d Mule.echo<br>#domain = Mule.echo:<br>Mule.echo:Application="application totals",type=org.mule.Statistics<br>Mule.echo:Flow="EchoFlow",type=org.mule.Statistics<br>Mule.echo:connector=connector.http.mule.default,name="endpoint.http.localhost.8084",service="EchoFlow",type=Endpoint<br>Mule.echo:name="EchoFlow",type=Flow<br>Mule.echo:name="_muleSystemModel(seda)",type=Model<br>Mule.echo:name="application totals",type=Application<br>Mule.echo:name="connector.http.mule.default",type=Connector<br>Mule.echo:name=AllStatistics,type=Statistics<br>Mule.echo:name=Configuration<br>Mule.echo:name=MuleContext<br>$>get -d Mule.echo -b Mule.echo:Application="application\ totals",type=org.mule.Statistics TotalProcessingTime<br>#mbean = Mule.echo:Application="application totals",type=org.mule.Statistics:<br>TotalProcessingTime = 5290;
My plugin.json looks like (Simple one to get just one value as a test) →
{<br> "version" : "0.001",<br> "name" : "custom.jmx.muleesb",<br> "type" : "JMX",<br> "entity": "PROCESS_GROUP_INSTANCE",<br> "configUI" : {<br> "displayName": "MuleESB JMX"<br> },<br> "processTypes": [ 10, 12, 13, 16, 17, 18 ], <br> "metrics" : [<br> {<br> "timeseries" :<br> {<br> "key" : "TotalProcessingTime",<br> "unit" : "Count",<br> "dimensions" : [<br> "rx_pid"<br> ],<br> "displayname": "Total Processing Time"<br> },<br> "source" : {<br> "domain": "Mule.echo",<br> "keyProperties": {<br> "type": "org.mule.Statistics",<br> "name": "application totals"<br> },<br> "allowAdditionalKeys": false,<br> "attribute": "TotalProcessingTime",<br> "calculateDelta": false,<br> "calculateRate": false,<br> "aggregation": "SUM"<br> }<br> }<br> ],<br> "ui" :<br> {<br> "keymetrics" : [<br> {<br> "key" : "TotalProcessingTime",<br> "aggregation" : "avg",<br> "mergeaggregation" : "sum",<br> "displayname" : "Total Processing Time"<br> }<br> ],<br> "keycharts" : [<br> {<br> "title" : "MuleESB Total Processing Time",<br> "group" : "MuleESB metrics",<br> "series" : [<br> {<br> "key" : "TotalProcessingTime",<br> "displayname" : "Processing Time",<br> "rightaxis" : true,<br> "color" : "rgba(101,152,186,0.4)",<br> "seriestype" : "bar",<br> "mergeaggregation" : "sum"<br> }<br> ]<br> }<br> ],<br> "charts" : [<br> {<br> "group" : "MuleESB metrics",<br> "title" : "MuleESB Total Processing Time",<br> "series" : [<br> {<br> "key" : "TotalProcessingTime",<br> "displayname" : "Processing Time",<br> "rightaxis" : true,<br> "color" : "rgba(101,152,186,0.4)",<br> "seriestype" : "bar"<br> }<br> ]<br> }<br> ]<br> }<br>}
The issue seems to be with “name”, it should be “\“application\ totals\””, but Dynatrace won’t accept any escaped characters like that. I also tried using “name”: “*” and that also fails …
I say “fails”, unfortunately unless I do something like put in "\\\“application\ totals\\\” and get an exception I get nothing in the logs at all for the monitored process. But what I do see is →
2018-02-28 14:20:46.745 UTC [7e19f84a] info [native] Updating plugins content from revision 1519827060897 to 1519827091624 (11 plugins)<br>2018-02-28 14:20:46.745 UTC [7e19f84a] info [native] Adding plugin custom.jmx.muleesb with version 0.001<br>2018-02-28 14:21:16.187 UTC [7e19f84a] info [native] Updating plugins content from revision 1519827091624 to 1519827060897 (10 plugins)<br>2018-02-28 14:21:16.187 UTC [7e19f84a] info [native] Removing plugin custom.jmx.muleesb<br>2018-02-28 14:21:26.547 UTC [7e19f84a] info [native] Updating plugins content from revision 1519827060897 to 1519827091624 (11 plugins)<br>2018-02-28 14:21:26.547 UTC [7e19f84a] info [native] Adding plugin custom.jmx.muleesb with version 0.001
It “adds” and “removes” the plugin over and over …
I’ve got the plugin.json above working for a more conventionally named MBean in the same process. So “get -d Mule.echo -b Mule.echo:name=MuleContext FreeMemory” works in the above and I get a chart with free memory in it on the UI showing the rest of the config is correct. It just can’t read the “application totals” name key as far as I can see.
Any ideas? I’ve tried escaping, using *, using unicode… Nothing works and there is no debugging info!