Stackdriver : create alert policy based on simple arithmetic involving two user-defined metrics - stackdriver

I have two user-defined metrics: totalCount and failedCount.
I've combined them into a single stacked-bar graph on a Stackdriver dashboard. All looking good so far.
I'd like to alert if failedCount exceeds 20% of the totalCount, but I can't find a way to achieve this. The dialogue to create an alert policy only allows me to work with one metric, but I need both in order to perform the simple arithmetic.
What am I missing?

What you want to do is not supported at the moment in google not such Datadog, there are other option such like When creating Alert Policy you have the option to add more than one metric in one Alert see below an example and use just the policy Triggers, see below:
You can see check this stack for more details on the arithmetic operation.

I think that the ability to create the kinds of alerting you'll be talking about will be included in Service Monitoring (see the Service Level Objectives section):
https://cloud.google.com/service-monitoring/

You can create exactly the alerting policy you're describing using a ratio alert. Unfortunately, you can't create those through the UI, you have to use the API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alertPolicies#metricthreshold - check out "denominatorFilter").
The gcloud CLI tool does support everything the API does, so you don't actually have to write code if you don't want to - see https://cloud.google.com/monitoring/alerts/using-alerting-api#api-create-policy.
Aaron Sher, Stackdriver engineer

Related

How can I easily analyze Firebase A/B test results with event parameters?

We use Firebase A/B test product for our mobile apps. We need to reach the parameters of our events and make a deeper analyze. We have worked with BigQuery before for this, but it requires a lot of effort.
Let me tell you briefly about our problem:
Let's say we have an event called add_to_cart. We want to look at the number of times the add_to_cart is triggered from a specific screen in the A/B test results. For example, those whose firebase screen class is category_page. This data can be accessed by writing a query over BigQuery, but create extra effort for different needs.
Is there a short way or tool about doing analysis by event parameters?
As we find Firebase's reporting and analysis insufficient, we will decide to use a different tool. If anyone encounters such a problem, it is possible to make a deep analysis through BigQuery.
Another way you can use Audience as a hacky way.
1. Go to Custom Definitions section and create a custom definition.
Your scope should be "User". Select firebase_exp_<N> as the User property. Because Firebase defines a property for each user it adds to the experience. You can find the <N> number from the link on your A/B test page.
E.g. your A/B test link is like: https://console.firebase.google.com/u/0/project/your-project/config/experiment/results/20. The <N> number is 20 and user property is firebase_exp_20.
2. Create Audience for each control group
Create a new audience according to this created dimension value. A value of 0 corresponds to Baseline. Each control group after that continues with consecutive numbers. (1,2,3..)
3. Go to Analytics
Go to Analytics and do your analysis for each control group with these Audiences.
I hope it helps.

Power BI - Switch table structure depending on what is selected

I'm trying to understand the workflow and how to think when working with Power BI.
I'm trying to create the visual side of a logging framework using azure application insights and log analytics in the background.
What I got stuck on right now is using a visualization for different table structures.
Scenario:
So lets say I have an integration workflow that is compiled of different components (starts at one endpoint, being processed and sent to destination endpoint), and this workflow is used in parallel depending on the endpoints.
Visualization:
A ----> (integration process) -----> B
C ----> (integration process) -----> D
A <---- (integration process) <----- B
C <---- (integration process) <----- D
In this process I'm logging traces and exceptions for each workflow for example.
And lets say I have extracted the power BI query from log analytics to import the data into Power BI.
Now as you can see above I have an "Send" and "Receive" flow for both sets of endpoints per parallel integration so to speak and I want to be able to pair these per report in Power BI.
Problem:
So then to my problem for now;
Let's say I want to put a doughnut chart with total amount sent AND received messages.
Also when clicking on the different parts of the chart I want to change the containing data and also the structure of the single table in the same report.
What I'm struggling with is using a table to display the content of two workflows that are related to each other in the sense of being a "Sent and received" visualization of the integration, but don't have any hard drawn relations to each other in code.
I was reading something about a switch statement but I thought i'd ask the question here to learn "the way of thinking" when using Power BI.
Hope I made my problem clear by the description above, if I forgot anything please ask and I'll do my best to try to further explain what I'm asking for.
EDIT:
Ok so regarding the feedback i got of the question being to broad, does it help i i would say i want to be able to switch everything in a Table (that is: all columns and values), by a clickable slicer for example.
why i'm trying to achieve is something similar to this, but for a table view:
Youtube Link:
Using SWITCH True Logic In Power BI - DAX Concepts
Do i select the content of a table with a measure-query or do i have to do any other special fix to get this to work?
Hope this clarify the problem i'm working on.
If you are looking to switch between two entirely different tables, I'd recommend using buttons to toggle between different bookmarks which show/hide different visuals.
Check out the documentation for bookmarks and buttons for more detailed information and come back if you get stuck and have more specific questions.

