How to tell which logstream in cloudwatch triggered alarms - amazon-cloudwatch

I am using fluentd-cloudwatch to forward logs from Kubernetes to cloudwatch.
All logs are forwarded to the same log group, but each container has its own log stream.
I have some filter metrics and alarms based these metrics.
For example, one filter metric could be "xxx connection error". Every time the error appears in the log, I will receive an notification. That's all working. But the problem is that I couldn't tell which log stream the error is from as I wanted to know which container generated that error.

If you have an active alarm, you can see which logstream triggered it by navigating to the Cloudwatch dashboard, select the specific Alarm. In top right (above the graph of the alarm's status) is a "View in Metrics" button. Click that to go to the specific Metric that triggered the Alarm. Above the graph of the Metric, is an "Actions" button, the last option under "Actions" is "View Logs", and you can select the metric name. The next view will show all instances of the Metric and the logstream that generated the metric.

Related

How to find the event triggered before settings event is triggered in BigQuery?

I want to find the event triggered before the event setting was triggered. For instance a user might click on setting from home_screen (home_screen being the event). There might be multiple sources(events) from where the user might tap on setting. How to find out the count of users from different sources?
Events that might help: user_pseudo_id, event_name, event_timestamp(in micros)
event_timestamp and event_name
user_pseudo_id
Desired Results (Here screen refers to previous source from where the setting was triggered)
I'm using BigQuery standard SQL.
You want screen_view from Analytics. "When a screen transition occurs, Analytics logs a screen_view event that identifies the new screen."[1].
You'll be able to access firebase_previous_screen, firebase_previous_class, firebase_previous_id parameters[2]
[1]https://firebase.google.com/docs/analytics/screenviews#automatically_track_screens
[2]https://support.google.com/firebase/answer/6317485?hl=en

Branch.io custom event count not increasing for quick links

I have created a quick link from https://dashboard.branch.io/quick-links. When the user opens the link and tries to register the account on our website, a custom event is triggered from server side (Java) using the branch http API.
I can see that event in the Liveview section of Branch.io dashboard. But, when I go to the quicks section, the count for my custom event column is always showing as 0.
Is there any specific Branch related parameter that I need to send from client side (browser) to server side while submitting the form, to let Branch know that the custom event should be linked to a specific link, so I can see the custom event count increasing for that link in quick links section.
Your custom event will not be attributed to your link click if you trigger the event on the server side.
You should trigger the custom event from the client side post registration. You can put this in the callback of your registration method. If you navigate away from the initial redirect to your webpage, make sure that page has the Branch Web SDK initialized, and that you have the _branch_match_id(found in the address bar of your redirect) appended to your web url. This _branch_match_id is what Branch uses to attribute the custom event to your link click.
https://docs.branch.io/pages/web/integrate/#track-events

How the "event user count" is calculated for any event in fabric-answer dashboard

There is a user count ( Event Users) to each event in answer dashboard. How this count is changed as I can see whenever I install the app then only its increased by 1. But I want it to be updated whenever any new user sign in/sign out to my app.
And is there any way to link all events to a particular user or add user info in all events by default so that we don't need to add in each event all the info individually?
Todd from Fabric. Right now it's not possible to track individual users through Answers. You can use custom events and attributes to log these activities, but you will need to set the attributes for each event as they happen. Check out this page for more info.

MobileFirst Analytics Creating a Custom Chart

I wanted to see how many times users visited that certain screen/page of my application using MFP Analytics. I'm wondering if I can use the analytics logs and make a log per screen and create a custom chart for the logs?
I based my assumptions on this mobilefirst tutorial:
https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.0/moving-production/operational-analytics/
Yes, you can use the following to log the page.
WL.Analytics.log({page: 'pageA'}, 'Custom event for visiting page A');
WL.Analytics.send()
Then you can send it to the analytics console with WL.Analytics.send().
You can use a setTimeout function if you want to send it immediately after logging, so that you can ensure that there is time for the log to write to the disk before it is sent.
setTimeout(function () {
WL.Analytics.send();
}, 300);
Then you can create a custom chart in the analytics console with custom activities, property "page."
Yes, you can do this. It is as simple as creating a custom event such as "page X was visited" and on every load of a page, log the action (of loading it) and then send it back to the Analytics server. You can then splice your analytics data per page (event).
You can see this explained and demoed in the following:
https://mobilefirstplatform.ibmcloud.com/blog/2016/01/22/howto-custom-in-app-behavior-analytics/ (blog + video)
collecting custom data: https://www.ibm.com/support/knowledgecenter/SSHS8R_7.1.0/com.ibm.worklight.monitor.doc/monitor/t_collecting_custom_data.html (documentation)
creating a custom chart based on it: https://www.ibm.com/support/knowledgecenter/SSHS8R_7.1.0/com.ibm.worklight.monitor.doc/monitor/t_creating_a_custom_chart.html (documentation)

Custom variables in Google Analytics

I have an application in which I am displaying dynamic advertisements. There are some ads displayed on pages without logging in, and others on pages that you have to log in to access them.
First, I want to be able to track how many clicks have been made on a given ad accessible anonymously.
I added this code to the onclick event of the ad
onclick="ga('set', 'dimension1', '#item.Id')" // #item.Id is the Id of the Ad
I can see that the event is triggered in the GA Debugger in Chrome, but I cannot see the result in GA even after 24h.
Second, I want to be able to track the Ids of the users who have clicked on the a given ad. And I don't know if this can be done using GA.
An ideas ?
Custom Dimensions and Metrics are necessarily connected to an interaction and cannot be sent on their own - they must always be followed by an interaction hit (pageview, event, transaction etc).