Can the relevant log entries be included in Alert emails from Google Cloud Monitoring? - google-cloud-logging

I have a Google Cloud Monitoring custom Metric that measures "errors of interest" in Google Cloud logs for my project, but the Alert emails it generates (threshold > 0) have only generic information, and nothing that's actually specific to the log entry(ies) that are measured by the metric.
Ideally I'd like to have these alert emails include the actual log entries captured by the metric (i.e. the specific log messages that triggered the alert), so I can see the log info right there in the alert email without having to dig through the logs. The "View Incident" and "View Logs" buttons only get me part-way there (still no details about the specific log entries in question).
Is it possible to have these emails include the details of the log entries that triggered the alert?
Example alert email:

Related

Event sent to UrlFetchApp using appsscript does not appear in Google Analytics

http://www.google-analytics.com/collect?v=1&tid=UA-XXXXXXX-1&cid=1060320920.1612316285&t=event&ec=transaction&ea=call&el=202102081703_0507-1474-0311&ni=TRUE&ti=offline&ta=&tr=100&tt=0&ts=0&pa =callOrder&pr1id=&pr1nm=product_name&pr1qt=1&pr1pr=100&pr1ca=machine
I am trying to send the above URL to Google Analytics using apps scipt.
When I enter it directly into the URL address bar, an event is sent.
However, if you refer to the existing data (POST method) and send it to apps scipt, the event is not caught in Analytics.
Try to see if you have Exclude spam and bot option checked in View settings. That could be the cause.

Activate logs from Workflows to Stackdriver

How you correctly send logs to Stackdriver from Google Workflows?
Based on the documentation I've created this:
- logStep1:
call: sys.log
args:
text: "Step 2 launched accordingly"
severity: INFO
The workflow launches and finishes as expected, but, when I go into stackdriver to look for my log entry it doesn't show, only "audited logs" the rest of them is no where to be found.
Google docs states certain steps to look for those logs, but even the the: resource.type="workflows.googleapis.com/Workflows" is marked as incorrect in the stackdriver filter.
I expected to see my text payload under a blue icon (INFO) entry, but alas, is not there.
Did I missed something in my log step?
Resources used:
https://cloud.google.com/workflows/docs/troubleshooting#sending-logs
After re-reading the documentation it states that it requires Log Writer permissions, I thought that permissions will be inherited from the caller, but it is not the case, once has to create an specific service account with all the required permissions, including Log Writer or Log Admin to be able to send information to the Stackdriver event flow.
So, to solve this issue check:
You have a hand made service account not the one that is automatically spawn.
That SA has all the necessary API and permissions to access your endpoints and the Log writing ability.
When a flow is created the created SA must be used (instead of the generated one)
Try it.
I've tested this several times and it works.

Google Analytics Event working only for sometime

I have set the Google Analytics eventing with the help of Google Tag Manager. What I observed that it will show me results in Google analytics only on day when I'm setting up event and not getting continues result for event below is the screnshot for the same
Is there any time period for which only events get fired and we will see the result?
What we should do if we want to event tracking work for us continuously.

Send Email Notifications from Kibana

I have created a Kibana Dashboard which reports the user behaviour. Now based on the dashboard and graphs I want to send a email notification to my team by alerting which user behaviour is not good and which one is performing good.
I know that we can set email alerts on ES log monitoring. Is there any option from kibana dashboard where I can send custom notifications to my team by mentioning the user behaviour.

Google Calendar event Created/Updated/Deleted Webhook?

I am developing a SPA webapp through which I add events to my users google calendar They have given permission for. However this is my first time using Google calendar API, and was unclear about how to retrieve my users existing events , or if they add new events or delete them. IS there an option to set a webhook within google calendar thus when the user makes any changes to the calendar I can receive the change. My current approach was to make multiple get requests but that seems very inefficient. How can I keep my app calendar in sync with all user created events.
You can set up a push notification to be alerted any time anything changes on one of your calendars. I looked into it before a little, if memory serves it doesn't alert you to a lot of particularly useful information (I don't believe it tells you exactly what changed and how). Check out the docs here: https://developers.google.com/google-apps/calendar/v3/push
What I ended up doing was setting up a cronjob and getting all of my calendars' events using the synctoken, which returns only the events that have changed since the last time I polled the API for events. https://developers.google.com/google-apps/calendar/v3/sync
If you are using the SyncToken in your request for data, all you get back is the events that have changed. There is an eventID in the Google records that you can use to connect the change to your event data.

Resources