Configure health rule in AppDynamics for multiple servers reboot or down - appdynamics

How to configure health rule in AppDynamics to alert when ever multiple servers reboot or when multiple servers are down?

How to create a Health Rule using Machine Agent metrics to report when multiple servers are down (at the same time) where the servers are Nodes within the same Tier:
Click 'Alert & Respond' (at top of UI)
Select the relevant Application from the drop down menu
Click 'Health Rules'
Click '+'
In 'Overview' Tab
Enter a 'Name' value / set time window options
In 'Affected Entities' Tab
Click 'Tier / Node Health - Hardware, JVM, disk I/O, etc)'
Ensure 'Tiers' is selected in the Radio underneath
Select "These specific Tiers" in drop-down
Select the relevant Tier and move to 'Selected' (to the left)
In the 'Critical Criteria' Tab
Click "+ Add Condition"
Click "Select a Metric"
Navigate to and select "Agent|Machine|Availability"
Change the conditions to be is "< Specific Value" with value "1"
Then under "Health Rule will violate if the conditions above evaluate to true for:" click the third option and enter value "100" so this reads "100% of the Nodes"
Save
The above can be tweaked to your needs in terms of evaluation window / violation wait etc, you will need a Policy and an Action for the the Health Rule to send email or do any other kind of work based on the event created when the Health Rule violates.
Related Official Docs:
https://docs.appdynamics.com/21.5/en/appdynamics-essentials/alert-and-respond/health-rules
https://docs.appdynamics.com/21.5/en/appdynamics-essentials/alert-and-respond/configure-health-rules
https://docs.appdynamics.com/21.5/en/appdynamics-essentials/alert-and-respond/actions
https://docs.appdynamics.com/21.5/en/appdynamics-essentials/alert-and-respond/policies

Related

How to use testnet with Zelcore?

How do I test on the Zelcore test net? In Chainweaver I can explicitly select testnet and have all the transactions go that way.
However , I can't select "testnet" from Zelcore.
The testnet backend was already present on my install.
Open a wallet and click "Manage Assets" > Add Asset > TESTKDA
Click on the added TESTKDA asset. Click receive.
Open https://faucet.testnet.chainweb.com/ in your browser. Choose 'Create and Fund'
Paste the public key part of your accountname in the first form field (accountname without k:) and the accountname (with k:) in the second.
Click on the plus next to your public key and then on the 'Create and Fund Account'
A few minutes later your testKda coins will appear in your Zelcore wallet
Go to the main wallet overview and select one of the other wallets. eg mining.
You will have to add the testkda asset again. Click on receive to copy the account address
Go to the first account and send a bit of your 20 testKda from the first to another wallet eg mining
If you select the wrong account or a different chain than where the funds are you will get "error obtaining Kadena transactions", make sure to select the correct wallet, chain and accountname (with or without k:).
To double-check the actual status of the accounts use https://balance.chainweb.com with api.testnet.chainweb.com in the "chainweb server" field and your accountname in the last field.

In App Dynamics calculating the sum of a transaction metric

I am creating a dashboard in App Dynamics and would like to get the sum of the metric calls/minute for an endpoint of my web service.
How can I do that?
I can create the graph of calls/minute for a day.
But I would like to display the sum of these calls for a 24 hour period.
How to display the total number of calls for a Business Transaction over a 24 hour period:
(Load Dashbord in Edit Mode)
Click "Add Widget"
Click "Metric Value"
Click "Select a Metric"
Specify the Application and BT in top 2 sections
In next section click "Select a Metric"
Click "Calls per Minute" / "Select Metric"
Change "Value" to "Sum" in dropdown
Click "Save"
(optional) For time range can fix this to 24 hours by using the "Use Widget-Specific Time Range" option in the main widget edit screen (otherwise the dashboard time range will be used for the widget)
Click "Save"
(Docs for Dashboard widgets are here: https://docs.appdynamics.com/display/PRO21/Widgets)

How to correctly compose a game "Buy / Sell Item" transaction

I am working on a "Buy/Sell Item" functionality for an rpg game. If I am correct following actions need to happen in a single transaction
Get player based on playerID from "Players" table
Check if player has enough gold, if so create new item object
Write new item object to "Items" table, where owner is based on pllayerID
Update "Players" table row where owner is playerID, deduct gold based on item cost
If in above players gold changes while transaction is running or step 3 or 4 fail to execute simultaneously transaction should fail.
I've read the docs and can see that DynamoDB has TransactWriteItems and TransactGetItems which seem to be perfect for this, but are separate. Can I somehow use them in a single transaction?
Once you have your playerID, you should be able to merge step 4 into step 2 and then do steps 2-3 within one TransactWriteItems:
UPDATE the value of the gold conditionally - if enough gold is present, deduct the item cost immediately, else condition fails, and so does TransactWriteItems.
If you made it here, there was enough gold, and you can create and write the new object to the Items table.
Edit for explanation as to why this works:
TransactWriteItems groups the actions "Update gold" and "put item" as a single
all-or-nothing operation: either they both succeed or they both fail. And if another operation interferes, they also both fail (no race condition).
For example:
If there is not enough gold, the update fails, so the add item also fails.
If adding the item fails, the changes made to the gold will not be kept (the update will "fail")
If another operation is modifying the gold amount, both fail.
Essentially, it is impossible to either:
subtract the gold, but not add the item
add the item but not subtract the gold
Because they are both within the TransactWriteItems operation, either both happen, or neither does.
You can find an example in Java here. (For your use case, you can simply drop the customer validation and change "product status update" to "player gold update" and "add order" to "add item".)
For more details, see TransactWriteItems documentation here.

How to create a trigger in SQL Server that execute on a specific time and only once

I want a trigger (or something like that) that when is a specific date, for example 01-01 (every year) to execute only once and add to every column +20.
Table: Id#, Number
I am building an ASP.NET Core MVC project and I want to be able to do this operation for my database.
Expand the SQL Server Agent node and right click the Jobs node in SQL Server Agent and select 'New Job'
In the 'New Job' window enter the name of the job and a description on the 'General' tab.
Select 'Steps' on the left hand side of the window and click 'New' at the bottom.
In the 'Steps' window enter a step name and select the database you want the query to run against.
Paste in the T-SQL command you want to run into the Command window and click 'OK'.
Click on the 'Schedule' menu on the left of the New Job window and enter the schedule information (e.g. daily and a time).
Click 'OK' - and that should be it.
(There are of course other options you can add - but I would say that is the bare minimum you need to get a job set up and scheduled)
Quartz.net scheduler can be helpful for the purpose.
ISimpleTrigger trigger = (ISimpleTrigger) TriggerBuilder.Create() .WithIdentity("trigger1", "group1") .StartAt(myStartTime) // some Date .ForJob("job1", "group1") // identify job with name, group strings .Build();

Updates units in new iTunes Connect reports

The 'Sales and Trends' section in iTunes Connect was heavily redesigned.
The info popup for Units says
"By default, updates and previous purchase downloads are excluded."
But how can I switch from 'sales' to 'updates' as from now ?
Choose Filter and select "Transaction Type" and then select "Updates"
This is what is look like when you are done:
You can also download the report and then do some number crunching on the data export. Pivot off of "Product Type Identifier" and look for either 7 or 7F:
In the latest incarnation of iTunesConnect (as of 2016), you need to click on the "Sales & Trends" section and then add a filter for "Transaction Type".
One of the choices will be "Updates".
And your results may look like the below screenshot (well, hopefully with even more updated installs :-)

Resources