Dynatrace Rest API
Pack Assets​
Templates​
The Centreon Monitoring Connector Dynatrace Rest API brings a host template:
- App-Monitoring-Dynatrace-Restapi-custom
It brings the following service templates:
Service Alias | Service Template | Service Description | Default |
---|---|---|---|
Apdex | App-Monitoring-Dynatrace-Apdex-Restapi | Check entities's Application Performance Index | X |
Availability | App-Monitoring-Dynatrace-Availability-Restapi | Check Synthetic Monitors availability | X |
Events | App-Monitoring-Dynatrace-Events-Restapi | Check events | X |
Problems | App-Monitoring-Dynatrace-Problems-Restapi | Check open problems | X |
Collected metrics & status​
- Apdex
- Availability
- Events
- Problems
Metric Name | Unit |
---|---|
apdex#apdex |
Metric Name | Unit |
---|---|
synthetic~geolocation#synthetic.monitor.availability.percentage | % |
Metric Name | Unit |
---|---|
total.events.count | count |
management_zone#events.count | count |
status | string |
Metric Name | Unit |
---|---|
total.problems.open.count | count |
management_zone#problems.open.count | count |
status | string |
Prerequisites​
An access token needs to be created with the following permissions:
- API v1:
- DataExport
- ReadConfig
- API v2:
- metrics.read
- problems.read
- events.read
- syntheticLocations.read
More information on the offcial Dynatrace documentation: https://www.dynatrace.com/support/help/dynatrace-api/environment-api/tokens-v2/api-tokens
Setup​
- Online License
- Offline License
- Install the package on every Centreon poller expected to monitor Dynatrace resources:
yum install centreon-plugin-Applications-Monitoring-Dynatrace-Restapi
- On the Centreon web interface, on page Configuration > Monitoring Connector Manager, install the Dynatrace Rest API Centreon Monitoring Connector.
- Install the package on every Centreon poller expected to monitor Dynatrace resources:
yum install centreon-plugin-Applications-Monitoring-Dynatrace-Restapi
- Install the Dynatrace Rest API Centreon Monitoring Connector RPM on the Centreon central server:
yum install centreon-pack-applications-monitoring-dynatrace-restapi
- On the Centreon web interface, on page Configuration > Monitoring Connector Manager, install the Dynatrace Rest API Centreon Monitoring Connector.
Configuration​
Host​
- Log into Centreon and add a new host through Configuration > Hosts.
- Fill the Name, Alias & IP Address/DNS fields according to your Dynatrace server settings.
- Apply the App-Monitoring-Dynatrace-Restapi-custom template to the host.
- Once the template is applied, fill in the corresponding macros. Some macros are mandatory.
Mandatory | Macro | Description |
---|---|---|
DYNATRACEAPIENVIRONMENTID | Your Dynatrace environment ID | |
DYNATRACEAPIEXTRAOPTIONS | Any extra option you may want to add to every command_line (eg. a --verbose flag) | |
DYNATRACEAPIPASSWORD | Access token | |
DYNATRACEAPIPORT | (Default: '443') | |
DYNATRACEAPIPROTO | (Default: 'https') |
How to check in the CLI that the configuration is OK and what are the main options for?​
Once the plugin is installed, log into your Centreon poller's CLI using the
centreon-engine user account (su - centreon-engine
) and test the plugin by
running the following command:
/usr/lib/centreon/plugins//centreon_monitoring_dynatrace_restapi.pl \
--plugin=apps::monitoring::dynatrace::restapi::plugin \
--mode=apdex \
--hostname='10.0.0.1' \
--environment-id='' \
--api-password='' \
--port='443' \
--proto='https' \
--filter-entity='' \
--relative-time='2h'\
--aggregation-type='count' \
--warning-apdex='' \
--critical-apdex='' \
--verbose
The expected command output is shown below:
OK: All Apdex are OK | 'entity#apdex'=0.61;;;0;1 'entity#apdex'=0.88;;;0;1
All available options for a given mode can be displayed by adding the
--help
parameter to the command:
/usr/lib/centreon/plugins//centreon_monitoring_dynatrace_restapi.pl \
--plugin=apps::monitoring::dynatrace::restapi::plugin \
--mode=apdex \
--help
All available modes can be displayed by adding the --list-mode
parameter to
the command:
/usr/lib/centreon/plugins//centreon_monitoring_dynatrace_restapi.pl \
--plugin=apps::monitoring::dynatrace::restapi::plugin \
--list-mode
Troubleshooting​
Please find the troubleshooting documentation for the API-based plugins in this chapter.