From 352127ed744b17d9d3dcca1b6f9083ac2b53b0e7 Mon Sep 17 00:00:00 2001 From: "SLW\\ARNAUA" Date: Thu, 9 Mar 2023 12:03:22 +0100 Subject: [PATCH] modified --- Jenkinsfile | 21 ++++++- generate.py | 19 +++--- output/CN_Prod/slo/TP_Mobile_DigitalKey.tf | 51 ---------------- output/CN_Prod/slo/TP_Mobile_Login.tf | 59 ------------------ output/CN_Prod/slo/TP_Mobile_Mapping.tf | 55 ----------------- .../slo/TP_Mobile_PersonalFavorites.tf | 47 -------------- output/CN_Prod/slo/TP_Mobile_Remote360.tf | 57 ----------------- .../CN_Prod/slo/TP_Mobile_RemoteServices.tf | 61 ------------------- .../slo/TP_Mobile_Send2VehicleLegacy.tf | 34 ----------- .../CN_Prod/slo/TP_Mobile_Send2VehicleMGU.tf | 45 -------------- output/CN_Prod/slo/TP_Mobile_VehicleData.tf | 43 ------------- output/CN_Prod/slo/TP_Mobile_VehicleList.tf | 43 ------------- output/CN_Prod/slo/TP_Vehicle_FTS.tf | 34 ----------- output/CN_Prod/slo/TP_Vehicle_RTTI.tf | 35 ----------- output/EMEA_Prod/slo/TP_Mobile_DigitalKey.tf | 51 ---------------- output/EMEA_Prod/slo/TP_Mobile_Login.tf | 59 ------------------ output/EMEA_Prod/slo/TP_Mobile_Mapping.tf | 55 ----------------- .../slo/TP_Mobile_PersonalFavorites.tf | 47 -------------- output/EMEA_Prod/slo/TP_Mobile_Remote360.tf | 57 ----------------- .../EMEA_Prod/slo/TP_Mobile_RemoteServices.tf | 61 ------------------- .../slo/TP_Mobile_Send2VehicleLegacy.tf | 34 ----------- .../slo/TP_Mobile_Send2VehicleMGU.tf | 45 -------------- output/EMEA_Prod/slo/TP_Mobile_VehicleData.tf | 43 ------------- output/EMEA_Prod/slo/TP_Mobile_VehicleList.tf | 43 ------------- output/EMEA_Prod/slo/TP_Vehicle_FTS.tf | 34 ----------- output/EMEA_Prod/slo/TP_Vehicle_RTTI.tf | 35 ----------- output/EMEA_Prod/slo/TP_Vehicle_eRoute.tf | 37 ----------- output/NA_Prod/slo/TP_Mobile_DigitalKey.tf | 51 ---------------- output/NA_Prod/slo/TP_Mobile_Login.tf | 59 ------------------ output/NA_Prod/slo/TP_Mobile_Mapping.tf | 55 ----------------- .../slo/TP_Mobile_PersonalFavorites.tf | 47 -------------- output/NA_Prod/slo/TP_Mobile_Remote360.tf | 57 ----------------- .../NA_Prod/slo/TP_Mobile_RemoteServices.tf | 61 ------------------- .../slo/TP_Mobile_Send2VehicleLegacy.tf | 34 ----------- .../NA_Prod/slo/TP_Mobile_Send2VehicleMGU.tf | 45 -------------- output/NA_Prod/slo/TP_Mobile_VehicleData.tf | 43 ------------- output/NA_Prod/slo/TP_Mobile_VehicleList.tf | 43 ------------- output/NA_Prod/slo/TP_Vehicle_FTS.tf | 34 ----------- output/NA_Prod/slo/TP_Vehicle_RTTI.tf | 35 ----------- output/NA_Prod/slo/TP_Vehicle_eRoute.tf | 37 ----------- 40 files changed, 32 insertions(+), 1774 deletions(-) delete mode 100644 output/CN_Prod/slo/TP_Mobile_DigitalKey.tf delete mode 100644 output/CN_Prod/slo/TP_Mobile_Login.tf delete mode 100644 output/CN_Prod/slo/TP_Mobile_Mapping.tf delete mode 100644 output/CN_Prod/slo/TP_Mobile_PersonalFavorites.tf delete mode 100644 output/CN_Prod/slo/TP_Mobile_Remote360.tf delete mode 100644 output/CN_Prod/slo/TP_Mobile_RemoteServices.tf delete mode 100644 output/CN_Prod/slo/TP_Mobile_Send2VehicleLegacy.tf delete mode 100644 output/CN_Prod/slo/TP_Mobile_Send2VehicleMGU.tf delete mode 100644 output/CN_Prod/slo/TP_Mobile_VehicleData.tf delete mode 100644 output/CN_Prod/slo/TP_Mobile_VehicleList.tf delete mode 100644 output/CN_Prod/slo/TP_Vehicle_FTS.tf delete mode 100644 output/CN_Prod/slo/TP_Vehicle_RTTI.tf delete mode 100644 output/EMEA_Prod/slo/TP_Mobile_DigitalKey.tf delete mode 100644 output/EMEA_Prod/slo/TP_Mobile_Login.tf delete mode 100644 output/EMEA_Prod/slo/TP_Mobile_Mapping.tf delete mode 100644 output/EMEA_Prod/slo/TP_Mobile_PersonalFavorites.tf delete mode 100644 output/EMEA_Prod/slo/TP_Mobile_Remote360.tf delete mode 100644 output/EMEA_Prod/slo/TP_Mobile_RemoteServices.tf delete mode 100644 output/EMEA_Prod/slo/TP_Mobile_Send2VehicleLegacy.tf delete mode 100644 output/EMEA_Prod/slo/TP_Mobile_Send2VehicleMGU.tf delete mode 100644 output/EMEA_Prod/slo/TP_Mobile_VehicleData.tf delete mode 100644 output/EMEA_Prod/slo/TP_Mobile_VehicleList.tf delete mode 100644 output/EMEA_Prod/slo/TP_Vehicle_FTS.tf delete mode 100644 output/EMEA_Prod/slo/TP_Vehicle_RTTI.tf delete mode 100644 output/EMEA_Prod/slo/TP_Vehicle_eRoute.tf delete mode 100644 output/NA_Prod/slo/TP_Mobile_DigitalKey.tf delete mode 100644 output/NA_Prod/slo/TP_Mobile_Login.tf delete mode 100644 output/NA_Prod/slo/TP_Mobile_Mapping.tf delete mode 100644 output/NA_Prod/slo/TP_Mobile_PersonalFavorites.tf delete mode 100644 output/NA_Prod/slo/TP_Mobile_Remote360.tf delete mode 100644 output/NA_Prod/slo/TP_Mobile_RemoteServices.tf delete mode 100644 output/NA_Prod/slo/TP_Mobile_Send2VehicleLegacy.tf delete mode 100644 output/NA_Prod/slo/TP_Mobile_Send2VehicleMGU.tf delete mode 100644 output/NA_Prod/slo/TP_Mobile_VehicleData.tf delete mode 100644 output/NA_Prod/slo/TP_Mobile_VehicleList.tf delete mode 100644 output/NA_Prod/slo/TP_Vehicle_FTS.tf delete mode 100644 output/NA_Prod/slo/TP_Vehicle_RTTI.tf delete mode 100644 output/NA_Prod/slo/TP_Vehicle_eRoute.tf diff --git a/Jenkinsfile b/Jenkinsfile index 92ba194..67af428 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -69,6 +69,10 @@ git branch: "${params.CBRANCH}", credentialsId: "jaws_dynatrace_bitbuket_user", url: "https://atc.bmwgroup.net/bitbucket/scm/opapm/coco_apm_slo_yaml2tf.git" } } + sh ''' + cd /opt/workspace/coco_terraform_config/ + git checkout -b automatedSLOGeneration + ''' } } @@ -98,7 +102,7 @@ stage('Execute Script') { steps { dir("/opt/workspace/coco_apm_slo_yaml2tf/") { - sh "python3 generate.py ../shared_configuration/${params.INPUTFOLDER}" + sh "python3 generate.py /opt/workspace/shared_configuration/${params.INPUTFOLDER} /opt/workspace/coco_terraform_config/" } //Only required once CN is not reachable from EMEA //loopEnvironments(environments) @@ -106,6 +110,21 @@ } } + stage('Create Pull Request') { + steps { + script { + def now = new Date() + timestamp = now.format("yyMMdd.HHmm", TimeZone.getTimeZone('UTC')) + + dir("/opt/workspace/coco_terraform_config/") { + sh 'git add .' + sh ('git commit -m "${timestamp}"') + sh 'git push origin automatedSLOGeneration' + } + } + } + } + post { failure { emailext subject: "${env.JOB_NAME} build ${env.BUILD_ID} failed", diff --git a/generate.py b/generate.py index 06caee7..c776f59 100644 --- a/generate.py +++ b/generate.py @@ -33,7 +33,12 @@ def template_logic(metric): sys.exit(0) # main -def main(configFile): +def main(configFile,output_path): + if output_path: + op = output_path + else: + op = OUTPUT_FOLDER_BASENAME + slo_id = None slo_name = None module_name = None @@ -84,7 +89,7 @@ def main(configFile): # generate terraform file for environment,ev in environments.items(): - folder_path = os.path.join(cwd,OUTPUT_FOLDER_BASENAME,environment.replace('-','_'),"slo") + folder_path = os.path.join(cwd,op,environment.replace('-','_'),"slo") if not os.path.exists(folder_path): os.makedirs(folder_path) metric = nested_lookup('metric',ev) @@ -112,9 +117,9 @@ if __name__ == "__main__": cwd = os.getcwd() print(sys.argv) - if len(sys.argv) != 2: - print(".\generate.py ") - print("Example: .\generate.py .\DE-3\\") + if len(sys.argv) != 3: + print(".\generate.py ") + print("Example: .\generate.py .\DE-3\\ .\test\\") print("Example: .\generate.py .\DE-3\,.\DE-4\,...") sys.exit() @@ -131,8 +136,8 @@ if __name__ == "__main__": # return path of slo config files configFiles = glob.glob(pathname=pathname + '\\**\\*.yaml', # root_dir=os.path.join(cwd,os.path.basename(arg)), - recursive=True) + recursive=True) # for each slo config file in folder for configFile in configFiles: - main(configFile) + main(configFile,sys.argv[2]) diff --git a/output/CN_Prod/slo/TP_Mobile_DigitalKey.tf b/output/CN_Prod/slo/TP_Mobile_DigitalKey.tf deleted file mode 100644 index 5598d06..0000000 --- a/output/CN_Prod/slo/TP_Mobile_DigitalKey.tf +++ /dev/null @@ -1,51 +0,0 @@ -module TP_Mobile_DigitalKey { - - source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" - - name = "TP_Mobile_DigitalKey" - - description = "2.0 SLO Mobile" - - # entity selector object - filter = "" - - # metric expression of the calculation as done in data explorer ui - metric_expression = </password~", - ~"GET /api/v1/digitalkey//pairing~" - )"))))):splitBy()) - / - (builtin:service.keyRequest.count.server:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method), - fromRelationship.isServiceMethodOfService( - type(~"SERVICE~"),entityName.in( - ~"TrackApi - smc - PROD~", - ~"digital-key-composite-service - PROD~" - ) - ),entityName.in( - ~"trackKey~", - ~"manageKey~", - ~"GET /api/v1/digitalkey//password~", - ~"GET /api/v1/digitalkey//pairing~" - )"))))):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_Login.tf b/output/CN_Prod/slo/TP_Mobile_Login.tf deleted file mode 100644 index 3559643..0000000 --- a/output/CN_Prod/slo/TP_Mobile_Login.tf +++ /dev/null @@ -1,59 +0,0 @@ -module TP_Mobile_Login { - - source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" - - name = "TP_Mobile_Login" - - description = "2.0 SLO Mobile" - - # entity selector object - filter = "" - - # metric expression of the calculation as done in data explorer ui - metric_expression = </primary~", - ~"POST /api/v2/vehicles//primary/map~", - ~"POST /api/v1/vehicles//validate-security-code~", - ~"POST /api/v1/vehicles//resend-security-code~", - ~"DELETE /api/v1/vehicles/~" - )"))))):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-user-composite-service - PROD~", - ~"vehicle-mapping-composite-service - PROD~" - ) - ),entityName.in( - ~"GET /api/v2/presentation/users/validate~", - ~"POST /api/v2/vehicles//primary~", - ~"POST /api/v2/vehicles//primary/map~", - ~"POST /api/v1/vehicles//validate-security-code~", - ~"POST /api/v1/vehicles//resend-security-code~", - ~"DELETE /api/v1/vehicles/~" - )"))))):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_PersonalFavorites.tf b/output/CN_Prod/slo/TP_Mobile_PersonalFavorites.tf deleted file mode 100644 index 6fc088f..0000000 --- a/output/CN_Prod/slo/TP_Mobile_PersonalFavorites.tf +++ /dev/null @@ -1,47 +0,0 @@ -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_Remote360.tf b/output/CN_Prod/slo/TP_Mobile_Remote360.tf deleted file mode 100644 index 0d44337..0000000 --- a/output/CN_Prod/slo/TP_Mobile_Remote360.tf +++ /dev/null @@ -1,57 +0,0 @@ -module TP_Mobile_Remote360 { - - source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" - - name = "TP_Mobile_Remote360" - - description = "2.0 SLO Mobile" - - # entity selector object - filter = "" - - # metric expression of the calculation as done in data explorer ui - metric_expression = <~", - ~"POST /api/v1/download/[UUID]//confirm~", - ~"GET /api/v1/vehicle//egomodelurl~", - ~"GET /api/v1/vehicle//key~", - ~"GET /api/v1/recordings/vehicle/~" - )"))))):splitBy()) - / - (builtin:service.keyRequest.count.server:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method), - fromRelationship.isServiceMethodOfService( - type(~"SERVICE~"),entityName.in( - ~"remote-360-composite-service - PROD~" - ) - ),entityName.in( - ~"GET /api/v1/events/[UUID]~", - ~"POST /api/v1/events/[UUID]/cancel~", - ~"POST /api/v1/event/execute~", - ~"GET /api/v1/download/[UUID]/~", - ~"POST /api/v1/download/[UUID]//confirm~", - ~"GET /api/v1/vehicle//egomodelurl~", - ~"GET /api/v1/vehicle//key~", - ~"GET /api/v1/recordings/vehicle/~" - )"))))):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 deleted file mode 100644 index 2559def..0000000 --- a/output/CN_Prod/slo/TP_Mobile_RemoteServices.tf +++ /dev/null @@ -1,61 +0,0 @@ -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 deleted file mode 100644 index 5e95186..0000000 --- a/output/CN_Prod/slo/TP_Mobile_Send2VehicleLegacy.tf +++ /dev/null @@ -1,34 +0,0 @@ -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 = </password~", - ~"GET /api/v1/digitalkey//pairing~" - )"))))):splitBy()) - / - (builtin:service.keyRequest.count.server:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method), - fromRelationship.isServiceMethodOfService( - type(~"SERVICE~"),entityName.in( - ~"TrackApi - smc - PROD~", - ~"digital-key-composite-service - PROD~" - ) - ),entityName.in( - ~"trackKey~", - ~"manageKey~", - ~"GET /api/v1/digitalkey//password~", - ~"GET /api/v1/digitalkey//pairing~" - )"))))):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_Login.tf b/output/EMEA_Prod/slo/TP_Mobile_Login.tf deleted file mode 100644 index 3559643..0000000 --- a/output/EMEA_Prod/slo/TP_Mobile_Login.tf +++ /dev/null @@ -1,59 +0,0 @@ -module TP_Mobile_Login { - - source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" - - name = "TP_Mobile_Login" - - description = "2.0 SLO Mobile" - - # entity selector object - filter = "" - - # metric expression of the calculation as done in data explorer ui - metric_expression = </primary~", - ~"POST /api/v2/vehicles//primary/map~", - ~"POST /api/v1/vehicles//validate-security-code~", - ~"POST /api/v1/vehicles//resend-security-code~", - ~"DELETE /api/v1/vehicles/~" - )"))))):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-user-composite-service - PROD~", - ~"vehicle-mapping-composite-service - PROD~" - ) - ),entityName.in( - ~"GET /api/v2/presentation/users/validate~", - ~"POST /api/v2/vehicles//primary~", - ~"POST /api/v2/vehicles//primary/map~", - ~"POST /api/v1/vehicles//validate-security-code~", - ~"POST /api/v1/vehicles//resend-security-code~", - ~"DELETE /api/v1/vehicles/~" - )"))))):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_PersonalFavorites.tf b/output/EMEA_Prod/slo/TP_Mobile_PersonalFavorites.tf deleted file mode 100644 index 6fc088f..0000000 --- a/output/EMEA_Prod/slo/TP_Mobile_PersonalFavorites.tf +++ /dev/null @@ -1,47 +0,0 @@ -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/EMEA_Prod/slo/TP_Mobile_Remote360.tf b/output/EMEA_Prod/slo/TP_Mobile_Remote360.tf deleted file mode 100644 index 0d44337..0000000 --- a/output/EMEA_Prod/slo/TP_Mobile_Remote360.tf +++ /dev/null @@ -1,57 +0,0 @@ -module TP_Mobile_Remote360 { - - source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" - - name = "TP_Mobile_Remote360" - - description = "2.0 SLO Mobile" - - # entity selector object - filter = "" - - # metric expression of the calculation as done in data explorer ui - metric_expression = <~", - ~"POST /api/v1/download/[UUID]//confirm~", - ~"GET /api/v1/vehicle//egomodelurl~", - ~"GET /api/v1/vehicle//key~", - ~"GET /api/v1/recordings/vehicle/~" - )"))))):splitBy()) - / - (builtin:service.keyRequest.count.server:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method), - fromRelationship.isServiceMethodOfService( - type(~"SERVICE~"),entityName.in( - ~"remote-360-composite-service - PROD~" - ) - ),entityName.in( - ~"GET /api/v1/events/[UUID]~", - ~"POST /api/v1/events/[UUID]/cancel~", - ~"POST /api/v1/event/execute~", - ~"GET /api/v1/download/[UUID]/~", - ~"POST /api/v1/download/[UUID]//confirm~", - ~"GET /api/v1/vehicle//egomodelurl~", - ~"GET /api/v1/vehicle//key~", - ~"GET /api/v1/recordings/vehicle/~" - )"))))):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 deleted file mode 100644 index 2559def..0000000 --- a/output/EMEA_Prod/slo/TP_Mobile_RemoteServices.tf +++ /dev/null @@ -1,61 +0,0 @@ -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 deleted file mode 100644 index 5e95186..0000000 --- a/output/EMEA_Prod/slo/TP_Mobile_Send2VehicleLegacy.tf +++ /dev/null @@ -1,34 +0,0 @@ -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 = </password~", - ~"GET /api/v1/digitalkey//pairing~" - )"))))):splitBy()) - / - (builtin:service.keyRequest.count.server:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method), - fromRelationship.isServiceMethodOfService( - type(~"SERVICE~"),entityName.in( - ~"TrackApi - smc - PROD~", - ~"digital-key-composite-service - PROD~" - ) - ),entityName.in( - ~"trackKey~", - ~"manageKey~", - ~"GET /api/v1/digitalkey//password~", - ~"GET /api/v1/digitalkey//pairing~" - )"))))):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_Login.tf b/output/NA_Prod/slo/TP_Mobile_Login.tf deleted file mode 100644 index 3559643..0000000 --- a/output/NA_Prod/slo/TP_Mobile_Login.tf +++ /dev/null @@ -1,59 +0,0 @@ -module TP_Mobile_Login { - - source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" - - name = "TP_Mobile_Login" - - description = "2.0 SLO Mobile" - - # entity selector object - filter = "" - - # metric expression of the calculation as done in data explorer ui - metric_expression = </primary~", - ~"POST /api/v2/vehicles//primary/map~", - ~"POST /api/v1/vehicles//validate-security-code~", - ~"POST /api/v1/vehicles//resend-security-code~", - ~"DELETE /api/v1/vehicles/~" - )"))))):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-user-composite-service - PROD~", - ~"vehicle-mapping-composite-service - PROD~" - ) - ),entityName.in( - ~"GET /api/v2/presentation/users/validate~", - ~"POST /api/v2/vehicles//primary~", - ~"POST /api/v2/vehicles//primary/map~", - ~"POST /api/v1/vehicles//validate-security-code~", - ~"POST /api/v1/vehicles//resend-security-code~", - ~"DELETE /api/v1/vehicles/~" - )"))))):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_PersonalFavorites.tf b/output/NA_Prod/slo/TP_Mobile_PersonalFavorites.tf deleted file mode 100644 index 6fc088f..0000000 --- a/output/NA_Prod/slo/TP_Mobile_PersonalFavorites.tf +++ /dev/null @@ -1,47 +0,0 @@ -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/NA_Prod/slo/TP_Mobile_Remote360.tf b/output/NA_Prod/slo/TP_Mobile_Remote360.tf deleted file mode 100644 index 0d44337..0000000 --- a/output/NA_Prod/slo/TP_Mobile_Remote360.tf +++ /dev/null @@ -1,57 +0,0 @@ -module TP_Mobile_Remote360 { - - source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" - - name = "TP_Mobile_Remote360" - - description = "2.0 SLO Mobile" - - # entity selector object - filter = "" - - # metric expression of the calculation as done in data explorer ui - metric_expression = <~", - ~"POST /api/v1/download/[UUID]//confirm~", - ~"GET /api/v1/vehicle//egomodelurl~", - ~"GET /api/v1/vehicle//key~", - ~"GET /api/v1/recordings/vehicle/~" - )"))))):splitBy()) - / - (builtin:service.keyRequest.count.server:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method), - fromRelationship.isServiceMethodOfService( - type(~"SERVICE~"),entityName.in( - ~"remote-360-composite-service - PROD~" - ) - ),entityName.in( - ~"GET /api/v1/events/[UUID]~", - ~"POST /api/v1/events/[UUID]/cancel~", - ~"POST /api/v1/event/execute~", - ~"GET /api/v1/download/[UUID]/~", - ~"POST /api/v1/download/[UUID]//confirm~", - ~"GET /api/v1/vehicle//egomodelurl~", - ~"GET /api/v1/vehicle//key~", - ~"GET /api/v1/recordings/vehicle/~" - )"))))):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 deleted file mode 100644 index 2559def..0000000 --- a/output/NA_Prod/slo/TP_Mobile_RemoteServices.tf +++ /dev/null @@ -1,61 +0,0 @@ -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 deleted file mode 100644 index 5e95186..0000000 --- a/output/NA_Prod/slo/TP_Mobile_Send2VehicleLegacy.tf +++ /dev/null @@ -1,34 +0,0 @@ -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 = <