Skip to content

Commit

Permalink
microservices health rules (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
iogbole committed Aug 6, 2020
1 parent 16b3d57 commit efe90e4
Show file tree
Hide file tree
Showing 11 changed files with 610 additions and 60 deletions.
7 changes: 4 additions & 3 deletions configMyApp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ function func_check_http_status() {
local message_on_failure=$2
#echo "HTTP status code: $http_code"
if [[ $http_code -lt 200 ]] || [[ $http_code -gt 299 ]]; then
echo $message_on_failure

echo "$http_code : $message_on_failure"
func_cleanup
exit 1
fi
Expand Down Expand Up @@ -199,7 +200,7 @@ function func_import_health_rules(){
allHealthRules=$(curl -s --user ${_user_credentials} ${_controller_url}/alerting/rest/v1/applications/${appId}/health-rules ${_proxy_details})

for f in $folderPath; do

echo "Processing $f health rule template"
# get health rule name from json file
healthRuleName=$(jq -r '.name' <$f)
# use it to get health rule id (if exists)
Expand Down Expand Up @@ -244,7 +245,7 @@ echo ""

if [ "${_bt_only}" = true ]; then
echo ""
echo "You entered $_bt_only. This instruction will ONLY configure business transaction in $_application_name"
echo "BT_ONLY=$_bt_only. This instruction will ONLY configure business transaction in $_application_name"
echo "Application health rules, SIM health rules, dashboard, etc will not be created..."
echo ""
echo "Please wait while we process your Business transaction configuration settings from the JSON file"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,44 +1,49 @@
{
"name": "Node Availability: .Net Agents",
"name": "Agent Availability",
"enabled": true,
"useDataFromLastNMinutes": 6,
"waitTimeAfterViolation": 6,
"useDataFromLastNMinutes": 60,
"waitTimeAfterViolation": 30,
"scheduleName": "Always",
"affects": {
"affectedEntityType": "TIER_NODE_HARDWARE",
"affectedEntities": {
"tierOrNode": "NODE_AFFECTED_ENTITIES",
"typeofNode": "DOT_NET_NODES",
"typeofNode": "ALL_NODES",
"affectedNodes": {
"affectedNodeScope": "ALL_NODES"
"affectedNodeScope": "NODES_MATCHING_PATTERN",
"patternMatcher": {
"matchTo": "EQUALS",
"matchValue": "Machine Agent",
"shouldNot": true
}
}
}
},
"evalCriterias": {
"criticalCriteria": {
"criticalCriteria": null,
"warningCriteria": {
"conditionAggregationType": "ALL",
"conditionExpression": null,
"conditions": [
{
"name": ".Net Node Availability Health",
"name": "Agent Failure Warning",
"shortName": "A",
"evaluateToTrueOnNoData": false,
"evaluateToTrueOnNoData": true,
"evalDetail": {
"evalDetailType": "SINGLE_METRIC",
"metricAggregateFunction": "SUM",
"metricAggregateFunction": "VALUE",
"metricPath": "Agent|Machine|Availability",
"metricEvalDetail": {
"metricEvalDetailType": "SPECIFIC_TYPE",
"compareCondition": "LESS_THAN_SPECIFIC_VALUE",
"compareValue": 3
"compareValue": 1
}
},
"triggerEnabled": false,
"minimumTriggers": 2
"minimumTriggers": 0
}
],
"evalMatchingCriteria": null
},
"warningCriteria": null
}
}
}
44 changes: 0 additions & 44 deletions healthrules/Application/NodeAvailability-JavaAgents.json

This file was deleted.

153 changes: 153 additions & 0 deletions healthrules/Application/RemoteService-ErrorRate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{
"name": "Standard Remote Service: Error Rate Health",
"enabled": true,
"useDataFromLastNMinutes": 30,
"waitTimeAfterViolation": 30,
"scheduleName": "Always",
"affects": {
"affectedEntityType": "BACKENDS",
"affectedBackends": {
"backendScope": "ALL_BACKENDS"
}
},
"evalCriterias": {
"criticalCriteria": {
"conditionAggregationType": "ALL",
"conditionExpression": null,
"conditions": [
{
"name": "Error Percentage",
"shortName": "A",
"evaluateToTrueOnNoData": false,
"evalDetail": {
"evalDetailType": "METRIC_EXPRESSION",
"metricExpression": "{totalErrors}/{totalCalls}*100",
"metricExpressionVariables": [
{
"variableName": "totalErrors",
"metricAggregateFunction": "VALUE",
"metricPath": "Errors per Minute"
},
{
"variableName": "totalCalls",
"metricAggregateFunction": "VALUE",
"metricPath": "Calls per Minute"
}
],
"metricEvalDetail": {
"metricEvalDetailType": "SPECIFIC_TYPE",
"compareCondition": "GREATER_THAN_SPECIFIC_VALUE",
"compareValue": 5
}
},
"triggerEnabled": false,
"minimumTriggers": 15
},
{
"name": "Minimum Calls per Minute",
"shortName": "B",
"evaluateToTrueOnNoData": false,
"evalDetail": {
"evalDetailType": "SINGLE_METRIC",
"metricAggregateFunction": "VALUE",
"metricPath": "Calls per Minute",
"metricEvalDetail": {
"metricEvalDetailType": "SPECIFIC_TYPE",
"compareCondition": "GREATER_THAN_SPECIFIC_VALUE",
"compareValue": 10
}
},
"triggerEnabled": false,
"minimumTriggers": 15
},
{
"name": "Minimum Errors",
"shortName": "C",
"evaluateToTrueOnNoData": false,
"evalDetail": {
"evalDetailType": "SINGLE_METRIC",
"metricAggregateFunction": "VALUE",
"metricPath": "Errors per Minute",
"metricEvalDetail": {
"metricEvalDetailType": "SPECIFIC_TYPE",
"compareCondition": "GREATER_THAN_SPECIFIC_VALUE",
"compareValue": 10
}
},
"triggerEnabled": false,
"minimumTriggers": 15
}
],
"evalMatchingCriteria": null
},
"warningCriteria": {
"conditionAggregationType": "ALL",
"conditionExpression": null,
"conditions": [
{
"name": "Error Percentage",
"shortName": "A",
"evaluateToTrueOnNoData": false,
"evalDetail": {
"evalDetailType": "METRIC_EXPRESSION",
"metricExpression": "{totalErrors}/{totalCalls}*100",
"metricExpressionVariables": [
{
"variableName": "totalErrors",
"metricAggregateFunction": "VALUE",
"metricPath": "Errors per Minute"
},
{
"variableName": "totalCalls",
"metricAggregateFunction": "VALUE",
"metricPath": "Calls per Minute"
}
],
"metricEvalDetail": {
"metricEvalDetailType": "SPECIFIC_TYPE",
"compareCondition": "GREATER_THAN_SPECIFIC_VALUE",
"compareValue": 1
}
},
"triggerEnabled": false,
"minimumTriggers": 15
},
{
"name": "Minimum Calls per Minute",
"shortName": "B",
"evaluateToTrueOnNoData": false,
"evalDetail": {
"evalDetailType": "SINGLE_METRIC",
"metricAggregateFunction": "VALUE",
"metricPath": "Calls per Minute",
"metricEvalDetail": {
"metricEvalDetailType": "SPECIFIC_TYPE",
"compareCondition": "GREATER_THAN_SPECIFIC_VALUE",
"compareValue": 10
}
},
"triggerEnabled": false,
"minimumTriggers": 15
},
{
"name": "Minimum Errors",
"shortName": "C",
"evaluateToTrueOnNoData": false,
"evalDetail": {
"evalDetailType": "SINGLE_METRIC",
"metricAggregateFunction": "VALUE",
"metricPath": "Errors per Minute",
"metricEvalDetail": {
"metricEvalDetailType": "SPECIFIC_TYPE",
"compareCondition": "GREATER_THAN_SPECIFIC_VALUE",
"compareValue": 10
}
},
"triggerEnabled": false,
"minimumTriggers": 15
}
],
"evalMatchingCriteria": null
}
}
}
Loading

0 comments on commit efe90e4

Please sign in to comment.