Skip to content

Proposal: Query of the HealthState #370

@augeivv

Description

@augeivv

Apparently there has been the same request from others in the past, but without a solution.
We would like to know the HealthState or overallHealthState of the ServerRuntime and ApplicationRuntime.

Here is an example of the JTARuntime. But this one does not seem to work. Is there a solution for this?

Activity

augeivv

augeivv commented on Jan 11, 2024

@augeivv
Author

Hello,
is there any news on this topic yet?

marinakog

marinakog commented on Jan 17, 2024

@marinakog
Member

please change your configuration to :

 - JTARuntime:
      prefix: wls_jta_
      key: name
      healthState:
        prefix: wls_jta_health_
        stringValues:
          state: [ok,failed,overloaded,critical,warn]
piotr-skrobisz

piotr-skrobisz commented on Jan 29, 2024

@piotr-skrobisz
Member

@augeivv I had a similar requirement to export HealthState and overallHealthState of the ServerRuntime. I came up with the following configuration to get those metrics.

metricsNameSnakeCase: true
queries:
- key: name
  prefix: wls_server_  
  stringValues:
    state: [SHUTDOWN,STARTING,RUNNING,STANDBY,FORCE_SUSPENDING,RESUMING,SHUTTING_DOWN,FAILED,UNKNOWN,FAILED_NOT_RESTARTABLE,ADMIN,FORCE_SHUTTING_DOWN]
  overallHealthState:
    prefix: wls_server_overallhealth_
    stringValues:
      state: [ok,failed,overloaded,critical,warn]
  healthState:
    prefix: wls_server_health_
    stringValues:
      state: [ok,failed,overloaded,critical,warn]   
augeivv

augeivv commented on Feb 1, 2024

@augeivv
Author

Thank you for your feedback.
However, I have a strange problem. The HealthState works with the ApplicationRuntime or JTARuntime, as in the example from @marinakog.
But not with the server runtime.
The status as shown at @piotr-skrobisz works.

i have following config:

metricsNameSnakeCase: true
queries:
  - key: name
    prefix: wls_server_
    values: [ openSocketsCurrentCount, activationTime ]
    stringValues:
      state: [SHUTDOWN,STARTING,RUNNING,STANDBY,FORCE_SUSPENDING,RESUMING,SHUTTING_DOWN,FAILED,UNKNOWN,FAILED_NOT_RESTARTABLE,ADMIN,FORCE_SHUTTING_DOWN]
    overallHealthState:
      prefix: wls_server_overallhealth_
      stringValues:
        state: [ok,failed,overloaded,critical,warn]
    healthState:
      prefix: wls_server_health_
      stringValues:
        state: [ok,failed,overloaded,critical,warn]
russgold

russgold commented on Feb 2, 2024

@russgold
Member

@augeivv What do you mean, "the status as shown at @piotr-skrobisz works"? Do you mean the example he offered? That is now the current example.

augeivv

augeivv commented on Feb 5, 2024

@augeivv
Author

Yes, exactly. @russgold
The example he offered works. If I also add values.openSocketsCurrentCount. I don't get the healthstate of the server displayed.

Here is the output for my configuration from my example above:

wls_server_activation_time{name="AdminServer"} 1707126949886
wls_server_open_sockets_current_count{name="AdminServer"} 3
wls_server_state{name="AdminServer",value="RUNNING"} 2
wls_scrape_mbeans_count_total{instance="localhost:7001"} 3
wls_scrape_duration_seconds{instance="localhost:7001"} 0.18
wls_scrape_cpu_seconds{instance="localhost:7001"} 0.30
exporter_version{instance="localhost:7001",version="v2.1.2"} 1

is it not poosible to have values and healthState in one query?

augeivv

augeivv commented on Jun 18, 2024

@augeivv
Author

hello @russgold ,
I wanted to ask again if there is a solution to the problem.
I have tried the configuration in the latest version of the exporter (2.2.0) and unfortunately I still get the same error.
I am not able to use values and healthstates within the same query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @russgold@marinakog@piotr-skrobisz@augeivv

        Issue actions

          Proposal: Query of the HealthState · Issue #370 · oracle/weblogic-monitoring-exporter