Converts dns
ping
and port
Active Gate extension endpoints to NAM synthetic monitors.
Each endpoint is converted to a single NAM monitor.
- Python 3.8+
- Python modules defined in
requirements.txt
. Installed with the command:pip install -r requirements.txt
- Dynatrace API token with the following scopes:
- ReadConfig (Read configuration)
- settings.write
-
Prepare environmental variables
DT_URL
- URL of the tenant -https://saas_tenant_id.live.dynatrace.com
for SaaS orhttps://managed_web_ui_url/e/managed_environment_uuid
for Managed. Note that it is the API URL.DT_TOKEN
- token with the scopes listed above -dt0c1.XYZ.ABC
.- alternatively provide the parameters
--dt-url
and--dt-token
.
-
Run the script to convert extension endpoints.
- Provide synthetic location ids and a work directory to store the configuration.
-
python extension_migrator.py get SYNTHETIC_LOCATION-0000000000000001 SYNTHETIC_LOCATION-0000000000000002 ./nam_monitors
- Monitor definitions will be created in the directory specified as the last parameter, one file per monitor.
-
Run the script to upload converted monitors.
- Provide the work directory with configuration generated by the previous command.
-
python extension_migrator.py post ./nam_monitors
- The uploaded monitor ids are stored in the file
nam_monitor_ids.json
located in the work directory.
--enabled
- upload monitors as enabled. Default = False.
--extension-type
- convert only extensions of a given type: dns
, ping
or port
.
--frequency-min
- time between each monitor execution. If set, it will override the extension endpoint configuration.
If unset, it will use the endpoint configuration. If the endpoint configuration is empty, it will use the default = 1min.
The file converter_config.py
contains defaults used in the monitor conversion.
Values set under the comment # default configuration
can be modified according to the NAM monitors documentation.