datadog_dashboards
Advanced tools
Comparing version 2.0.2 to 2.1.0
@@ -25,2 +25,16 @@ 'use strict'; | ||
}, | ||
inst_statsd_requests: { | ||
// Optional: prefix to the metric name | ||
// Default: 'request'. | ||
metric_prefix: 'my.custom.namespace.request', | ||
// Optional: You may wish to exclude some requests like health checks. | ||
excluded_tags: [ | ||
'controller:health_check/health_check', | ||
], | ||
}, | ||
delayed_jobs: { | ||
// Optional: prefix to the metric name | ||
// Default: 'delayedjob'. | ||
metric_prefix: 'my.custom.namespace.delayedjob' | ||
}, | ||
kinesis_streams: { | ||
@@ -27,0 +41,0 @@ stream1: { |
50
index.js
@@ -17,2 +17,4 @@ #!/usr/bin/env node | ||
CloudwatchS3GraphFactory = require("./factories/cloudwatch/s3"); | ||
InstStatsdRequestsGraphFactory = require("./factories/statsd/inst-statsd-requests"); | ||
DelayedJobsGraphFactory = require("./factories/statsd/delayed-jobs"); | ||
CustomGraphFactory = require("./factories/custom"); | ||
@@ -34,3 +36,3 @@ | ||
.usage("[options] <file ...>") | ||
.option("-d, --dashboards [value]", "The dasboards config file") | ||
.option("-d, --dashboards [value]", "The dashboards config file") | ||
.option("-p, --preview", "Preview the JSON, don't create the dashboard") | ||
@@ -222,2 +224,33 @@ .parse(process.argv); | ||
function generateInstStatsdRequestsGraphs(requests, project, environment, region, widgets = [], state) { | ||
if (!requests) return; | ||
const factoryRequests = new InstStatsdRequestsGraphFactory(requests, project, environment, region); | ||
widgets.push(titleWidget('Requests', state)); | ||
widgets.push(factoryRequests.totalTimeGraph(state)); | ||
widgets.push(factoryRequests.countGraph(state)); | ||
state.position += 30; | ||
widgets.push(...factoryRequests.toplists(state)); | ||
state.position += 16; | ||
} | ||
function generateDelayedJobsGraphs(delayed_jobs, project, environment, region, widgets = [], state) { | ||
if (!delayed_jobs) return; | ||
const factoryJobs = new DelayedJobsGraphFactory(delayed_jobs, project, environment, region); | ||
widgets.push(titleWidget('Jobs', state)); | ||
widgets.push(...factoryJobs.executedFailedCounts(state, 0)); | ||
widgets.push(...factoryJobs.executedFailedTimeseries(state, 21)); | ||
widgets.push(...factoryJobs.runtimeAndOldestJob(state, 66)); | ||
state.position += 48; | ||
} | ||
function generateLambdasGraphs(lambdas, region, widgets = [], state) { | ||
@@ -384,2 +417,17 @@ if (!lambdas) return; | ||
// Requests | ||
if (vars.inst_statsd_requests) { | ||
// Use the specific project for statsd or use the default one | ||
var projectStatsd = vars.inst_statsd_requests.project || vars.project | ||
generateInstStatsdRequestsGraphs(vars.inst_statsd_requests, projectStatsd, vars.environment, | ||
vars.region, dashboard.widgets, state); | ||
} | ||
// Jobs | ||
if (vars.delayed_jobs) { | ||
generateDelayedJobsGraphs(vars.delayed_jobs, vars.project, vars.environment, | ||
vars.region, dashboard.widgets, state); | ||
} | ||
// RDS | ||
@@ -386,0 +434,0 @@ if (vars.rds_id) { |
{ | ||
"name": "datadog_dashboards", | ||
"version": "2.0.2", | ||
"version": "2.1.0", | ||
"description": "A quick way to generate helpful, pre-canned datadog dashboards for Cloudwatch.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79643
63
1258