Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

StackDriver: Collecting metrics from outside GCP and AWS

Tags:

My question is about StackDriver from Google Cloud. I've tried for a lot of hours to configure a server from outside of GCP and AWS to collect metrics, and I'm not able to make it work.

StackDriver is able to collect metrics from outside or I'm loosing my time?

If is able, someone knows a good manual?

Thanks!!! and greetings!!!

like image 333
Daniel Carrasco Marín Avatar asked May 03 '17 18:05

Daniel Carrasco Marín


2 Answers

Adam is correct that Stackdriver doesn't (at time of writing) support the agent metric collection outside of GCP/AWS. So what you're trying to do is not officially supported.

However, Stackdriver products are composed of APIs so you technically can collect from metrics from outside GCP and AWS. It's technically possible, but the client side tooling and docs to do so just don't exist, which will make it pretty challenging.

In general, the AWS docs are the closest to what you'll want to look at, since AWS is the public internet as far as Stackdriver is concerned.

For authentication, you'll want to use service accounts, similar to the AWS setup.

If you just have a few metrics, you could always write custom metrics using one of the client libraries. That's probably the simplest thing to do if you just have a few metrics you want to write.

The collectd agent that the docs instruct you to install just gather up metrics from various logs and sends them to the API. You can check it out on Github. But since currently only GCP and AWS are supported, you are venturing into territory where you'll have to understand the agent's code and modify it yourself to get it working outside GCP/AWS.

I would keep an eye on Stackdriver in the future for improvements in this space.

like image 76
Bill Prin Avatar answered Oct 11 '22 15:10

Bill Prin


This is available now. Google had some agents they provided for doing just this from different environments.

However, it looks like those are now deprecated and have been replaced with a third party (a Google Partner), from Google Docs: https://cloud.google.com/stackdriver/docs/deprecations/third-party-apps

It looks like there is no license fee to use (free in Marketplace) just have to pay for the data usage coming into Stackdriver.

like image 30
AlphaPapa Avatar answered Oct 11 '22 15:10

AlphaPapa