diff --git a/DE-3/TP_Mobile_Send2VehicleMGU.yaml b/DE-3/TP_Mobile_Send2VehicleMGU.yaml index 112b33e..798a2d2 100644 --- a/DE-3/TP_Mobile_Send2VehicleMGU.yaml +++ b/DE-3/TP_Mobile_Send2VehicleMGU.yaml @@ -29,4 +29,4 @@ slo_definition: - service: "TripService - PROD" keyRequests: - "/v3/motorist/[UUID]/trips" - - "/v2/motorist/[UUID]/trips" + - "/v2/motorist/[UUID]/trips" \ No newline at end of file diff --git a/DE-3/TP_Vehicle_FTS.yaml b/DE-3/TP_Vehicle_FTS.yaml index 9597a60..7ce516a 100644 --- a/DE-3/TP_Vehicle_FTS.yaml +++ b/DE-3/TP_Vehicle_FTS.yaml @@ -32,4 +32,4 @@ slo_definition: filter: - service: "POIs" keyRequests: - - "getPOIs (FTS Calls)" + - "getPOIs (FTS Calls)" \ No newline at end of file diff --git a/DE-3/TP_Vehicle_RTTI.yaml b/DE-3/TP_Vehicle_RTTI.yaml index 471c2a8..2373d9a 100644 --- a/DE-3/TP_Vehicle_RTTI.yaml +++ b/DE-3/TP_Vehicle_RTTI.yaml @@ -27,4 +27,4 @@ slo_definition: filter: - service: "Netty on 0.0.0.0:8080 - rtti - prod" keyRequests: - - "" + - "" \ No newline at end of file diff --git a/DE-3/TP_Vehicle_eRoute.yaml b/DE-3/TP_Vehicle_eRoute.yaml index 96f9759..b3ba2eb 100644 --- a/DE-3/TP_Vehicle_eRoute.yaml +++ b/DE-3/TP_Vehicle_eRoute.yaml @@ -28,4 +28,4 @@ slo_definition: - "/api/eu/2.5/eroute-costs/protobuf3" - service: "Netty on 0.0.0.0:8080 - eroute-adapter - prod" keyRequests: - - "/route/eroute" + - "/route/eroute" \ No newline at end of file diff --git a/DE-4/TP_Mobile_Login.yaml b/DE-4/TP_Mobile_Login.yaml index 2cff4de..3d3d126 100644 --- a/DE-4/TP_Mobile_Login.yaml +++ b/DE-4/TP_Mobile_Login.yaml @@ -39,8 +39,8 @@ slo_definition: - "POST /api/v2/presentation/profile-account" - "GET /api/v1/presentation/profile-tab/contacts" - service: "btc-cn-connected-oauth-service - PROD" - keyRequests: + keyRequests: - "POST /api/v2/cop/login/pwd" - "POST /api/v2/cop/login/sms" - "POST /api/v2/cop/sso" - - "GET /api/v1/cop/logout" + - "GET /api/v1/cop/logout" \ No newline at end of file diff --git a/DE-4/TP_Mobile_Mapping.yaml b/DE-4/TP_Mobile_Mapping.yaml index 9a156d1..c096341 100644 --- a/DE-4/TP_Mobile_Mapping.yaml +++ b/DE-4/TP_Mobile_Mapping.yaml @@ -60,4 +60,4 @@ slo_definition: - "POST /api/v2/vehicles//primary/map" - "POST /api/v1/vehicles//validate-security-code" - "POST /api/v1/vehicles//resend-security-code" - - "DELETE /api/v1/vehicles/" + - "DELETE /api/v1/vehicles/" \ No newline at end of file diff --git a/DE-4/TP_Mobile_PersonalFavorites.yaml b/DE-4/TP_Mobile_PersonalFavorites.yaml index e49af0a..3e12c93 100644 --- a/DE-4/TP_Mobile_PersonalFavorites.yaml +++ b/DE-4/TP_Mobile_PersonalFavorites.yaml @@ -22,24 +22,24 @@ slo_definition: - "PUT /api/v2/favorites/" - "PUT /api/v3/favorites/" - "PUT /api/v2/favorites/homework/1" - - "PUT /api/v2/favorites/homework/2" + - "PUT /api/v2/favorites/homework/2" NA-Prod: - metric: "builtin:service.keyRequest.errors.server.successCount" filter: - service: "btc-destination-composite-service - PROD" keyRequests: - "POST /api/v2/favorites/" - - "POST /api/v3/favorites/" - - "GET /api/v2/favorites/" - - "GET /api/v3/favorites/" - - "PUT /api/v2/favorites/" - - "PUT /api/v3/favorites/" - - "DELETE /api/v2/favorites/" + - "POST /api/v3/favorites/" + - "GET /api/v2/favorites/" + - "GET /api/v3/favorites/" + - "PUT /api/v2/favorites/" + - "PUT /api/v3/favorites/" + - "DELETE /api/v2/favorites/" CN-Prod: - metric: "builtin:service.keyRequest.errors.server.successCount" filter: - service: "btc-destination-composite-service - PROD" - keyRequests: + keyRequests: - "GET /api/v3/favorites/" - "POST /api/v3/favorites/" - - "PUT /api/v3/favorites/" + - "PUT /api/v3/favorites/" \ No newline at end of file diff --git a/DE-4/TP_Mobile_VehicleList.yaml b/DE-4/TP_Mobile_VehicleList.yaml index 2c6ab62..29898e3 100644 --- a/DE-4/TP_Mobile_VehicleList.yaml +++ b/DE-4/TP_Mobile_VehicleList.yaml @@ -28,4 +28,4 @@ slo_definition: filter: - service: "btc-vehicle-composite-service - PROD" keyRequests: - - "GET /api/v1/vehicles" + - "GET /api/v1/vehicles" \ No newline at end of file diff --git a/DE-7/TP_Mobile_DigitalKey.yaml b/DE-7/TP_Mobile_DigitalKey.yaml index cba2cc9..cf49c8d 100644 --- a/DE-7/TP_Mobile_DigitalKey.yaml +++ b/DE-7/TP_Mobile_DigitalKey.yaml @@ -13,32 +13,32 @@ slo_definition: - metric: "builtin:service.keyRequest.errors.fivexx.count" filter: - service: "TrackApi - smc - PROD" - keyRequests: + keyRequests: - "trackKey" - "manageKey" - service: "digital-key-composite-service - PROD" - keyRequests: + keyRequests: - "GET /api/v1/digitalkey//password" - "GET /api/v1/digitalkey//pairing" NA-Prod: - metric: "builtin:service.keyRequest.errors.fivexx.count" filter: - service: "TrackApi - smc - PROD" - keyRequests: + keyRequests: - "trackKey" - "manageKey" - service: "digital-key-composite-service - PROD" - keyRequests: + keyRequests: - "GET /api/v1/digitalkey//password" - "GET /api/v1/digitalkey//pairing" CN-Prod: - metric: "builtin:service.keyRequest.errors.fivexx.count" filter: - service: "TrackApi - smc - PROD" - keyRequests: + keyRequests: - "trackKey" - "manageKey" - service: "digital-key-composite-service - PROD" - keyRequests: + keyRequests: - "GET /api/v1/digitalkey//password" - - "GET /api/v1/digitalkey//pairing" + - "GET /api/v1/digitalkey//pairing" \ No newline at end of file diff --git a/DE-7/TP_Mobile_Remote360.yaml b/DE-7/TP_Mobile_Remote360.yaml index acb62d2..59b105d 100644 --- a/DE-7/TP_Mobile_Remote360.yaml +++ b/DE-7/TP_Mobile_Remote360.yaml @@ -47,4 +47,4 @@ slo_definition: - "POST /api/v1/download/[UUID]//confirm" - "GET /api/v1/vehicle//egomodelurl" - "GET /api/v1/vehicle//key" - - "GET /api/v1/recordings/vehicle/" + - "GET /api/v1/recordings/vehicle/" \ No newline at end of file diff --git a/DE-7/TP_Mobile_RemoteServices.yaml b/DE-7/TP_Mobile_RemoteServices.yaml index 415a4c9..a98d21f 100644 --- a/DE-7/TP_Mobile_RemoteServices.yaml +++ b/DE-7/TP_Mobile_RemoteServices.yaml @@ -52,8 +52,8 @@ slo_definition: - "POST /api/v2/presentation/remote-commands//door-unlock" - "POST /api/v2/presentation/remote-commands//climate-now" - "GET /api/v2/presentation/remote-history/" - - "POST /api/v2/presentation/remote-commands//horn-blow", - - "POST /api/v2/presentation/remote-commands//climate-timer", - - "POST /api/v2/presentation/remote-commands//light-flash", - - "POST /api/v2/presentation/remote-commands//vehicle-finder", - - "GET /api/v1/presentation/remote-history/" + - "POST /api/v2/presentation/remote-commands//horn-blow" + - "POST /api/v2/presentation/remote-commands//climate-timer" + - "POST /api/v2/presentation/remote-commands//light-flash" + - "POST /api/v2/presentation/remote-commands//vehicle-finder" + - "GET /api/v1/presentation/remote-history/" \ No newline at end of file diff --git a/DE-7/TP_Mobile_Send2VehicleLegacy.yaml b/DE-7/TP_Mobile_Send2VehicleLegacy.yaml index 816e77f..aef5083 100644 --- a/DE-7/TP_Mobile_Send2VehicleLegacy.yaml +++ b/DE-7/TP_Mobile_Send2VehicleLegacy.yaml @@ -26,4 +26,4 @@ slo_definition: filter: - service: "LegacyPoiApi - msgsvc - prod" keyRequests: - - "" + - "" \ No newline at end of file diff --git a/DE-7/TP_Mobile_VehicleData.yaml b/DE-7/TP_Mobile_VehicleData.yaml index 293b0ba..2ca02a5 100644 --- a/DE-7/TP_Mobile_VehicleData.yaml +++ b/DE-7/TP_Mobile_VehicleData.yaml @@ -30,4 +30,4 @@ slo_definition: filter: - service: "btc-vehicle-composite-service - PROD" keyRequests: - - "GET /api/v1/vehicles" + - "GET /api/v1/vehicles" \ No newline at end of file diff --git a/DE-7/TP_Vehicle_FTS.yaml b/DE-7/TP_Vehicle_FTS.yaml index fc038d1..f799d4e 100644 --- a/DE-7/TP_Vehicle_FTS.yaml +++ b/DE-7/TP_Vehicle_FTS.yaml @@ -32,4 +32,4 @@ slo_definition: filter: - service: "POIs" keyRequests: - - "getPOIs (FTS Calls)" + - "getPOIs (FTS Calls)" \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index f621c31..7cd9950 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,6 +17,7 @@ // } // } + pipeline { options { ansiColor('xterm') @@ -25,11 +26,9 @@ // agent {label 'jaws-slaves'} agent {label 'jaws-slaves'} parameters { - // string(name: 'FROMDATE', defaultValue: '', description: 'Enter from date in format YYYY-MM-DD e.g. 2021-11-01') - - // string(name: 'TODATE', defaultValue: '', description: 'Enter to date in format YYYY-MM-DD e.g. 2021-11-30') - string(name: 'INPUTFOLDER', defaultValue: 'DE-3', description: 'Enter the business line (aka department) folder e.g. DE-3') + string(name: 'ABRANCH', defaultValue: 'BusinessLine', description: 'Enter the branch for the shared_configuration repository') + string(name: 'BBRANCH', defaultValue: 'master', description: 'Enter the branch for the coco_terraform_config repository') } @@ -56,6 +55,15 @@ } stages { + stage('Checkout Repositories'){ + steps { + sh ''' + git branch: '${abranch}', credentialsId: 'jaws_dynatrace_bitbuket_user', url: 'https://atc.bmwgroup.net/bitbucket/scm/opapm/shared_configuration.git' + git branch: '${bbranch}', credentialsId: 'jaws_dynatrace_bitbuket_user', url: 'https://atc.bmwgroup.net/bitbucket/scm/opapm/coco_terraform_config.git' + ''' + } + } + stage('Install Required Python Packages') { steps { sh ''' @@ -69,15 +77,14 @@ stage('Execute Script') { steps { - sh "python3 generate.py ${params.INPUTFOLDER}" + sh ''' + python3 generate.py .\shared_configuration\${params.INPUTFOLDER} + ''' - //Only required once CN is not reachable from EMEA //loopEnvironments(environments) } - } - } post { @@ -95,4 +102,4 @@ cleanWs() } } -} \ No newline at end of file +} diff --git a/generate.py b/generate.py index fce5c01..241980e 100644 --- a/generate.py +++ b/generate.py @@ -113,21 +113,23 @@ if __name__ == "__main__": print(sys.argv) if len(sys.argv) != 2: - print(".\generate.py ") - print("Example: .\generate.py DE-3") - print("Example: .\generate.py DE-3,DE-4,...") + print(".\generate.py ") + print("Example: .\generate.py .\DE-3\\") + print("Example: .\generate.py .\DE-3\,.\DE-4\,...") sys.exit() - # init folder - for folderName,businessLine in FOLDERS.items(): - businessLinePath = os.path.join(cwd,os.path.basename(businessLine)) - if not os.path.exists(businessLinePath): - os.makedirs(businessLinePath) + # TESTING: Unocmment this if you want to test it + # for folderName,businessLine in FOLDERS.items(): + # businessLinePath = os.path.join(cwd,businessLine) + # if not os.path.exists(businessLinePath): + # os.makedirs(businessLinePath) # for each folder - for arg in [sys.argv[1]]: + arguments = sys.argv[1].split(',') + for arg in arguments: + pathname = os.path.join(cwd,arg) # return path of slo config files - configFiles = glob.glob(pathname=os.path.join(cwd,os.path.basename(arg))+'\\**\\*.yaml', + configFiles = glob.glob(pathname=pathname + '\\**\\*.yaml', # root_dir=os.path.join(cwd,os.path.basename(arg)), recursive=True) diff --git a/output/CN_Prod/slo/TP_Mobile_PersonalFavorites.tf b/output/CN_Prod/slo/TP_Mobile_PersonalFavorites.tf new file mode 100644 index 0000000..6fc088f --- /dev/null +++ b/output/CN_Prod/slo/TP_Mobile_PersonalFavorites.tf @@ -0,0 +1,47 @@ +module TP_Mobile_PersonalFavorites { + + source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" + + name = "TP_Mobile_PersonalFavorites" + + description = "2.0 SLO Mobile" + + # entity selector object + filter = "" + + # metric expression of the calculation as done in data explorer ui + metric_expression = <~" + )"))))):splitBy()) + / + (builtin:service.keyRequest.count.server:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method), + fromRelationship.isServiceMethodOfService( + type(~"SERVICE~"),entityName.in( + ~"btc-destination-composite-service - PROD~" + ) + ),entityName.in( + ~"GET /api/v3/favorites/~", + ~"POST /api/v3/favorites/~", + ~"PUT /api/v3/favorites/~" + )"))))):splitBy())) + EOT + + # if not set (removed) it's defaulted to "-1d" + timeframe = "-1d" + + # currently the only possible value + evaluation = "AGGREGATE" + + # target and warning percentage of the SLO as double + target = 98 # if not set(removed) it's defaulted to 98 + warning = 99 # if not set(removed) it's defaulted to 99 + +} \ No newline at end of file diff --git a/output/CN_Prod/slo/TP_Mobile_RemoteServices.tf b/output/CN_Prod/slo/TP_Mobile_RemoteServices.tf new file mode 100644 index 0000000..2559def --- /dev/null +++ b/output/CN_Prod/slo/TP_Mobile_RemoteServices.tf @@ -0,0 +1,61 @@ +module TP_Mobile_RemoteServices { + + source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" + + name = "TP_Mobile_RemoteServices" + + description = "2.0 SLO Mobile" + + # entity selector object + filter = "" + + # metric expression of the calculation as done in data explorer ui + metric_expression = </door-lock~", + ~"POST /api/v2/presentation/remote-commands//door-unlock~", + ~"POST /api/v2/presentation/remote-commands//climate-now~", + ~"GET /api/v2/presentation/remote-history/~", + ~"POST /api/v2/presentation/remote-commands//horn-blow~", + ~"POST /api/v2/presentation/remote-commands//climate-timer~", + ~"POST /api/v2/presentation/remote-commands//light-flash~", + ~"POST /api/v2/presentation/remote-commands//vehicle-finder~", + ~"GET /api/v1/presentation/remote-history/~" + )"))))):splitBy()) + / + (builtin:service.keyRequest.count.server:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method), + fromRelationship.isServiceMethodOfService( + type(~"SERVICE~"),entityName.in( + ~"btc-vehicle-remote-commands-composite-service - PROD~" + ) + ),entityName.in( + ~"POST /api/v2/presentation/remote-commands/eventStatus~", + ~"POST /api/v2/presentation/remote-commands//door-lock~", + ~"POST /api/v2/presentation/remote-commands//door-unlock~", + ~"POST /api/v2/presentation/remote-commands//climate-now~", + ~"GET /api/v2/presentation/remote-history/~", + ~"POST /api/v2/presentation/remote-commands//horn-blow~", + ~"POST /api/v2/presentation/remote-commands//climate-timer~", + ~"POST /api/v2/presentation/remote-commands//light-flash~", + ~"POST /api/v2/presentation/remote-commands//vehicle-finder~", + ~"GET /api/v1/presentation/remote-history/~" + )"))))):splitBy())) + EOT + + # if not set (removed) it's defaulted to "-1d" + timeframe = "-1d" + + # currently the only possible value + evaluation = "AGGREGATE" + + # target and warning percentage of the SLO as double + target = 98 # if not set(removed) it's defaulted to 98 + warning = 99 # if not set(removed) it's defaulted to 99 + +} \ No newline at end of file diff --git a/output/CN_Prod/slo/TP_Mobile_Send2VehicleLegacy.tf b/output/CN_Prod/slo/TP_Mobile_Send2VehicleLegacy.tf new file mode 100644 index 0000000..5e95186 --- /dev/null +++ b/output/CN_Prod/slo/TP_Mobile_Send2VehicleLegacy.tf @@ -0,0 +1,34 @@ +module TP_Mobile_Send2VehicleLegacy { + + source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" + + name = "TP_Mobile_Send2VehicleLegacy" + + description = "2.0 SLO Mobile" + + # entity selector object + filter = "" + + # metric expression of the calculation as done in data explorer ui + metric_expression = <~" + )"))))):splitBy()) + / + (builtin:service.keyRequest.count.server:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method), + fromRelationship.isServiceMethodOfService( + type(~"SERVICE~"),entityName.in( + ~"btc-destination-composite-service - PROD~" + ) + ),entityName.in( + ~"GET /api/v3/favorites/~", + ~"POST /api/v3/favorites/~", + ~"PUT /api/v3/favorites/~" + )"))))):splitBy())) + EOT + + # if not set (removed) it's defaulted to "-1d" + timeframe = "-1d" + + # currently the only possible value + evaluation = "AGGREGATE" + + # target and warning percentage of the SLO as double + target = 98 # if not set(removed) it's defaulted to 98 + warning = 99 # if not set(removed) it's defaulted to 99 + +} \ No newline at end of file diff --git a/output/EMEA_Prod/slo/TP_Mobile_RemoteServices.tf b/output/EMEA_Prod/slo/TP_Mobile_RemoteServices.tf new file mode 100644 index 0000000..2559def --- /dev/null +++ b/output/EMEA_Prod/slo/TP_Mobile_RemoteServices.tf @@ -0,0 +1,61 @@ +module TP_Mobile_RemoteServices { + + source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" + + name = "TP_Mobile_RemoteServices" + + description = "2.0 SLO Mobile" + + # entity selector object + filter = "" + + # metric expression of the calculation as done in data explorer ui + metric_expression = </door-lock~", + ~"POST /api/v2/presentation/remote-commands//door-unlock~", + ~"POST /api/v2/presentation/remote-commands//climate-now~", + ~"GET /api/v2/presentation/remote-history/~", + ~"POST /api/v2/presentation/remote-commands//horn-blow~", + ~"POST /api/v2/presentation/remote-commands//climate-timer~", + ~"POST /api/v2/presentation/remote-commands//light-flash~", + ~"POST /api/v2/presentation/remote-commands//vehicle-finder~", + ~"GET /api/v1/presentation/remote-history/~" + )"))))):splitBy()) + / + (builtin:service.keyRequest.count.server:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method), + fromRelationship.isServiceMethodOfService( + type(~"SERVICE~"),entityName.in( + ~"btc-vehicle-remote-commands-composite-service - PROD~" + ) + ),entityName.in( + ~"POST /api/v2/presentation/remote-commands/eventStatus~", + ~"POST /api/v2/presentation/remote-commands//door-lock~", + ~"POST /api/v2/presentation/remote-commands//door-unlock~", + ~"POST /api/v2/presentation/remote-commands//climate-now~", + ~"GET /api/v2/presentation/remote-history/~", + ~"POST /api/v2/presentation/remote-commands//horn-blow~", + ~"POST /api/v2/presentation/remote-commands//climate-timer~", + ~"POST /api/v2/presentation/remote-commands//light-flash~", + ~"POST /api/v2/presentation/remote-commands//vehicle-finder~", + ~"GET /api/v1/presentation/remote-history/~" + )"))))):splitBy())) + EOT + + # if not set (removed) it's defaulted to "-1d" + timeframe = "-1d" + + # currently the only possible value + evaluation = "AGGREGATE" + + # target and warning percentage of the SLO as double + target = 98 # if not set(removed) it's defaulted to 98 + warning = 99 # if not set(removed) it's defaulted to 99 + +} \ No newline at end of file diff --git a/output/EMEA_Prod/slo/TP_Mobile_Send2VehicleLegacy.tf b/output/EMEA_Prod/slo/TP_Mobile_Send2VehicleLegacy.tf new file mode 100644 index 0000000..5e95186 --- /dev/null +++ b/output/EMEA_Prod/slo/TP_Mobile_Send2VehicleLegacy.tf @@ -0,0 +1,34 @@ +module TP_Mobile_Send2VehicleLegacy { + + source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" + + name = "TP_Mobile_Send2VehicleLegacy" + + description = "2.0 SLO Mobile" + + # entity selector object + filter = "" + + # metric expression of the calculation as done in data explorer ui + metric_expression = <~" + )"))))):splitBy()) + / + (builtin:service.keyRequest.count.server:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method), + fromRelationship.isServiceMethodOfService( + type(~"SERVICE~"),entityName.in( + ~"btc-destination-composite-service - PROD~" + ) + ),entityName.in( + ~"GET /api/v3/favorites/~", + ~"POST /api/v3/favorites/~", + ~"PUT /api/v3/favorites/~" + )"))))):splitBy())) + EOT + + # if not set (removed) it's defaulted to "-1d" + timeframe = "-1d" + + # currently the only possible value + evaluation = "AGGREGATE" + + # target and warning percentage of the SLO as double + target = 98 # if not set(removed) it's defaulted to 98 + warning = 99 # if not set(removed) it's defaulted to 99 + +} \ No newline at end of file diff --git a/output/NA_Prod/slo/TP_Mobile_RemoteServices.tf b/output/NA_Prod/slo/TP_Mobile_RemoteServices.tf new file mode 100644 index 0000000..2559def --- /dev/null +++ b/output/NA_Prod/slo/TP_Mobile_RemoteServices.tf @@ -0,0 +1,61 @@ +module TP_Mobile_RemoteServices { + + source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" + + name = "TP_Mobile_RemoteServices" + + description = "2.0 SLO Mobile" + + # entity selector object + filter = "" + + # metric expression of the calculation as done in data explorer ui + metric_expression = </door-lock~", + ~"POST /api/v2/presentation/remote-commands//door-unlock~", + ~"POST /api/v2/presentation/remote-commands//climate-now~", + ~"GET /api/v2/presentation/remote-history/~", + ~"POST /api/v2/presentation/remote-commands//horn-blow~", + ~"POST /api/v2/presentation/remote-commands//climate-timer~", + ~"POST /api/v2/presentation/remote-commands//light-flash~", + ~"POST /api/v2/presentation/remote-commands//vehicle-finder~", + ~"GET /api/v1/presentation/remote-history/~" + )"))))):splitBy()) + / + (builtin:service.keyRequest.count.server:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method), + fromRelationship.isServiceMethodOfService( + type(~"SERVICE~"),entityName.in( + ~"btc-vehicle-remote-commands-composite-service - PROD~" + ) + ),entityName.in( + ~"POST /api/v2/presentation/remote-commands/eventStatus~", + ~"POST /api/v2/presentation/remote-commands//door-lock~", + ~"POST /api/v2/presentation/remote-commands//door-unlock~", + ~"POST /api/v2/presentation/remote-commands//climate-now~", + ~"GET /api/v2/presentation/remote-history/~", + ~"POST /api/v2/presentation/remote-commands//horn-blow~", + ~"POST /api/v2/presentation/remote-commands//climate-timer~", + ~"POST /api/v2/presentation/remote-commands//light-flash~", + ~"POST /api/v2/presentation/remote-commands//vehicle-finder~", + ~"GET /api/v1/presentation/remote-history/~" + )"))))):splitBy())) + EOT + + # if not set (removed) it's defaulted to "-1d" + timeframe = "-1d" + + # currently the only possible value + evaluation = "AGGREGATE" + + # target and warning percentage of the SLO as double + target = 98 # if not set(removed) it's defaulted to 98 + warning = 99 # if not set(removed) it's defaulted to 99 + +} \ No newline at end of file diff --git a/output/NA_Prod/slo/TP_Mobile_Send2VehicleLegacy.tf b/output/NA_Prod/slo/TP_Mobile_Send2VehicleLegacy.tf new file mode 100644 index 0000000..5e95186 --- /dev/null +++ b/output/NA_Prod/slo/TP_Mobile_Send2VehicleLegacy.tf @@ -0,0 +1,34 @@ +module TP_Mobile_Send2VehicleLegacy { + + source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" + + name = "TP_Mobile_Send2VehicleLegacy" + + description = "2.0 SLO Mobile" + + # entity selector object + filter = "" + + # metric expression of the calculation as done in data explorer ui + metric_expression = <