Custom events in Firebase

I know this has been discussed a lot on SO, but even based on the previous questions and answers I still can't quite understand the details of how event logging is really supposed to work in Firebase.
Let's say somewhere in my code I have this:
FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
Bundle bundle = new Bundle();
bundle.putInt("card_id", 912);
mFirebaseAnalytics.logEvent("card_open", bundle);
Do I understand correctly that the "card open" even should now appear in Firebase Console with the "card_id" parameter?
Then I click More > Edit parameter reporting, enter the name of the parameter I added in my code, and it should appear on the list.
I have read the docs several times, but I still can't get it. Can I not even use any of the events and parameters provided by FirebaseAnalytics.Param and FirebaseAnalytics.Event and just send custom events/parameters (within the known limits, of course).
Another question is whether the limit on the number of global parameters force you to use Big Query?
Thank you!
You're correct. You should see the card_open event with card_id parameter in the analytics console.
Note that there's a delay in the analytics reporting, about 4 to 6 hours after it was logged and uploaded by the device.
Just to ensure that your implementation is correct. I mean, to verify that the events, parameters and user properties are logged in the right time and the right place correctly, use the DebugView console.
I also believe that you should be able see the card_id parameter in the custom reporting for card_open event, considering the delay in the reporting.
For your last question, the parameter limit is on a project level perspective now, compared before that it was per app. Parameters with the same name across different apps will be counted as 1. Not sure, maybe Firebase would like us (developers) to use the parameters accordingly.

Tracking Alfresco hits

I'm pretty new to the Alfresco. Is there any way to track the no.of hits (as in who has been viewing my content) to calculate some kind of Metrics for the portal?
Nope, but you could write your own servlet or webscript depending on what you really want to track.
You can use the Alfresco audit service to see who has accessed what content, number of documents created, etc. In future they are looking to add these kinds of metrics to the interface of Alfresco Enterprise.
So, for now, you're going to have to learn some audit querying:
http://docs.alfresco.com/4.2/tasks/audit-simple-query.html
https://wiki.alfresco.com/wiki/Auditing_%28from_V3.4%29
The audit service will return results in JSON that you will have to funnel in to something else for useful representation. We've used D3.js to make graphs with this data in the past.
Alternatively you could look at google-analytics-tracking which integrates Google Analytics and may meet your needs depending on exactly what you need to know.

get request parameter from url in HP loadrunner

I am using HP loadrunner for my automatic tests.
Every time, when i run my application, it creates some transfer and also generates id in URL.
How can i get the id from URL?
Thanks in advance!
The web_reg_save_param function in LoadRunner is used for this. The following line will save the current page URL to the parameter (URL).
web_reg_save_param("URL", "LB/ic=Location: ", "RB=\r\n", "Search=Headers", LAST);
If you know what the ID is that your looking for, ie. http://www.example.com/?id=298374293847 you can adjust the call accordingly.
web_reg_save_param("URL", "LB/ic=Location: http://www.example.com/?id=", "RB=\r\n", "Search=Headers", LAST);
Hope this helps.
Recording with Siebel 8.1 on Loadrunner 11 having issues,posted a question on HP and got the same comment. But usually we can try the below mentioned option
You can record in Siebel-Web or web (http/html) and playback as
either too (if you want to record in Siebel-Web and play back in
regular web, just copy the contents of the script to a regular web
script and save).
Try a proxy mode recording in LR.
Changing registry and disables NTLM.
Turn off all autocorrelation rules
Turn on record as URL mode (as an alternate use web_custom_requests())
Use a sniffer to capture the traffic and then build a script by hand.(Best Option)
Change settings on the Siebel server side as well (Enable Automation=True, EnableWebClientAutomation = TRUE)
If you are recording your scripts using Web http/html you can use automatic correlation. For automatic correlation go to Design Studio
If you are unable to find the value there,then you must correlate manually using web_reg_save_param by giving the left and right boundaries.
This is going to sound belligerent, condescending and downright offensive. It is not to be meant as a reflection on you, but upon your management who has placed you in this position.
The topic of Correlation is one covered extensively in the class for LoadRunner web script development. It is the topic of a full 1/3 of the class and an additional appendix. All told some four different techniques for collecting dynamic data are covered, presented or documented as a part of the class materials. This capability, the handling of dynamic data, is a foundation tool skill.
Vardges, your management has placed you in a tough spot. Personally I would bolt for greener fields, for any management which is willing to do this to a line-of-business employee is also willing to toss that same person under the bus to salvage their own hide or a client relationship. Blaming you for something that management is unwilling to address is not a question of "if?" when training and mentoring does not occur, but only "when?" will the blame be placed on you.
James Pulley
Moderator: YahooGroups Advanced-LoadRunner, YahooGroups LoadRunner, SQAForums LoadRunner, LinkedIn LoadRunner, GoogleGroups lr-loadrunner

Resources