Code Monkey home page Code Monkey logo

get-event-volume's Introduction

get-event-volume

This app uses New Relic's GraphQL API to generate a list of all event types found in your New Relic account. For each event type found, it then queries for the volume of data sent, showing the results in bytes.

It's the equivalent to doing this in NRQL:

show event types

Then for each event type:

FROM (eventType) SELECT bytecountestimate()

The output is formatted eventType, bytesCollected with one event type per line

We output to the console, so you'll need to redirect to a file if you want to view this info in an editor or spreadsheet.

The utility takes the following command line arguments:

-apikey : [REQUIRED] A user API key that is good for the account you want to pull data from.
-accountId : [REQUIRED] The ID of the account you want to pull data from.
-since : The number of hours prior to now that we query data for. The default is 1 hour.
-filter : The name of a file that contains event types to be excluded from this query. This is an optional switch.
-verbose : Increases the verbosity of the app's output for troubleshooting purposes. This is an optional switch.

The filter file should be a simple list of event types to exclude, one per line. The example file (nrStockEvents.txt) lists most of the stock NR event types as of the date of publication, so if you use it, you'll only see the data consumed by your custom event types.

As an example, this will pull the number of bytes consumed by every event type in an account since 1 hour ago:

./get-event-volume -apikey *yourAPIKey* -accountId *yourAccountID

This example will pull the number of bytes consumed by every event type in an account since 12 hours ago, except for the events specified in the filter file.

./get-event-volume -apikey *yourAPIKey* -accountId *yourAccountID -since 12 -filter skipEvents.txt

get-event-volume's People

Contributors

alecisaacson 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.