Mule agent Mbean to InfluxDB via telegraf

classic Classic list List threaded Threaded
2 messages Options
KaneK KaneK
Reply | Threaded
Open this post in threaded view
|

Mule agent Mbean to InfluxDB via telegraf

Hi,

I have got the Mule java agent running and exposed on the port I want, I can call the list and browse the metrics using Hawtio.

I can not translate the exposed endpoints to the format telegraf needs....

example Mbean
"Mule.MessageEngine_v1.5.9": {
       "Flow=\"MainFlowHttpsPost\",type=org.mule.Statistics": {
                "op": {
                    "clearStatistics": {
                        "args": [],
                        "ret": "void",
                        "desc": "Operation exposed for management"
                    }
                },
                "attr": {
                    "FatalErrors": {
                        "rw": false,
                        "type": "long",
                        "desc": "Attribute exposed for management"
                    },
                    "TotalEventsReceived": {
                        "rw": false,
                        "type": "long",
                        "desc": "Attribute exposed for management"
                    },
                    "ExecutionErrors": {
                        "rw": false,
                        "type": "long",
                        "desc": "Attribute exposed for management"
                    },
                    "SyncEventsReceived": {
                        "rw": false,
                        "type": "long",
                        "desc": "Attribute exposed for management"
                    },
                    "ProcessedEvents": {
                        "rw": false,
                        "type": "long",
                        "desc": "Attribute exposed for management"
                    },
                    "TotalProcessingTime": {
                        "rw": false,
                        "type": "long",
                        "desc": "Attribute exposed for management"
                    },
                    "AsyncEventsReceived": {
                        "rw": false,
                        "type": "long",
                        "desc": "Attribute exposed for management"
                    },
                    "MinProcessingTime": {
                        "rw": false,
                        "type": "long",
                        "desc": "Attribute exposed for management"
                    },
                    "AverageProcessingTime": {
                        "rw": false,
                        "type": "long",
                        "desc": "Attribute exposed for management"
                    },
                    "MaxProcessingTime": {
                        "rw": false,
                        "type": "long",
                        "desc": "Attribute exposed for management"
                    }
                },
                "class": "org.mule.module.management.mbean.FlowConstructStats",
                "desc": "Information on the management interface of the MBean"
            },

Example of a working telegraf collected metric

  [[inputs.jolokia2_agent.metric]]
    name     = "java_memory_pool"
    mbean    = "java.lang:name=*,type=MemoryPool"
    paths    = ["Usage", "PeakUsage", "CollectionUsage"]
    tag_keys = ["name"]
    tag_prefix = "pool_"

I translated the json above as this, it doesnt work, nothing is collected

  [[inputs.jolokia2_agent.metric]]
    name   = "Mule_Message_Engine"
    mbean  = "Mule.MessageEngine_v1.5.9:name=MainFlowHttpsPost,type=org.mule.Statistics"
    paths  = ["TotalProcessingTime"]
    tag_keys = ["name"]

Hawtio shows I should see a total of 55443 as the metric.

Any suggestions please ?


KaneK KaneK
Reply | Threaded
Open this post in threaded view
|

Re: Mule agent Mbean to InfluxDB via telegraf

To answer this myself after lots of prodding I gave up and tried wildcards, this works!

  [[inputs.jolokia2_agent.metric]]
    name   = "Mule_Message_Engine"
    mbean  = "Mule.MessageEngine_v1.5.9:name=*,type=*"
    tag_keys = ["name"]