Giter Site home page Giter Site logo

mdb-measurements-api's Introduction

Demo for MongoDB OpsManager API for importing measurements

Example API calls to OpsManager in order to query measurements for all databases, disk partitions, and hosts of a cluster.

In order to query MongoDB Atlas API, slightly different calls are needed.

Please refer to the documentation for further information:

Usage

usage: import_metrics.py [-h] --opsmanager_baseurl OPSMANAGER_BASEURL
                         --opsmanager_username OPSMANAGER_USERNAME
                         --opsmanager_apikey OPSMANAGER_APIKEY
                         --opsmanager_groupid OPSMANAGER_GROUPID
                         --opsmanager_clusterid OPSMANAGER_CLUSTERID
                         --target_mongouri TARGET_MONGOURI
                         --target_mongodatabase TARGET_MONGODATABASE
                         --metrics_start METRICS_START --metrics_end
                         METRICS_END --metrics_granularity METRICS_GRANULARITY

Example call:

python import_metrics.py \
--opsmanager_baseurl="http://ec2-XXX-XXX-XXX-XXX.eu-central-1.compute.amazonaws.com:8080/api/public/v1.0" \
--opsmanager_username="OPSMANAGER_OR_ATLAS_USER" \
--opsmanager_apikey=API_KEY \
--opsmanager_groupid=5d2f2e6dcc6d0c132149b94c \
--opsmanager_clusterid=5d4bc93ccc6d0c1312045ad9 \
--target_mongouri="mongodb://USER:[email protected]:27017,democluster-shard-00-01-XXXXX.mongodb.net:27017,democluster-shard-00-02-XXXXX.mongodb.net:27017/test?ssl=true&replicaSet=DemoCluster-shard-0&authSource=admin&retryWrites=true&w=majority" \
--target_mongodatabase=metrics_test \
--metrics_start=2019-08-08T07:20:00Z \
--metrics_end=2019-08-08T07:40:00Z \
--metrics_granularity=PT10S

Created Collections

  • available_measurements_database: all available measures for a database (= output of API call)
  • available_measurements_disk: all available measures for a disk partition (= output of API call)
  • available_measurements_host: all available measures for a host (= output of API call)
  • clusters: detailled information about the cluster (as provided by the id calling the script) (= output of API call)
  • cluster_hosts: all hosts of the cluster (= output of API call)
  • cluster_host_databases: all databases on each host of the cluster (= output of API call)
  • cluster_host_disk_partitions: all disk partitions of each host (= output of API call)
  • cluster_summarized_info: the summarized information used for querying the measurements
  • metrics_hosts: the hardware metrics for each host of the provided timespan and granularity (= output of API call)
  • metrics_databases: the database statistics for each database on each host of the provided timespan and granularity (= output of API call)
  • metrics_disk_partitions: the disk usage measurements for each disk partition on each host of the provided timespan and granularity (= output of API call)

mdb-measurements-api's People

Contributors

ckurze avatar

Watchers

 avatar

Forkers

danielpuff123

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.