google-cloud-stackdriver

Is there a way to tell who started an instance in Google Cloud Platform?

ⅰ亾dé卋堺 提交于 2020-12-15 07:14:39
问题 We run only a small handful of instances on Google Cloud Platform and we don't run them all the time. Generally we just fire one up, do what we need to do then shut it down... which is great, except when "we" forget to shut them down. I've been able to track down the relevant REST APIs and the gcloud sdk but I don't see anything that says who started the instance. Actually it also doesn't have a timestamp on when it was started. I did find this python app engine script that I might be able to

Custom OpenCensus metrics not appearing on Stackdriver

扶醉桌前 提交于 2020-12-12 18:14:08
问题 I'm trying to send custom metrics to Stackdriver from my Go application using OpenCensus. I've followed the guide, so the views and exporter are setup: import ( "context" "contrib.go.opencensus.io/exporter/stackdriver" "github.com/pkg/errors" "go.opencensus.io/stats" "go.opencensus.io/stats/view" "time" ) var ( apiRequestDurationMs = stats.Int64("api_request_duration", "API request duration in milliseconds", stats.UnitMilliseconds) ) func NewMetricsExporter() (*stackdriver.Exporter, error) {

Custom OpenCensus metrics not appearing on Stackdriver

☆樱花仙子☆ 提交于 2020-12-12 18:13:13
问题 I'm trying to send custom metrics to Stackdriver from my Go application using OpenCensus. I've followed the guide, so the views and exporter are setup: import ( "context" "contrib.go.opencensus.io/exporter/stackdriver" "github.com/pkg/errors" "go.opencensus.io/stats" "go.opencensus.io/stats/view" "time" ) var ( apiRequestDurationMs = stats.Int64("api_request_duration", "API request duration in milliseconds", stats.UnitMilliseconds) ) func NewMetricsExporter() (*stackdriver.Exporter, error) {

Custom OpenCensus metrics not appearing on Stackdriver

落花浮王杯 提交于 2020-12-12 18:08:11
问题 I'm trying to send custom metrics to Stackdriver from my Go application using OpenCensus. I've followed the guide, so the views and exporter are setup: import ( "context" "contrib.go.opencensus.io/exporter/stackdriver" "github.com/pkg/errors" "go.opencensus.io/stats" "go.opencensus.io/stats/view" "time" ) var ( apiRequestDurationMs = stats.Int64("api_request_duration", "API request duration in milliseconds", stats.UnitMilliseconds) ) func NewMetricsExporter() (*stackdriver.Exporter, error) {

Monitoring and alerting on pod status or restart with Google Container Engine (GKE) and Stackdriver

隐身守侯 提交于 2020-08-01 03:10:41
问题 Is there a way to monitor the pod status and restart count of pods running in a GKE cluster with Stackdriver? While I can see CPU, memory and disk usage metrics for all pods in Stackdriver there seems to be no way of getting metrics about crashing pods or pods in a replica set being restarted due to crashes. I'm using a Kubernetes replica set to manage the pods, hence they are respawned and created with a new name when they crash. As far as I can tell the metrics in Stackdriver appear by pod