Go to file
Andreas Danzer (DE-701) 0c51f10a0f Jenkinsfile online editiert mit Bitbucket
only me
2023-06-01 05:31:47 +00:00
more_utils new script version 2022-05-13 13:22:52 +02:00
.gitignore implemented preselt day (last day) 2022-09-01 15:26:13 +02:00
Jenkinsfile Jenkinsfile online editiert mit Bitbucket 2023-06-01 05:31:47 +00: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 Change in Dynatrace - evaluate API param changed from boolean to string 2022-11-14 08:45:53 +01:00
dynatraceAPI.py new script version 2022-05-13 13:22:52 +02:00
environment.yaml all envs 2022-07-25 09:29:44 +02:00
pagination.py new script version 2022-05-13 13:22:52 +02:00
readme.md adding readme 2022-07-25 14:14:41 +02:00
requirements.txt adapting SLO 2022-07-26 12:56:58 +02:00
slo_parameter.yaml OPMAAS-3622 weekly report: removed Tmall Genie 2023-04-17 11:43:09 +00: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 week | month - gathers the data for the last full 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 (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',