Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

datadog_dashboards

Package Overview
Dependencies
Maintainers
4
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datadog_dashboards - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

7

dashboards.example.js

@@ -8,3 +8,8 @@ 'use strict';

region: 'put AWS region here',
rds_id: 'AWS rds id',
rds_ids: [
{
id: 'RDS instance id here',
name: 'Primary' //optional
},
],
alb: [

@@ -11,0 +16,0 @@ {

41

index.js

@@ -342,21 +342,31 @@ #!/usr/bin/env node

function generateRdsGraphs(rdsId, widgets = [], state) {
if (!rdsId) return;
function generateRdsGraphs(rdsIds, widgets = [], state) {
if (!rdsIds) return;
const rds = new CloudwatchRdsGraphFactory();
widgets.push(titleWidget(`RDS: ${rdsId}`, state));
rdsIds.forEach(function(rdsInstance) {
let rdsId;
let rdsName = null;
if (typeof rdsInstance === 'string' || rdsInstance instanceof String) {
rdsId = rdsInstance;
} else {
rdsId = rdsInstance.id;
rdsName = rdsInstance.name;
}
widgets.push(titleWidget(`RDS: ${rdsName ? `${rdsName} (${rdsId})` : rdsId}`, state));
widgets.push(rds.render('rds_cpu', rdsId, state));
widgets.push(rds.render('rds_memory', rdsId, state));
widgets.push(rds.render('rds_connections', rdsId, state));
widgets.push(rds.render('rds_cpu', rdsId, state));
widgets.push(rds.render('rds_memory', rdsId, state));
widgets.push(rds.render('rds_connections', rdsId, state));
state.position += 16;
state.position += 16;
widgets.push(rds.render('rds_throughput', rdsId, state));
widgets.push(rds.render('rds_storage', rdsId, state));
widgets.push(rds.render('rds_iops', rdsId, state));
widgets.push(rds.render('rds_burstBalance', rdsId, state));
widgets.push(rds.render('rds_throughput', rdsId, state));
widgets.push(rds.render('rds_storage', rdsId, state));
widgets.push(rds.render('rds_iops', rdsId, state));
widgets.push(rds.render('rds_burstBalance', rdsId, state));
state.position += 16;
state.position += 16;
})
}

@@ -434,6 +444,11 @@

// RDS
// Support multiple RDS instances in an backwards compatible fashion
if (vars.rds_id) {
generateRdsGraphs(vars.rds_id, dashboard.widgets, state);
generateRdsGraphs([vars.rds_id], dashboard.widgets, state);
}
if (vars.rds_ids) {
generateRdsGraphs(vars.rds_ids, dashboard.widgets, state);
}
// Caches

@@ -440,0 +455,0 @@ if (vars.caches) {

{
"name": "datadog_dashboards",
"version": "2.1.1",
"version": "2.2.0",
"description": "A quick way to generate helpful, pre-canned datadog dashboards for Cloudwatch.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc