redhat-cop / openshift-toolkit

A collection of code samples to help you get started with OpenShift
Apache License 2.0
232 stars 150 forks source link

cluster_resource_report.py to check cluster requests/limits #29

Closed stratus-ss closed 6 years ago

stratus-ss commented 6 years ago

This PR introduces a new python script that if run from a master, will use python-requests to query the API and determine on a per-host basis, what the resource requests and limits are.

It produces output like the following

ose-master1.example.com
         CPU requests in millicores: 1231
         Ram requests in megabytes: 5141
         CPU limits in millicores: 2311
         Ram limits in megabytes: 6652

This is useful in environments that do not have CFM or easy access to the webUI

stratus-ss commented 6 years ago

@sabre1041 As per your comments the code has been updated. Sorry for the delay

etsauer commented 6 years ago

@sabre1041 bump.

sabre1041 commented 6 years ago

@stratus-ss Changes look good so merging.

One possible enhancement is to support clusters not listening on port 8443