Go to file
PATRYK GUDALEWICZ (ext.) d7b23f220c requirements.txt edited online with Bitbucket
switching back to default import
2023-07-17 08:09:59 +00:00
more_utils new script version 2022-05-13 13:22:52 +02:00
.gitignore kpi fix 2023-06-29 15:27:06 +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 should work now 2023-06-15 14:44:32 +02:00
dynatraceAPI.py new script version 2022-05-13 13:22:52 +02:00
environment.yaml added GCDM environment 2023-06-05 15:33:42 +02:00
kpi_extension.py added try exception 2023-07-03 10:52:04 +02:00
pagination.py new script version 2022-05-13 13:22:52 +02:00
readme.md csv per slice and updated readme 2023-06-05 13:12:13 +02:00
requirements.txt requirements.txt edited online with Bitbucket 2023-07-17 08:09:59 +00:00
summary.py added shebang 2023-06-15 14:50:38 +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 or csv 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
  • -o OUTPUT, --output x | c - generates the report as xlsx (with separate sheet per slice) and/or csv (reduced columns, one file per slice). 'x' is the default value

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',