Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Query of the HealthState #370

Open
augeivv opened this issue Dec 19, 2023 · 7 comments
Open

Proposal: Query of the HealthState #370

augeivv opened this issue Dec 19, 2023 · 7 comments

Comments

@augeivv
Copy link

augeivv commented Dec 19, 2023

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?

@augeivv
Copy link
Author

augeivv commented Jan 11, 2024

Hello,
is there any news on this topic yet?

@marinakog
Copy link
Member

marinakog commented Jan 17, 2024

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
Copy link
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
Copy link
Author

augeivv commented Feb 1, 2024

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
Copy link
Member

russgold commented Feb 2, 2024

@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
Copy link
Author

augeivv commented Feb 5, 2024

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
Copy link
Author

augeivv commented Jun 18, 2024

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
Labels
None yet
4 participants