72 lines
2.8 KiB
Markdown
72 lines
2.8 KiB
Markdown
# 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', |