oracle / weblogic-monitoring-exporter

WebLogic Monitoring Exporter exposes metrics and monitoring data through REST APIs for consumption by other tools (e.g. Prometheus)
Universal Permissive License v1.0
105 stars 80 forks source link

WLS14: Not able to access JaxRsUriRuntimeMBean and JaxRsResourceMethodRuntime #369

Open dannemano opened 10 months ago

dannemano commented 10 months ago

Hi,

I have a working config for scraping ServerRuntime MBeans but I cannot get a hold on JAX-RS related details.

The below config is working and looking at the docs the "rootResourcesByUri" should return what I want. But adding rootResourcesByUri does not return anything.

- key: name
  keyName: server
  applicationRuntimes:
    key: name
    keyName: app
    componentRuntimes:
      type: WebAppComponentRuntime
      jaxRsApplications:
        type: JaxRsApplicationRuntime
        prefix: jax_rs_app_
        key: name
        values: [invocationTotalCount,executionTimeAverage,executionTimeTotal,executionTimeHigh]

I have also tried going through the libraryRuntime like the below example, but that is not working either.

- key: name
  keyName: server
  applicationRuntimes:
    key: name
    keyName: app
    libraryRuntimes:
      key: name
      referencingRuntimes:
        key: name
        type: JaxRsResourceMethodRuntime
        prefix: jaxrs_resource_
        values: [invocationCount]

Can you please point me in the right direction? How can I access JaxRsUriRuntimeMBean and JaxRsResourceMethodRuntime?

russgold commented 9 months ago

@dannemano could you tell me what you see if you replace "metrics" in the URL with "messages"?

dannemano commented 4 months ago

Hi! I see the following under the /messages (below is a snippet), the rootResourcesByClass is empty.

At 11:14:02.6238432, REQUEST to https://localhost:18082/management/weblogic/latest/serverRuntime/search:
{"links":[],"fields":["name"],"children":{"applicationRuntimes":{"links":[],"fields":["name"],"children":{"componentRuntimes":{"links":[],"fields":["type"],"children":{"jaxRsApplications":{"links":[],"fields":["name","type","invocationCount","executionTimeAverage","executionTimeHigh"],"children":{"rootResourcesByClass":{"links":[]}}}}}}}}}
REPLY:
{
    "name": "<server>",
    "applicationRuntimes": {
        "items": [
            {
                "name": "datasource",
                "componentRuntimes": {
                    "items": [{
                        "type": "JDBCDataSourceRuntime"
                    }]
                }
            },
            {
                "name": "app-ear",
                "componentRuntimes": {
                    "items": [
                        {
                            "type": "WebAppComponentRuntime",
                            "jaxRsApplications": {
                                "items": [
                                    {
                                        "executionTimeHigh": 1538,
                                        "type": "JaxRsApplicationRuntime",
                                        "name": "JaxRSApp",
                                        "invocationCount": 4,
                                        "executionTimeAverage": 727,
                                        "rootResourcesByClass": {
                                            "items": []
                                        }

The config for above query is:

- key: name
  keyName: server
  applicationRuntimes:
    key: name
    keyName: app
    componentRuntimes:
      type: WebAppComponentRuntime
      jaxRsApplications:
        type: JaxRsApplicationRuntime
        prefix: jax_rs_app_
        key: name
        values: [invocationCount,executionTimeAverage,executionTimeHigh]
        rootResourcesByClass:
          key: name
          type: JaxRsResourceRuntime
          prefix: jax_rs_class_
dannemano commented 4 months ago

By the way, I am using Weblogic 14 now.

dannemano commented 4 months ago

Most metrics that I tried works, I just can navigate from JaxRsApplicationRuntimeMBean down in either RootResourcesByClass or RootResourcesByUri. Very strange!