|
|
|
|
@ -1,96 +1,148 @@
|
|
|
|
|
# Dynatrace Lab - Monitoring as Code with Monaco v2
|
|
|
|
|
# Dashboarding Dynatrace Simply Smarter
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
Fundamentals for deployment & configuration : [fundamentals](https://github.com/dynatrace-ace-services/fundamentals/#readme) & [monaco example](https://github.com/dynatrace-ace-services/dynatrace-lab/tree/main/project)
|
|
|
|
|
ITSM integration & SLO Quality of Service : [itsm-integration-with-slo](https://github.com/dynatrace-ace-services/itsm-integration-with-slo#readme) & [monaco-template](https://github.com/dynatrace-ace-services/itsm-integration-with-slo/tree/main/monaco-template#readme)
|
|
|
|
|
✅ Dashboarding Dynatrace Simply Smarter : [slo-simply-smarter with monaco template](https://github.com/dynatrace-ace-services/slo-simply-smarter#readme)
|
|
|
|
|
|
|
|
|
|
In this lab you will import all the configurations with [monaco-V2](https://www.dynatrace.com/support/help/manage/configuration-as-code) :
|
|
|
|
|
We will use the lab VM as a tooling host and not as an application host.
|
|
|
|
|
Demo (internal only): [https://demo.live.dynatrace.com](https://demo.live.dynatrace.com/#dashboard;gtf=-2h;gf=all;id=bbbbbbbb-a003-a017-0000-000000000133)
|
|
|
|
|
|
|
|
|
|
application-web
|
|
|
|
|
app-detection-rule
|
|
|
|
|
management-zone
|
|
|
|
|
autotag
|
|
|
|
|
alerting-profile
|
|
|
|
|
notification
|
|
|
|
|
maintenance-window
|
|
|
|
|
host-naming
|
|
|
|
|
processgroup-naming
|
|
|
|
|
sevice-naming
|
|
|
|
|
dashboard
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# Installation with `Monaco v2` (recommanded)
|
|
|
|
|
|
|
|
|
|
## 1) Prerequisites installation
|
|
|
|
|
|
|
|
|
|
- `Host Group` and `Management Zone` best practices with [Deployment best practices](https://github.com/dynatrace-ace-services/quickstart-ace-configurator)
|
|
|
|
|
- `ITSM integration` best practices with [ITSM integration & SLO Quality of Service](https://github.com/dynatrace-ace-services/easy-itsm-integration/blob/main/Readme.md)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Step 0 : a tool host for monaco
|
|
|
|
|
## 2) Create an `APi-Token` with this scope :
|
|
|
|
|
|
|
|
|
|
Monaco can be installed anywhere, on your desktop : linux, windows, or on a tooling k8s, but never on an application host !
|
|
|
|
|
(except during this training)
|
|
|
|
|
|
|
|
|
|
## Step 1 : clone this git
|
|
|
|
|
|
|
|
|
|
cd
|
|
|
|
|
git clone https://github.com/dynatrace-ace-services/dynatrace-lab
|
|
|
|
|
echo "end of step 1 - the lab is copy here home/dynatrace-lab"
|
|
|
|
|
- Read configuration
|
|
|
|
|
- Write configuration
|
|
|
|
|
- Read SLO
|
|
|
|
|
- Write SLO
|
|
|
|
|
- Access problem and event feed, metrics, and topology
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Step 2 : install monaco V2
|
|
|
|
|
## 3) Deploy with Monaco :
|
|
|
|
|
|
|
|
|
|
cd;cd dynatrace-lab/
|
|
|
|
|
Documentation v2 [here](https://www.dynatrace.com/support/help/manage/configuration-as-code)
|
|
|
|
|
Example for linux
|
|
|
|
|
|
|
|
|
|
`installation`
|
|
|
|
|
|
|
|
|
|
git clone https://github.com/dynatrace-ace-services/slo-simply-smarter
|
|
|
|
|
cd slo-simply-smarter
|
|
|
|
|
curl -L https://github.com/Dynatrace/dynatrace-configuration-as-code/releases/latest/download/monaco-linux-amd64 -o monaco
|
|
|
|
|
chmod +x monaco
|
|
|
|
|
echo "end of step 2 - monaco v2 is installed on your tool host"
|
|
|
|
|
|
|
|
|
|
## Step 3 : set the variables
|
|
|
|
|
`variables`
|
|
|
|
|
|
|
|
|
|
use this script to configure the variables on linux environment
|
|
|
|
|
export DT_TENANT_URL=https://abcd123.live.dynatrace.com for saas or export MyTenant=https://domaine.com/e/abcd12234 for managed
|
|
|
|
|
export DT_API_TOKEN=dt0c01.1234ABCD.XXXX
|
|
|
|
|
|
|
|
|
|
sh set_the_variables.sh
|
|
|
|
|
`deploy`
|
|
|
|
|
|
|
|
|
|
open the file `lab_env.sh` to validate the variables manually
|
|
|
|
|
|
|
|
|
|
cat lab_env.sh
|
|
|
|
|
|
|
|
|
|
set the variables on the local session
|
|
|
|
|
|
|
|
|
|
. lab_env.sh
|
|
|
|
|
echo "end of step 3 - the variables have been setted on the local session"
|
|
|
|
|
|
|
|
|
|
## Step 4 : deploy with monaco
|
|
|
|
|
|
|
|
|
|
cd;cd dynatrace-lab
|
|
|
|
|
./monaco deploy manifest.yaml
|
|
|
|
|
echo "end of step 4 - the configuration has been deployed on the tenant"
|
|
|
|
|
|
|
|
|
|
## Step 5 (optional) : backup with monaco
|
|
|
|
|
`result`
|
|
|
|
|
|
|
|
|
|
cd;cd dynatrace-lab
|
|
|
|
|
./monaco download manifest.yaml -e MyEnv
|
|
|
|
|
echo "end of step 5 - the full configuration has been backuped"
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
## Step 6 (optional) : redeploy specific management-zone configuration from backup json
|
|
|
|
|
---
|
|
|
|
|
---
|
|
|
|
|
Other installations
|
|
|
|
|
|
|
|
|
|
download mz configuration
|
|
|
|
|
# Installation with `Python`
|
|
|
|
|
|
|
|
|
|
cd;cd dynatrace-lab
|
|
|
|
|
./monaco download manifest.yaml -e MyEnv -a management-zone -o backup-mz
|
|
|
|
|
## 1) Create an `APi-Token` with this scope :
|
|
|
|
|
|
|
|
|
|
modifiy config.yaml for mz
|
|
|
|
|
- Read configuration
|
|
|
|
|
- Write configuration
|
|
|
|
|
- Read SLO
|
|
|
|
|
- Write SLO
|
|
|
|
|
|
|
|
|
|
cd backup-mz/project_MyEnv/management-zone
|
|
|
|
|
nano config.yaml
|
|
|
|
|
## 2) Automatic installation and update with `python script`
|
|
|
|
|
Prerequisite : python with requests installed
|
|
|
|
|
|
|
|
|
|
keep only your id in this file (delete the ohers) and chnage the name like here :
|
|
|
|
|
python 3.6+
|
|
|
|
|
pip install requests
|
|
|
|
|
|
|
|
|
|
delete the id section dfferent to your managament-zone
|
|
|
|
|
rename your management-zone
|
|
|
|
|
+ internet acces [dahsboard template](https://github.com/JLLormeau/dynatrace_template_fr) & [slo template](https://github.com/dynatrace-ace-services/slo-simply-smarter/tree/main/SLOSimplySmarter/slo)
|
|
|
|
|
+ git clone on local host (linux or windows)
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
Download the script
|
|
|
|
|
|
|
|
|
|
git clone https://github.com/dynatrace-ace-services/slo-simply-smarter
|
|
|
|
|
cd slo-simply-smarter
|
|
|
|
|
|
|
|
|
|
`Linux`
|
|
|
|
|
Export variables
|
|
|
|
|
|
|
|
|
|
export MyTenant=abcd123.live.dynatrace.com for saas or export MyTenant=domaine.com/e/abcd12234 for managed (without https://...)
|
|
|
|
|
export MyToken=dt0c01.1234ABCD.XXXX
|
|
|
|
|
|
|
|
|
|
Run the script
|
|
|
|
|
|
|
|
|
|
python3 project_python/script/Deploy_and_Update_SLO_Simply_Smarter.py
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
The `SLO simply smarter` is installed
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
If you use windows,
|
|
|
|
|
|
|
|
|
|
`windows cmd`
|
|
|
|
|
Export variables
|
|
|
|
|
|
|
|
|
|
set MyTenant=abcd123.live.dynatrace.com for saas or export MyTenant=domaine.com/e/abcd12234 for managed (without https://...)
|
|
|
|
|
set MyToken=dt0c01.1234ABCD.XXXX
|
|
|
|
|
|
|
|
|
|
Run the script
|
|
|
|
|
|
|
|
|
|
python project_python\script\Deploy_and_Update_SLO_Simply_Smarter.py
|
|
|
|
|
|
|
|
|
|
`windows powershell`
|
|
|
|
|
Export variables
|
|
|
|
|
|
|
|
|
|
$env:MyTenant="abcd123.live.dynatrace.com" for saas or export MyTenant=domaine.com/e/abcd12234 for managed (without https://...)
|
|
|
|
|
$env:MyToken="dt0c01.1234ABCD.XXXX"
|
|
|
|
|
|
|
|
|
|
Run the script
|
|
|
|
|
|
|
|
|
|
python project_python\script\Deploy_and_Update_SLO_Simply_Smarter.py
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# From Mission Control
|
|
|
|
|
Doesn't work from `Azure Bash`. Works fine from VM host : linux or windows.
|
|
|
|
|
|
|
|
|
|
Open the python script and add these two temporary variables `Cookie` & `X-CSRFToken` and run the script (in this case MyTenant=[clusterid]-managed.internal.dynatrace.com:8021/e/[tenantid]) :
|
|
|
|
|
|
|
|
|
|
Cookie='xxx'
|
|
|
|
|
CSRFToken='xxx'
|
|
|
|
|
|
|
|
|
|
From the Mission Control, Dev Tools, collect the temporary X-CSRFToken and the full Cookie like that
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
and run the `python script` as described above.
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# Installation for `OffLine` environment
|
|
|
|
|
|
|
|
|
|
1) offline insatallation
|
|
|
|
|
with `python script` and witout Internet access : click [here](https://github.com/JLLormeau/slo_simply_smarter_offline)
|
|
|
|
|
|
|
|
|
|
2) manual installation
|
|
|
|
|
only if you can't install `SLO Simply Smarter` with python script or with Bizops, follow the process [here](https://github.com/JLLormeau/slo_simply_smarter_offline/blob/main/Import_Dynatrace_Simply_Smarter_for_OffLine_environment.pdf)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redeploy
|
|
|
|
|
|
|
|
|
|
cd;cd dynatrace-lab/backup-mz
|
|
|
|
|
../monaco deploy manifest.yaml
|
|
|
|
|
|
|
|
|
|
On Dynatrace UI, verify that you have a new management zone : `My_easytravelXX`, similair to the previous one `easytravelxx`
|
|
|
|
|
|
|
|
|
|
echo "Go to the mz settings on the UI : "$DT_TENANT_URL"/ui/settings/builtin:management-zones"
|
|
|
|
|
echo "end of step 6 - a new mz has been deployed on Dynatrace "
|
|
|
|
|
|
|
|
|
|
|