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

Expose Fleet Information via HTTP API #445

Open
chill389cc opened this issue Aug 16, 2024 · 0 comments
Open

Expose Fleet Information via HTTP API #445

chill389cc opened this issue Aug 16, 2024 · 0 comments

Comments

@chill389cc
Copy link

Is your feature request related to a problem? Please describe.
We like seeing the fleet information made available in the "EC2 Fleet Status" widget on the Jenkins homepage, but we'd love to be able to set up monitoring for some of those values. For example, we often run into an issue where Jenkins (likely this plugin in specific) loses track of how many instances it has scaled in and gets in a bad state which requires us to restart Jenkins. It would be nice to be able for us to set up some custom reporting, but that relys on having programmatic access to the values reported by this fleet plugin.

Describe the solution you'd like
Access to the values displayed in the "EC2 Fleet Status" widget available programmatically, preferrably in JSON or a similar format. The dream would be able to hit a URL like https://<jenkins-base>/api/ec2-fleets/json and get the same information that the widget is displaying. To be specific, we want HTTP/Restful API access in an easily machine-readable format to all of the public properties of the FleetStateStats class for each fleet.

Describe alternatives you've considered
We've considered web-scraping the Jenkins Homepage to extract this information, but the information displayed is in a plaintext format and the widget doesn't use any unique id attributes in the HTML which makes identifying the specific HTML elements to parse very difficult and potentially non-deterministic depending on what other plugins we may or may not have enabled and if any changes are made to the widget layout in this plugin.

Additional context
This is unrelated, but we probably wouldn't be making this request if Jenkins (or this plugin, I'm not sure which) was a little better at keeping track of how many instances it has asked to scale in. We've had an issue a couple times now where our AWS ASG has a desired count of dozens more than what Jenkins is reporting, for a prolonged period of time.

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

No branches or pull requests

1 participant