Giter VIP home page Giter VIP logo

pingdom-to-cachet's Introduction

Pingdom to Cachet CRON

A very simple cron script to send Pingdom data to Cachet.

Prerequesites

  • Git
  • Composer
  • PHP 7.0 or newer

Usage

Clone the repository to your server

git clone https://github.com/stayallive/pingdom-to-cachet
cd pingdom-to-cachet

Install composer dependencies

composer install --no-dev -o

Copy the example .env file to the real one

cp .env.example .env

Edit .env with your favorite editor (ex. nano .env) and update the values:

  • PINGDOM_USERNAME: Your Pingdom username
  • PINGDOM_PASSWORD: Your Pingdom password
  • PINGDOM_API_KEY: Your Pingdom API key / token
  • CACHET_HOST: The location of your Cachet installation (ex. https://status.example.com)
  • CACHET_API_KEY: The API key of your Cachet user
  • COMPONENTS_MAP: The mapping between you Cachet component ID and your Pingdom check ID (ex. 1:12345,2:54321)
  • METRICS_MAP: The mapping between you Cachet metric ID and your Pingdom check ID (ex. 1:12345,2:54321)

The maps need to be defined in the following format: <CACHET_ID>:<PINGDOM_ID>. If you want more than 1 mapping you can seperate them with a , (without spaces)

If everything is setup you can manually check if everything is running smoothly by executing

php src/cron.php

You should see output about the data that is retrieved from Pingdom and sent to Cachet.

You can add a CRON entry to run the cron overy minute (or other interval) to update the components and metrics.

# m   h  dom mon dow   command
# Run the Pingdom to Cachet CRON every minute
  *   *  *   *   *     php /path/to/pingdom-to-cachet/src/cron.php > /dev/null 2>&1
# Run the Pingdom to Cachet CRON every 5 minutes
# */5 *  *   *   *     php /path/to/pingdom-to-cachet/src/cron.php > /dev/null 2>&1

Upgrading

Simply run git pull where you pulled the repository to, easy as cake.

Security Vulnerabilities

If you discover a security vulnerability, please send an e-mail to Alex Bouma at [email protected]. All security vulnerabilities will be swiftly addressed.

License

The Pingdom to Cachet CRON is open-sourced software licensed under the MIT license.

pingdom-to-cachet's People

Contributors

edwelker avatar shonm avatar stayallive avatar tschoffelen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

chesscom edwelker

pingdom-to-cachet's Issues

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.