I have spent a bit of time on the documentation for cloud monitor and it seems to all be about monitoring via dashboard, not returning JSON, XML, or other format data.
Is there a way (or API) to get cloud Monitoring metrics from either the monitor software or some other API without using the dashboard (instead in JSON, XML, or some other format)? It is desired to send all our monitoring to the same location and we need a return format in JSON, XML, etc., instead of to the dashboard. All I can see for the monitor API is the ability to set policies, not return data (except to dashboard).
Using a different API is acceptable, the return type doesn't need to be JSON or XML (preferred), We just want to monitor Google Cloud with some text response.
Posted this in wrong forum first...
OK, in case anyone is looking for an answer to the same question as I posted here, the answer is either to use Pub/Sub (powerful Google tool) or a webhook.
If this turns out to be incorrect, I'll take down this reply, but it looks very much like those are the possible solutions.
@SamFissure are you interested in an egree api for metrics you collect with Google Cloud Monitoring? Or are you attempting to monitor a specific GCP service like the statuses shown at https://status.cloud.google.com/
Yeah, an egress api is basically what I'm looking for. Thanks, any advice on that?
So today, our metrics API does allow for you to read values from it if you so desire:
https://cloud.google.com/monitoring/api/ref_v3/rest
There is a good community post on how you'd tackle this project in Python:
This would allow you to periodically poll the API to generate metrics in another location.
If you're looking for something push based/live streaming, I can send you a PM to better understand your requirements for future roadmap inclusion.
Thanks!
yes, can you send a PM please? I am still looking into Pub/Sub as a solution, but I am unsure if GCM sends info to GoogleAPIs.com If it does not, the amount of extra configuration could be an issue.
I have the same problem and am searching for a live streaming solution that can pipeline Google Compute metrics directly to an S3 bucket. Is it possible to do something like this now?