GithubHelp home page GithubHelp logo

miguelacaro / pingdomexport Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eduardosoliv/pingdomexport

0.0 2.0 0.0 69 KB

Pingdom: Export your monitoring results to MySQL, PostgreSQL or CSV

License: MIT License

Python 100.00%

pingdomexport's Introduction

Pingdom Export: Export your pingdom data

Build Coverage

Installation

To install simply

$ pip install pingdomexport

Configuration

Check the configuration file.

Place the configuration file in any place that seems fit to you. Make sure the user you will use to run pingdom export has read access to the configuration file.

Configuration access

pingdom_access:
    username: dummy
    password: dummy
    account_email: dummy
    app_key: dummy

The username, password and account email should be easy to fill in (is your credentials to log in in pindgom).

To get your app key, log in on pingdom then go to Integrations > The Pingdom API > Register Application

Configuration checks

# the checks that you want to export data
checks:
    # 3 strategies supported
    # all: all checks
    # include: will only include the ids specified
    # exclude: all checks except the ids specified
    strategy: all
    ids: []

Pindgom export allows to export all checks:

checks:
    strategy: all
    ids: []

Specify the checks to export:

checks:
    strategy: include
    ids: [12454, 32932]

Specify the checks to exclude (will export every check except the ones specified):

checks:
    strategy: exclude
    ids: [12454]

Configuration export

Pingdom export allows to export the checks and results to mysql, postgres or the stdout.

load:
    # type: output|mysql|postgres
    type: output
    parameters: []
    # if mysql
    #parameters:
    #  db_url: mysql+pymysql://user:password@host/database
    # if postgres
    #parameters:
    #  db_url: postgres://user:password@host/database

If output:

load:
    type: output
    parameters: []

If mysql:

load:
    type: mysql
    parameters:
        db_url: mysql+pymysql://user:password@host/database

If posgres:

load:
    type: postgres
    parameters:
        db_url: mysql+pymysql://user:password@host/database

Database schema

If you are going to export for database then you need to create the schema upfront:

Database privileges

Both MySQL and Postgres requires a user with SELECT,INSERT,UPDATE,DELETE permissions to the DB. In case of Postgres the user also requires access to sequences.

Run

To list the options available:

$ pingdom-run-export --help

Export only checks information:

$ pingdom-run-export --config /full/path/to/config.yml --type checks

Export only checks results:

$ pingdom-run-export --config /full/path/to/config.yml --type results

Export checks information & results:

$ pingdom-run-export --config /full/path/to/config.yml --type all

Run - partial export

By default the pingdom export will always export the full results. There is optional arguments to allow to specify a time range, eg:

$ pingdom-run-export --config /full/path/to/config.yml --type results --checks-from 1465071758 --checks-to 1465158158

Big data

In case you have multiple checks with months of history, running everything in a single thread will probably take too much time.

You can use multiple configuration files and run one pingdom export per check. Then just have a crontab running daily and use the checks-from and checks-to.

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.