Coder Social home page Coder Social logo

dynatraceapi's Introduction

DynatraceAPI

Introduction

This repository contains sample Python scripts that can be used to modify/create configuration on Dynatrace. They can be used in conjuction to one another. In the backend scripts use Dynatrace Configuration and Environemnt APIs. Dynatrace API Token are always passed as command line argument (sys.argv[1]) while running the code so that it is not kept in the code.

There is Ansible Code (playbook.yml) as well which can be used to deploy one agent on the servers. This uses the Dynatrace OneAgent role from Dynatrace that is available on Ansible Galaxy.

Scripts

There are multiple scripts at this moment
createMaintenance.py -> Creates Maintenance windows in dynatrace. This can be helpful in multiple situations like Scheduled Hardware Maintenance and Quarterly Patching to supress the alerts.
craeteSynthetic.py -> Creates Synthetic Monitors on Dynatrace to monitor your application URLs. Specially useful to check the reachability of endpoints.
disableMonitoring.py -> This can be used to disable the host from being monitored in Dynatrace. Particularly useful when you do not want to provide admin rights to people to do the same. This can act as an abstraction layer.
getHostId.py -> Provide the host ID as an input to other scripts based on the Display names in Dynatrace. End users should be able to use scripts based on host names witout knowing the host IDs.
playbook.yml -> Deploy and configure Dynatrace One agent on the servers using Ansible and Dynatrace OneAgent Ansible Role from Ansible Galaxy. inventory -> Inventory of servers in which the oneagent has to be installed.

Requirements

  1. Python3 (yum install python3)
  2. PIP3 (yum install python3-pip)
  3. Requests Module from Python (pip3 install requests)
  4. Ansible > 2.7 (pip3 install ansible/yum install ansible)
  5. Ansible OneAgent Role (ansible-galaxy install dynatrace.oneagent)

dynatraceapi's People

Contributors

sams3pi avatar

Watchers

 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.