This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Configure as synthetic SCRIPTED_API monitor | |
var got = require('got'); | |
//** REQUIRED INPUTS **// | |
var API_KEY = $secure.KEY_USAGE; // GraphQL User Key | |
var INGEST_KEY = $secure.INGEST_KEY; //Ingest key | |
var ACCOUNT_ID = 1 //account to insert events into | |
//** REQUIRED INPUTS **// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Baseline Alert Optimization", | |
"description": null, | |
"permissions": "PUBLIC_READ_WRITE", | |
"pages": [ | |
{ | |
"name": "Baseline Alert Optimization", | |
"description": null, | |
"widgets": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> */ | |
/* Imports */ | |
/* <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> */ | |
const assert = require('assert'), | |
{ promisify } = require('util'), | |
{ Parser, processors } = require('xml2js'), | |
got = require('got'), | |
{ Cookie, CookieJar } = require('tough-cookie') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var got = require('got'); | |
/* -------------------CONFIGURATION-------------------------------------- */ | |
var API_KEY = '<user_key>'; //add as a secure cred - Used to fetch data via GraphQL - preferably a master account key | |
var INGEST_KEY = '<ingest_key>'; //add as a secure cred - Used to insert data into NRDB | |
var ACCOUNT_ID = 1 //account to post events to | |
var EVENT_TYPE = 'UserEntity'; //eventType (table) that data is stored in | |
/* -------------------CONFIGURATION-------------------------------------- */ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var got = require('got'); | |
/* -------------------CONFIGURATION-------------------------------------- */ | |
var API_KEY = '<user_key>'; //add as a secure cred - Used to fetch data via GraphQL - preferably a master account key | |
var INGEST_KEY = '<ingest_key>'; //add as a secure cred - Used to insert data into NRDB | |
var ACCOUNT_ID = 1 //account to post events to | |
var EVENT_TYPE = 'NrUsers'; //eventType (table) that data is stored in | |
/* -------------------CONFIGURATION-------------------------------------- */ | |
var GRAPH_API = 'https://api.newrelic.com/graphql'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require('node-fetch'); | |
const createCsvWriter = require('csv-writer').createObjectCsvWriter; | |
//Script that looks across many accounts and determines if APM Logs are currently being sent. Generates CSV report. | |
//npm i node-fetch csv-writer | |
//configure below | |
//run --> node apm-logs.js | |
var GRAPH_API = 'https://api.newrelic.com/graphql'; | |
var PATH = '/path/to/apm_entities_sending_logs.csv' //path/file to write to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var got = require('got'); | |
/* -------------------CONFIGURATION-------------------------------------- */ | |
var API_KEY = '<api_key>'; //add as secure cred - Used to fetch data via GraphQL -- master account preferably | |
var INGEST_KEY = '<ingest_key>'; // add as a secure cred - Used to insert data into NRDB as metrics | |
var FACET = '<facet>'; //Attribute to facet ingest by | |
var excludedEventTypes = [ //eventTypes to ignore | |
"AuditLog", | |
"ActivityEvent", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
--------- SCRIPT SUMMARY --------- | |
Author(s) : Keagan Peet | |
Date : 8/24/17 | |
Version : 1.0.0 | |
Notes : Akami response headers to Insights for a single page. | |
*/ | |
var assert = require('assert'); | |
var request = require('request'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##!usr/bin/env python | |
######################################################################################## | |
# Author: Keagan Peet | |
# Purpose: To programatically create a scripted monitor within New Relic Synthetics. | |
# Note: Current Base64 encoding below only works with Python 2.7 | |
######################################################################################## | |
import json |