Giter Site home page Giter Site logo

pandeyshishir / k8s-dynatrace-metrics-adapter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dtcookie/k8s-dynatrace-metrics-adapter

0.0 0.0 0.0 70 KB

Branch for making changes that I desire in the adapter.

Go 97.04% Makefile 2.51% Dockerfile 0.45%

k8s-dynatrace-metrics-adapter's Introduction

Dynatrace Kubernetes Adapter for External Metrics

This project implements a Metric API Server offering additional External Metrics for Kubernetes deployments monitored with Dynatrace.

Installation

A prebuilt version of this project already is available on Docker Hub.

  • Edit deploy.yaml and navigate to line 62. Enter the URL of your Dynatrace Environment here.
  • Line 59 in deploy.yaml refers to a secret called dynametric. It holds the API TOKEN that grants access to the metrics offered by the Metric API Server. The minimum scope of the API Token should be DataExport (Access problem and event feed, metrics, and topology) Unless you want to choose a different name, this is how to create that secret.
    kubectl -n dynatrace-metrics create secret generic dynametric --from-literal="apiToken=####"
    
  • Finally execute kubectl apply -f deploy.yaml. This will automatically create a namespace dynatrace-metrics with the required pods.

Configuration

This is an example for a Horizontal Pod Scaler scaling frontend-http-server based on the metric com.dynatrace.builtin:service.responsetime, expecting the average response time of the monitored service to not increase 1.5 seconds.

apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: frontend-http-server
  namespace: dt-metrics-sample
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: frontend-http-server    
  minReplicas: 1
  maxReplicas: 20
  metrics:
  - type: External
    external:
      metric:
        name: com.dynatrace.builtin:service.responsetime
        selector:
          matchLabels:
            hpa: frontend-http-server
      target:
        type: AverageValue
        value: 1500000000m

Any metrics available via the Dynatrace REST API (/api/v1/timeseries) are eligible. Additional documentatation about this example can be found here.

k8s-dynatrace-metrics-adapter's People

Contributors

dynatrace-reinhard-pilz avatar krasy74 avatar jakub-surma 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.