-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
51 lines (38 loc) · 1.62 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
const query_nerdgraph = require('./libquery/nerdquery');
const mutate_nerdgraph = require('./libmutate/nerdmutate')
const fs = require("fs");
// LIB depends on either the API key or the browser cookie.
// USE Enviornment Vars
// API_KEY
//process.env['API_KEY'] = <your api key here>
// OR
// NR_COOKIE (note must escape all quotes(") inside string), or wrap with single quotes
process.env['NR_COOKIE'] = ""; //<place nr admin cookie here
const runner = async () => {
try {
// await query_nerdgraph.workflows.getEnviroments(function (data) { // wont work with cookie,
// var k = 0;
// });
// await query_nerdgraph.workflows.getWorkflows("2475805", function (data) {
// var k = 0;
// });
// await query_nerdgraph.alerts.getPolicies("2475805", function (data) {
// var k = 0;
// });
// NOTE!!!, this makes many calls(paginated) may take some time to return.
// await query_nerdgraph.synthetics.getSyntheticMonitorList(function(data){
// var k = 0;
// await mutate_nerdgraph.dashboard.addDashboardToAccount
//});
// await query_synth.getSyntheticMonitor("MTMyMjQ4MHxTWU5USHxNT05JVE9SfDhmZjYwZjRiLTFmZGYtNDhiMi05NjE0LTQ3MDM3NzYxMWVhZg", function(data){
// var k = 0;
// })
// await query_nerdgraph.synthetics.getSyntheticMonitor("MTMyMjQ4MHxTWU5USHxNT05JVE9SfDhmZjYwZjRiLTFmZGYtNDhiMi05NjE0LTQ3MDM3NzYxMWVhZg", function (data) {
// var k = 0;
// })
} catch (err) {
var k = 0;
console.log(err.message)
}
}
runner();