Giter Site home page Giter Site logo

insight-tools's Introduction

insight-tools

Python scripts for automating manual tasks.

Installation

pip install -r requirements.txt

Commands

base64

python base64_decode.py
  • Prints the base64 contents of the clipboard

cloud-storage

python manage_buckets.py
  • PoC for Google Storage API
python parse_usage_data.py
  • WIP for accessing Google Storage API and parsing usage data

datadog

datadog_wrapper.py
  • Wrapper for Datadog API initialization
python get_metric.py <query>
  • Get Datadog metrics for <query> for the last minute Datadog API: GET https://app.datadoghq.com/api/v1/query
python get_metric.py <metric> <tags>
  • Send Datadog metrics for <metric> with <tags> Datadog API: POST https://app.datadoghq.com/api/v1/series
python test_in_2365.py <query>
  • Test IN-2365; get all metrics for a project in [query] for 2017-9-6

hubble

In order to use these scripts, you will need to create settings.py:

settings.py

LOCAL_COOKIE = '[email protected]:True'
STAGING_COOKIE = ''
INCOMING_GCP_ERRORS_PATH = '/api/v1/hubble/incoming_gcp_errors'
PROCESS_ERRORS_PATH = '/cron/create_tasks_to_process_errors'
INSIGHT_STAGING_BASE_URL = 'https://w-insight-staging.appspot.com'

STAGING_COOKIE can be found in the Chrome Developer Tools: โ‡ง+โŒ˜+c > Application > Cookies > SACSID

In addition, these scripts share the following flags:

-l | --local      send error to local instance (i.e. `localhost:8080`)
-s | --staging    send error to staging instance (i.e. `w-insight-staging.appspot.com`)
python simulate_gcp_error.py [-l | --local] [-s | --staging] <project>
  • Create a GCP error for <project>
python simulate_kinesis_error.py [-l | --local] [-s | --staging] <service>
  • Create a Kinesis error for <service>
python simulate_new_gcp_error.py [-l | --local] [-s | --staging] <project>
  • Create a 'New' error for <project>
python simulate_new_kinesis_error.py [-l | --local] [-s | --staging] <service>
  • Create a 'New' error for <service>

TODO

  • Allow all variables to be command line arguments
  • Use /process_errors endpoint instead of /cron/create_tasks_to_process_errors
  • Fix simulate_new_kinesis_error.py

insight-tools's People

Contributors

nickolaskraus-wf 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.