JMX exporter works for weblogic only gather JVM metrics no weblogic's

1,039 views
Skip to first unread message

Kallen Ding

unread,
Jul 1, 2017, 6:11:06 AM7/1/17
to Prometheus Developers
After I installed weblogic with `java -jar wls1036_generic.jar`,

I add a line into  `wlserver_10.3/server/bin/startNodeManager.sh` for metrics gathering:
```
JAVA_OPTIONS="$JAVA_OPTIONS -javaagent:/opt/Oracle/monitor/jmx_prometheus_javaagent-0.9.jar=9102:/opt/Oracle/monitor/weblogic.yml"
```
Then I boot weblogic with `startNodeManager.sh` successfully and can glimpse metrics via http://localhost:9102/metrics , but unfortunately it only contains JVM metrics info, none of weblogic.

I doubt that the `weblogic.yml` is not matched, it looks like this:

```
---
lowercaseOutputName: true
lowercaseOutputLabelNames: true
whitelistObjectNames:
  - "com.bea:Name=*,Type=ServerRuntime"
  - "com.bea:ServerRuntime=*,Type=ApplicationRuntime,*"
  - "com.bea:ServerRuntime=*,Type=JDBCOracleDataSourceRuntime,*"
  - "com.bea:ServerRuntime=*,Type=JMSDestinationRuntime,*"
  - "com.bea:ServerRuntime=*,Type=SAFRemoteEndpointRuntime,*"
  - "com.bea:ServerRuntime=*,Type=ThreadPoolRuntime,*"

rules:
  - pattern: "^com.bea<ServerRuntime=.+, Name=(.+), Type=JDBCOracleDataSourceRuntime><>(.+): (Running|Suspended|Shutdown|Overloaded|Unknown)$"
    attrNameSnakeCase: true
    name: weblogic_datasource_$2
    value: 1
    labels:
      name: $1
      state: $3

  - pattern: "^com.bea<ServerRuntime=.+, Name=(.+), Type=JDBCOracleDataSourceRuntime><>(.+):"
    attrNameSnakeCase: true
    name: weblogic_datasource_$2
    labels:
      name: $1

  - pattern: "^com.bea<ServerRuntime=.+, Name=(.+), Type=JMSDestinationRuntime, JMSServerRuntime=.+><>(.+):"
    attrNameSnakeCase: true
    name: weblogic_messaging_$2
    labels:
      destination: $1

  - pattern: "^com.bea<ServerRuntime=.+, Name=(.+), Type=SAFRemoteEndpointRuntime><>(.+):"
    attrNameSnakeCase: true
    name: weblogic_messaging_$2
    labels:
      endpoint: $1

  - pattern: "^com.bea<ServerRuntime=.+, Name=ThreadPoolRuntime, Type=ThreadPoolRuntime><>(.+):"
    attrNameSnakeCase: true
    name: weblogic_threadpool_$1

  - pattern: "^com.bea<ServerRuntime=.+, Name=(.+), Type=ApplicationRuntime><HealthStateJMX>(.+): HEALTH_(.+)"
    attrNameSnakeCase: true
    name: weblogic_application_$2
    value: 1
    labels:
      name: $1
      state: $3

  - pattern: "^com.bea<Name=.+, Type=ServerRuntime><HealthStateJMX>(.+): HEALTH_(.+)"
    attrNameSnakeCase: true
    name: weblogic_server_$1
    value: 1
    labels:
      state: $2

  - pattern: "^com.bea<Name=.+, Type=ServerRuntime><>(.+): ([A-Z_]+)$"
    attrNameSnakeCase: true
    name: weblogic_server_$1
    value: 1
    labels:
      state: $2
```

Here is the metrics I gathered: [weblogic_metrics.txt](https://github.com/prometheus/jmx_exporter/files/1116885/weblogic_metrics.txt)

Hope to reply, Thanks!

jan.wein...@gmail.com

unread,
Dec 28, 2017, 12:17:29 PM12/28/17
to Prometheus Developers
No solution from me, unfortunately.

Instead, I have the same problem on WildFly. I start the server with similar JAVA-OPTIONS, i.e. with the java agent.

I can see collected metrics at http:// localhost:905/metrics, but these are only jvm metrics, not WildFly-related metrics. Furthermore, my own custom counters are not shown.

Has there been a solution for your issue?

Best regards
Jan

Kallen Ding

unread,
Dec 29, 2017, 12:01:22 AM12/29/17
to Prometheus Developers
The is a way to collect weblogic metric via SNMP Exporter

You can have a try whether it can support WildFly. :)

在 2017年12月29日星期五 UTC+8上午1:17:29,jan.wein...@gmail.com写道:
Reply all
Reply to author
Forward
0 new messages