Skip to content

Health indicators have ambiguous keys #1291

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

Closed
tkruse opened this issue Jul 24, 2014 · 8 comments
Closed

Health indicators have ambiguous keys #1291

tkruse opened this issue Jul 24, 2014 · 8 comments
Milestone

Comments

@tkruse
Copy link

tkruse commented Jul 24, 2014

Hi,
invoking the health actuator, I got this response:
{"status":"UP","version":"2.4.8"}

It would be nice if there was slightly more information here by default, such as what the version belongs to (in my case mongodb version).

@cdupuis cdupuis added this to the 1.2.0 milestone Jul 24, 2014
@cdupuis cdupuis self-assigned this Jul 24, 2014
@cdupuis
Copy link
Contributor

cdupuis commented Jul 24, 2014

That looks odd indeed. I assume you only have the MongoHealthIndicator active in your app. I look at adding some sort of key or identifier.

@snicoll
Copy link
Member

snicoll commented Jul 24, 2014

👍 I think the output structure should be similar if we have one HealthIndicator or many.

@tkruse tkruse changed the title Spring boot actuators have ambiguous keys Haelth indicators have ambiguous keys Jul 25, 2014
@tkruse tkruse changed the title Haelth indicators have ambiguous keys Health indicators have ambiguous keys Jul 25, 2014
@dsyer
Copy link
Member

dsyer commented Jul 25, 2014

I'm not sure that I agree entirely - if there is only one HealthIndicator then I don't need to see an array with one item in it. It would be good to know what type of indicator it is that has that version field (e.g. just add "type":"mongodb" to the object).

@cdupuis
Copy link
Contributor

cdupuis commented Jul 25, 2014

@dsyer right now we the following structure when more then one HealthIndicator is registered:

{
  "status" : "UP",
  "ic" : {
    "status" : "UP",
    "version" : "ICEthS1-2.0.197"
  },
  "mongo" : {
    "status" : "UP",
    "version" : "2.4.8"
  }
}

and the following with only one: {"status":"UP","version":"2.4.8"}

So with the proposed change this would change to:

{
  "status" : "UP",
  "ic" : {
    "status" : "UP",
    "version" : "ICEthS1-2.0.197"
  }
}

I think that would be consistent.

@tkruse
Copy link
Author

tkruse commented Jul 25, 2014

In case that the information is going to be processesd by a machine, I believe it would be good to have the same structure regardless of whether there is one entry or many. That way, if you start with one Indicator, write a parsing script, and later add a second one, your parsing script will still work. Same for removing an indicator down to one. Parsing the result should stay as robust as possible.

@cdupuis
Copy link
Contributor

cdupuis commented Jul 25, 2014

@tkruse I agree.

@cdupuis cdupuis closed this as completed in 063f67d Aug 8, 2014
@philwebb philwebb reopened this Aug 8, 2014
@philwebb
Copy link
Member

philwebb commented Aug 8, 2014

This change has broken the spring-boot-sample-actuator-ui tests

@philwebb
Copy link
Member

philwebb commented Aug 8, 2014

It returns {"status":"UP"[,"status":{"status":"UP"}]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants