Skip to content

Command-line tool for migrating third-party Active Gate extension endpoints (dns, ping, port) to NAM Synthetic monitors

Notifications You must be signed in to change notification settings

dynatrace-extensions/dt-extensions-nam-migrator

Repository files navigation

Extension to NAM migrator

Converts dns ping and port Active Gate extension endpoints to NAM synthetic monitors. Each endpoint is converted to a single NAM monitor.

Requirements

  • 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

Usage

  1. Prepare environmental variables

    • DT_URL - URL of the tenant - https://saas_tenant_id.live.dynatrace.com for SaaS or https://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.
  2. 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.
  3. 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.

Optional parameters

--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.

Default configuration

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.

About

Command-line tool for migrating third-party Active Gate extension endpoints (dns, ping, port) to NAM Synthetic monitors

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages