Skip to main content

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 AliasService TemplateService DescriptionDefault
ApdexApp-Monitoring-Dynatrace-Apdex-RestapiCheck entities's Application Performance IndexX
AvailabilityApp-Monitoring-Dynatrace-Availability-RestapiCheck Synthetic Monitors availabilityX
EventsApp-Monitoring-Dynatrace-Events-RestapiCheck eventsX
ProblemsApp-Monitoring-Dynatrace-Problems-RestapiCheck open problemsX

Collected metrics & status​

Metric NameUnit
apdex#apdex

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​

  1. Install the package on every Centreon poller expected to monitor Dynatrace resources:
yum install centreon-plugin-Applications-Monitoring-Dynatrace-Restapi
  1. 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.
MandatoryMacroDescription
DYNATRACEAPIENVIRONMENTIDYour Dynatrace environment ID
DYNATRACEAPIEXTRAOPTIONSAny extra option you may want to add to every command_line (eg. a --verbose flag)
DYNATRACEAPIPASSWORDAccess 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.