GithubHelp home page GithubHelp logo

nos1609 / dynatrace_exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apside-top/dynatrace_exporter

0.0 0.0 0.0 122 KB

Prometheus exporter for metrics stored by Dynatrace

License: Apache License 2.0

Shell 18.93% Python 80.30% Dockerfile 0.76%

dynatrace_exporter's Introduction

Dynatrace Metric Exporter

Prometheus exporter for Dynatrace's metrics and entity monitoring.

Scrapes /metrics and /entity endpoints of Dynatrace API v2 and exposes metrics to Prometheus.

This exporter allows you to easily retrieve all Dynatrace metrics and infrastructure heatlth state (healthy/unhealthy applications, hosts and services).

Exporter developped by Apside TOP and sponsored by Harmonie Mutuelle.

Apside TOP    Harmonie Mutuelle

Grafana visualisations example

Apdex score, active users and errors per application :

Grafana Table

Applications health state :

Applications health state

Note: This panel uses Hexmap plugin.

Command line

❯ python3 dynatrace_exporter.py -h
usage: dynatrace_exporter.py [-h] [--config.file CONFIG_FILE] [--web.listen-address LISTEN_ADDRESS] [--debug] [--test] [--output OUTPUT]

Dynatrace data exporter

optional arguments:
  -h, --help            show this help message and exit
  --config.file CONFIG_FILE
                        Path to config file (default: dynatrace_exporter.yml)
  --web.listen-address LISTEN_ADDRESS
                        Listen to this address and port (default: :9126)
  --debug               Enable debug (default: False)
  --test                Test metrics collection once, then stop exporter (default: False)
  --output OUTPUT       Output file when --test option is set (default: None)

Configuration

# General configurations
general:
  api:
    # API base URL. Should end with "/api/v2"
    url: "https://xxxxxxxxxx/api/v2"
    # Dynatrace API key
    apiKey: "Api-Token xxxxxxxxxx"
    # Additional custom headers for HTTP requests
    headers:
      # <header name>: <header value>
  
  # Number of parallel threads to use to fetch metrics. 1 or lower to disable multithreading
  threads: 12 
  # Max number of results to return in one request. Max allowed by dynatrace is 4000
  pageSize: 4000

# Collectors configuration
collectors:
  # Collecting heald of Dynatrace entities with type 'service'
  service:
    enabled: true
    # Service's type whitelist. Empty or undefined to allow all types of service
    # service_type:
    #   - "DATABASE_SERVICE"
      
  # Collecting heald of Dynatrace entities with type 'application'
  application:
    enabled: true

  # Collecting heald of Dynatrace entities with type 'host'
  host:
    enabled: true

  # Collecting Dynatrace metrics
  metrics:
    enabled: true
    # Maximal number of metrics fetched to batch fetch in each requet. Max allowed by dynatrace is 10
    batchSize: 10 
    # Allow deprecated metrics
    deprecated: false
    # Additionnal URL parameters. See full list here: https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v2/get-data-points 
    params:
      # Number of points to retrieve
      resolution: 12 
      # Time range of query
      from: now-6h 
    # Metrics regex whitelist. Empty or undefined to allow all metrics. 
    # Warning: enabling all (or at least a lot of) metrics might slow the exporter down to several seconds, or even minutes. 
    # Be careful to timeouts.
    whitelist:
      - builtin:apps.+ 
      # - builtin:tech.+ 
      # - builtin:service.+ 
      # - builtin:host.+ 
      # - builtin:cloud.+ 
      # - builtin:pgi.+ 
      # - builtin:containers.+ 
      # - builtin:kubernetes.+ 
      # - builtin:billing.+ 
      # - builtin:synthetic.+ 
      # - builtin:queue.+ 
      # - builtin:security.+ 
      # - builtin:span.+ 
      # - builtin:dashboards.+ 
      # - builtin:process.+ 
      # - builtin:osservice.+ 
      # - calc:.+ 
      # - dsfm:.+ 
      # - ext:.+ 
      # - func:.+ 

# Logging configurations
logging:
  # Minimal log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
  level: INFO 
  # Log format. To see all available attributes: https://docs.python.org/3/library/logging.html#logrecord-attributes 
  format: "%(asctime)s %(levelname)s [%(threadName)s] - (%(filename)s#%(lineno)d) - %(message)s"

Metrics

# HELP dynatrace_metric_<metric_name> <description>
# TYPE dynatrace_metric_<metric_name> <dynatrace_metric_name> gauge
dynatrace_metric_<metric_name>{<labels>}<value>
# HELP dynatrace_entity_service_health service_health
# TYPE dynatrace_entity_service_health gauge 
dynatrace_entity_service_health{<labels>}<value>
# HELP dynatrace_entity_host_health host_health
# TYPE dynatrace_entity_host_health gauge 
dynatrace_entity_host_health{<labels>}<value>
# HELP dynatrace_entity_application_health application_health
# TYPE dynatrace_entity_application_health gauge 
dynatrace_entity_application_health{<labels>}<value>

Sponsors

Harmonie Mutuelle (https://www.harmonie-mutuelle.fr/)

Logo Harmonie Mutuelle

Maintainers

License

Apache License 2.0, see LICENSE.

dynatrace_exporter's People

Contributors

robinmarechal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.