Go to file
QXZ3NHY dc52a6e1e9 dynatrace 1M 2023-06-15 08:24:35 +02:00
more_utils new script version 2022-05-13 13:22:52 +02:00
.gitignore calc timeframe shift 2023-06-14 09:01:34 +02:00
__init__.py new script version 2022-05-13 13:22:52 +02:00
config.ini init commit 2021-12-02 13:16:04 +01:00
createReport.py updated createReport.py from main 2023-06-06 10:41:47 +02:00
dynatraceAPI.py new script version 2022-05-13 13:22:52 +02:00
environment.yaml added new environment vars 2023-06-06 15:12:36 +02:00
kpi_extension.py dynatrace 1M 2023-06-15 08:24:35 +02:00
pagination.py new script version 2022-05-13 13:22:52 +02:00
readme.md modified 2023-04-24 13:55:18 +02:00
requirements.txt file writer 2023-06-05 15:22:52 +02:00
summary.py added summary.py 2023-04-25 12:33:47 +02:00

readme.md

Global Dashboard as Code

This repository holds the code to generate the Dynatrace QM Report.

Files

slo_parameter.yaml

This file specifies which SLO should be reported Example definition:

TP_Mobile_Login:
	index: 1
	selector_type: "text"
	selector_var: 'CoCo-QM-Report_Mobile'
	yearstart: "2022-01-01"
	displayname: "Login"
	department: "DE-442"
	metric: "func:slo.tp_mobile_login"
	doc_url: "https://atc.bmwgroup.net/confluence/x/R1OqdQ"
	ops_dashboard:
		emea: "https"
		na: ""
		cn: ""
	hubs:
		euprod:
			tiles: ["actual","graph","ytd"]
		naprod:
			tiles: ["actual","graph","ytd"]
		cnprod:
			tiles: ["actual","graph","ytd"]
thresholds:
	single_value: "99_#577025|98_#f5d30f|0_#ff0000"
	graph_value: "99_#353535|98_#f5d30f|0_#ff0000"

Defintion Description: Many definitions are for creating the dashboard, the description only reflects the parameters for the QM-Report

SLO_Name:
		selector_type: str	 		#Query Parameter for Dynatrace
		selector_var: str 			#Query String for Dynatrace
		yearstart: date				#Date in "2022-01-01" format, to specify year-to-date start date
		hubs:						#defines on which hub this SLO is active
			euprod:
				tiles: array		
			naprod:
				tiles: 
			cnprod:
				tiles: 

createReport . py

This script creates the repot as an .xlsx file with the following parameter

  • -h, --help show this help message and exit
  • -f FROMDATE, --fromDate FROMDATE YYYY-mm-dd e.g. 2022-01-01
  • -t TODATE, --toDate TODATE YYYY-mm-dd e.g. 2022-01-31
  • -p PRESELECT, --preSelect PRESELECT day | week | month - gathers the data for the last full day, week or month
  • -s SLICES, --slices SLICES h | d | t | y - writes the slices hourly, daily, total or year to date into ecxel. given in any order

Either -p with a given range (day, week or month) or the parameters -f AND -t are set

The script reads the slo_parameters.yaml and crawls through all Dynatrace environments to gather the evaluated percentage and creates an excel report with one sheet for each "slice" (e.g. hourly sheet for hourly SLO evaluation, daily sheet for daily SLO evaluation etc.)

jenkinsfile

The jenkinsfile enables this script to run within a Jenkinspipeline. It takes the same parameters as the python script and is currently implemented at https://jaws.bmwgroup.net/opapm/job/CoCo%20QM%20Report%202.0/

Triggers The jenkinsfile as a timely trigger to run automatically every monday at 06:00 a.m

Send Report Once the report is created, Jenkins sent the report as an attachement to the following recipients: to: 'rene.forstner@nttdata.com, ermis.wieger@nttdata.com, arnel.arnautovic@nttdata.com, patryk.gudalewicz.bp@nttdata.com, stephan.oertelt@bmw.de, Mohammed.Abadel@bmw.de, michaela.jaeger@bmw.de, OOC-Support@bmwgroup.com, Sonja.Yildizoglu@bmw.de, Andreas.DA.Danzer@partner.bmw.de',