Questions tagged [stackdriver]
Monitoring, logging, and diagnostics for applications on Google Cloud Platform and AWS.
953
questions
0
votes
0
answers
16
views
Sending Logs to GCP from Django DRF application
I am trying to access the logs from my django app in GCP logging. I have thus far been unsuccessful.
Here is my logging config:
client = gcp_logging.Client.from_service_account_json(
...
0
votes
0
answers
27
views
How to setup query in Google cloud monitoring plugin in Grafana?
I'm getting unexpected error when I'm starting to write query,
An unexpected error happened
Anyone help me to resolve the issue?
I'm expecting to have a query board so I can setup the dashboard.
0
votes
0
answers
45
views
How to make Micrometer metrics exported to Stackdriver from a Spring boot application deployed in GKE be aware of the pod instances?
Background
I have a Spring boot application deployed in a GKE cluster, I have configured my deployment yaml file to maintain two instances of my application, and so I have two pods in my cluster. I ...
0
votes
1
answer
89
views
Stackdriver in GKE throws rpc error "Failed to export to Stackdriver" "context deadline exceeded"
I see the following two lines in my GKE Cluster logs from my golang app containers. The error is intermittent (few errors every couple of days). I have been unable to find much information on it.
...
0
votes
2
answers
60
views
GCP log-based alert only if the last message matches two conditions
I'm trying to create a log-based alert to check if a log message hasn't been seen recently. Additionally, I only want the alert to trigger if the last log message contains a certain string.
Here's an ...
0
votes
1
answer
73
views
Google Cloud Logging doesn't parse JSON message from Container Optimized OS
I'm running a Container Optimized OS container on GCE with Cloud Logging wired up. The service is installed correctly and I'm getting logs, however the structured logs aren't parsed:
How can I get ...
1
vote
0
answers
36
views
Got these errors after changing the version of Stackdriver Logging to v2 in Golang
When I updated my appengine logging version to v2. I got these errors.
Package: google.golang.org/appengine/v2/log
import (
"context"
"google.golang.org/appengine/v2/log"
)
...
0
votes
1
answer
49
views
How to setup google cloud loggin for rails app in production
The default rails production setup seems to be overwriting stackdriver logger configuration.
The stackdriver gem documentation entails that nothing else is need in order to get it to work with ruby ...
0
votes
1
answer
125
views
GCP Error when performing Stackdriver AsyncReporter health check
My application runs in the following error when trying to perform Stackdriver AsyncReporter health check. I can't seem to find which authentication scopes are required for this from the documentation.
...
0
votes
1
answer
30
views
How to send a error in google error reporting with no reportLocation
I'm trying to report errors using the Google Cloud Error Reporting api. I want log them with their stackTrace. I do not want to use context.reportLocation
It is mentioned here that
message:string
[...
2
votes
1
answer
124
views
Horizontal pod autoscaling using a logging custom metric in GKE
I would like to scale my deployment based on a custom logging metric, but I'm not able to make that work, I created already the custom metric and I'm also able to see it in the metric explorer but for ...
1
vote
1
answer
223
views
Is there a way to fetch Google Cloud Monitoring Incident metrics via the API?
When reviewing the documentation here (https://cloud.google.com/monitoring/alerts/incidents-events#incident) and using the general product, it appears that the open incidents and associated details ...
0
votes
0
answers
77
views
Group of GCP open incidents trigger 1 email notification
We have around 100 alerting policies and each incident triggers an email notification to relevant notification channels. I am looking for a way to send out 1 email notification based on the open ...
0
votes
1
answer
122
views
Google cloud logging LogEntry fields
I am new to Google cloud logging.
I use Python library and I am a little bit confused about LogEntry fields. Are these fields meant to be manipulated by developer/code? I am trying to use "...
1
vote
1
answer
96
views
Next.js - Stack Driver error reporting - errors are not logged
I tried to log errors from Next.js app into Stack Driver.
With this library: https://github.com/GoogleCloudPlatform/stackdriver-errors-js
App.tsx
useEffect(() => {
TagManager.initialize({
...
0
votes
0
answers
82
views
How do I set a default scope ("Refine Scope") for Google Cloud Platform logs (formerly Stackdriver)
Basic question but having trouble finding an answer. How can I make the following the default settings so I don't always have to Refine Scope?
1
vote
1
answer
255
views
Metric for Number of unacknowledged messages older than 20 minutes
I am trying to set up alerts on pubsub in gcp that monitor the number of old messages in a queue. Specifically the number of unacknowledged messages older than 20 minutes.
I want an alert that because ...
0
votes
1
answer
209
views
Is it possible to create log based metrics in Google Cloud for missing data?
I'm trying to create a log based metric in Google Cloud that alerts when a certain log entry is no longer written to the logs.
Write now my application writes "Im alive" to the log every ...
1
vote
0
answers
380
views
GCP cloud operation : MQL query -- filter values greater than a number
So we are trying to set up an MQL for alerting on a custom metrics ( that we are ingesting in cloud operation through monitoring API). I am struggling to find a good way to filter results based on the ...
0
votes
0
answers
230
views
Is there a way to just sum a google cloud metric within a time period?
With the Metrics Explorer in the Google Cloud Platform, is it possible to sum a metric within a defined time period? I have custom gauge metrics set up for various data that I care for. And I am just ...
3
votes
1
answer
661
views
NestJS logs not matching Google Cloud Stackdriver verbosity levels
I have a NestJS application that I am running on cloud run in Google Cloud (GCP). When viewing the logs in GCP from "Logs Explorer," I can see all log output from my NestJS app only when the ...
0
votes
1
answer
556
views
Can't see pod logs from GKE in Cloud Logging
I have a GKE cluster v1.22 with the Cloud Logging feature enabled.
screenshot
But I can't see any application logs in the Logs Explorer.
Also, I can't see any logs for fluent-bit pod that Google uses ...
0
votes
1
answer
373
views
Google Cloud Monitoring Alert when Cloud Function status!=ok, it doesn't work
__
Hello,
I would like to know how to raise a Alert Email notication when my Cloud-Function status is not "ok".
I have configured my Cloud Monitoring alert as described in image above,
but ...
1
vote
0
answers
138
views
Configuring GCP ops agent to send logs for only one systemd service
I want to install the ops agent on a GCP VM and have it send logs from a systemd service to StackDriver.
However, the relevant docs do not indicate how to specify one (and only one) systemd service.
...
2
votes
2
answers
98
views
Google Stackdriver log entry record field logging.googleapis.com/severity vs severity
I have a general log package that wraps logs for Stackdriver- Gets context, severity etc and transform it to LogEntry i.e:
func Log(ctx context.Context, severity Severity, format string, a ......
0
votes
0
answers
18
views
For GCP monitoring dashboards json language, does a json schema file exist somewhere?
What im looking for is a machine readable (ideally jsonschema) version of https://cloud.google.com/monitoring/api/ref_v3/rest/v1/projects.dashboards
Thanks.
0
votes
0
answers
102
views
GCP Stackdriver Monitoring for High-scale Frequent Metric
Google have many built-in metrics for monitoring their various services, but how do they calculate the metrics' values if the metrics are logically frequent? The monitoring API does not allow frequent ...
1
vote
1
answer
296
views
How do I write a stack driver log query that samples 5% of all logs returned?
I keep reading that I can write a log query to sample a percentage of logs but I have found zero examples.
https://cloud.google.com/blog/products/gcp/preventing-log-waste-with-stackdriver-logging\
You ...
2
votes
1
answer
830
views
GCP Alerting Policy for failed GKE CronJob
What would be the best way to set up a GCP monitoring alert policy for a Kubernetes CronJob failing? I haven't been able to find any good examples out there.
Right now, I have an OK solution based on ...
0
votes
1
answer
507
views
Do I need Kibana/ Grafana or I can do the same with Google Cloud Operations OOTB suite?
I have a customer that have Kibana for application logging monitoring and now is moving to GCP, but the question is Do they still need Kibana for application logging monitoring, Dashboards ? or they ...
0
votes
0
answers
26
views
Is there a notification function for new Google Ops Agent releases
For my GCP environment, I am having trouble keeping up with google Ops Agents constant updates. I would like to find a way to get notified every time a new release is pushed out.. That way I won't be ...
0
votes
0
answers
175
views
Writing to Stackdriver can be slow
Lately, our team is occasionally experiencing really slow response when writing log messages to Stackdriver. We're using the .NET SDK Google.Cloud.Logging.V2 version 2.3.0 library. Measurement is done ...
1
vote
2
answers
2k
views
Error while installing ops agent on Google VM
I'm trying to install a Ops agent on a Google VM and some index files failed to download (error 404)
Command i used following documentation :
curl -sSO https://dl.google.com/cloudagents/add-google-...
1
vote
2
answers
269
views
Is there a way to monitor to Java app running in Docker container in Google Cloud Run with Java JMX Stackdriver plugin?
I'm trying to collect metrics with DropWizard metrics library and export them through JMX.
On Google Cloud Engine it's easy to export these metrics with JMX plugin for Stackdriver (https://cloud....
2
votes
3
answers
3k
views
Divide two metrics in Google Cloud Monitoring / MQL
How do I compute the difference and ratio between two Stackdriver metrics in MQL?
There are two parts two this question, but I am grateful if you can help me with one:
Compute the difference between ...
1
vote
1
answer
176
views
How to see logs is Stackdriver from Java application run on Jenkins Kubernetes container?
I've created a Jenkins pipeline and I am running it on GKE (using Kubernetes plugin). In one of the steps I am running java application in one of the containers. Application is writing logs to stdout. ...
1
vote
1
answer
363
views
no matches for kind "PodMonitor" in version "monitoring.gke.io/v1alpha1"
I tried to export prometheus metrics to google cloud monitoring and I tried to use this docs but when I run kubectl apply, I got this error "no matches for kind "PodMonitor" in version &...
2
votes
0
answers
232
views
How to send logs from Vercel serverless functions (Next.js) to Google cloud Logs
From the Google cloud logging node sdk docs:
Serverless applications like Cloud Functions, Cloud Run, and App Engine are highly recommended to use the LogSync class as async logs may be dropped due ...
0
votes
1
answer
87
views
How to add a label to traces created by the AddOutgoingGoogleTraceHandler extension method?
I am using Google.Cloud.Diagnostics.AspNetCore v4.3.0.
I use AddOutgoingGoogleTraceHandler to trace every outgoing HTTP request of a given HTTP client and I want to add a custom label to every trace ...
0
votes
1
answer
84
views
How to list role changes in GCP stackdriver?
Is there a filter for stackdriver that logs when a service account or user get a role assigned or removed and who did it?
Someone or something is removing roles in IAM but I don't know if it's a human ...
0
votes
0
answers
190
views
How-to send logs from Cloudflare worker to Google Stackdriver logging without Google SDK/libraries
We are trying to understand if there is a straightforward way to ship logs from a Cloudflare worker which would send an HTTP request to Stackdriver with a pre-created token such that we do not need to ...
1
vote
1
answer
103
views
Creating Alert Policy in Cloud Monitoring with OpenCensus Metric
I'd like to use an OpenCensus metric in a Cloud Monitoring (Stackdriver) Alert Policy.
When I try to click the Add button, I get This query must contain a resource type. error. The odd thing, is that ...
0
votes
1
answer
1k
views
How to use StackDriver on GCP to get how long does it take to process a request
I need to to understand how long does it take for a Python application hosted on top of Google Kubernetes Engine to handle a given request.
How can I can get and debug this value? Should I use ...
1
vote
0
answers
42
views
Correlating PHP errors to HTTP requests in GAE php74 standard environment
We used to run a php55 Google App Engine standard environment for our application. With this setup, we would output logs using syslog, and both those logs and any PHP errors would be automatically ...
1
vote
1
answer
339
views
Error while fetching GCP monitoring via GCP Python API
I'm trying to fetch last 5 mins CPU utilization of a GCP SQL instance but getting following error. Please help me resolve it. The service account I'm using has full read permission over monitoring.
My ...
1
vote
2
answers
233
views
Can AppEngine response count metric be grouped on response class?
I'm trying to create an alert on CGP/stackdriver using the http/server/response_count metric for app engine. This metric has an response_code field that I can group_by:
fetch gae_app::appengine....
0
votes
0
answers
730
views
GKE workload logs not appearing in stackdriver
We implemented logging on our NodeJS applications that are containerized, all the logs get captured when running in the local docker environment. They're currently hosted in GKE From last 30 days, we'...
0
votes
0
answers
343
views
Merge Google Cloud Logs lines in logs Explorer
I have 2 logs coming from 2 sources. One from an Api pod and one from an ingress controller pod.
I want to merge both of those logs together in one line, since both of them have the same traceID field....
-3
votes
1
answer
1k
views
Deserializing nested objects in Jackson
This should be straight forward based on the docs and examples I've seen around but I haven't managed to get this working. I apologize if this has been posted elsewhere but I have not been able to ...
1
vote
1
answer
329
views
Structured Logging with Apache Spark on Google Kubernetes Engine
I am running Apache Spark applications on a Google Kubernetes Engine Cluster which propagates any output from STDOUT and STDERR to Cloud Logging. However, granular log severity levels are not ...