stackdriver

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

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

邮差的信 提交于 2020-08-01 03:07:52
问题 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

Log retention in Stackdriver GCP

拟墨画扇 提交于 2020-07-20 07:48:06
问题 How can I get log retention enabled in GCP Stack-driver. I haven't found any document for configuring log retention. I can see export option in logging section and log ingestion. 回答1: NOW, it is possible , see this post bellow (edited) Previous answer: Logging retention is 30 days and it is not configurable, you only pay for the storage Stackdriver Logging allows you to retain the logs for 30 days, and gives you a one-click configuration tool to archive data for a longer period in Google

Stackdriver Logging API returns response code 200, but response is empty

依然范特西╮ 提交于 2020-06-29 06:56:57
问题 I'm trying to fetch stackdriver logs via Stackdriver Logging API v2. I do this by making a POST request from google apps script project, in particular using UrlFetchApp. The thing is, it runs successfully, but the response shown in log is empty. However, when I made the same request using apirequest.io, curl and Google API explorer, I got the necessary response. I searched extensively, but to no avail. Tried experimenting with header, url, but nothing. function exportLogs () { var options = {

Google Apps Script logs (web app) don't show up in the new interface

白昼怎懂夜的黑 提交于 2020-06-27 08:30:11
问题 Apps Script has recently moved the StackDriver logs into the Apps Script dashboard, page 'Execution'. Problem is, the logs won't show up in the dashboard for Apps Script web apps. I can see the new execution line when I do a request to the Apps Script web app, but the line won't expand to show the logs. I'm using the Stackdriver Logging: function doPost(e) { console.info('my log'); } Curiously, it works when I call the dev url (Deployment column is tagged as 'Head'), the line does expend when

How get a metric sample from monitoring APIs

家住魔仙堡 提交于 2020-06-16 07:06:51
问题 I took a look very carefully to monitoring API. As far as I have read, it is possible to use gcloud for creating Monitoring Policies and edit the Policies ( Using Aleert API). Nevertheless, from one hand it seems gcloud is able only to create and edit policies options not for reading the result from such policies. From this page I read this options: Creating new policies Deleting existing policies Retrieving specific policies Retrieving all policies Modifying existing policies On another hand

Using Python to Query GCP Stackdriver logs

让人想犯罪 __ 提交于 2020-06-15 05:59:22
问题 I am using Python3 to query Stackdriver for GCP logs. Unfortunately, the log entries that have important data are returned to me as "NoneType" instead of as a "dict" or a "str". The resulting "entry.payload" is type "None" and the "entry.payload_pb" has the data I want, but it is garbled. Is there a way to get Stackdriver to return this data in a clean format, or is there a way I can parse it? If not, is there a way I should query this data that is better than what I am doing and yields clean