WMI data source tutorial
This is a step-by-step tutorial for building a WMI data source-based extension. You will build a WMI extension that runs on OneAgent and monitors a Windows host.
Generate a developer certificate and key
Distribute the root certificate to Dynatrace components
Before you begin
To successfully develop an Extensions 2.0 extension and be able to complete this tutorial, you need to fulfill the following prerequisites:
- Admin access to a Dynatrace SaaS or Managed environment version 1.227+
- Windows host (virtual machine)
- OneAgent version 1.227+ deployed on the host
- Dynatrace CLI
- Python 3.8 or 3.9
- Access to pip package installer for Python
- Install dt-cli
For more information, see Sign extensions.pip install dt-cli
- Your root certificate uploaded to Dynatrace and on the OneAgent host
Generate a developer certificate and key
dt extension genca
dt extension generate-developer-pem -o developer.pem --ca-crt ca.pem --ca-key ca.key --name 'JDoe'
The command generates the following files:
developer.pem
- your developer certificateca.pem
- your root certificateca.key
- your root key
Distribute the root certificate to Dynatrace components
Upload to the Dynatrace Credential Vault
- From the navigation menu, select Manage > Credential vault.
- Select Add new credential.
- For Credential type, select Public Certificate.
- Add a meaningful Credential name.
- Upload the Root certificate file.
- Select Save.
Upload to OneAgent host that runs the extension
- Go to
- Windows:
C:\ProgramData\dynatrace\oneagent\agent\config
- Linux:
/var/lib/dynatrace/oneagent/agent/config/
- Windows:
- Go to the
certificates
folder (create it if it doesn't exist) - Upload your root certificate (
ca.pem
) generated earlier
Your Dynatrace environment is ready to start creating your WMI extension.
Next step: Extension package