Socket
Socket
Sign inDemoInstall

datadog_dashboards

Package Overview
Dependencies
Maintainers
37
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.5.0 to 2.5.1

factories/cloudwatch/api_gateway.js

34

index.js

@@ -9,2 +9,3 @@ #!/usr/bin/env node

CloudwatchAlbGraphFactory = require("./factories/cloudwatch/alb");
CloudwatchApiGatewayGraphFactory = require("./factories/cloudwatch/api_gateway");
CloudwatchAsgGraphFactory = require("./factories/cloudwatch/asg");

@@ -202,2 +203,30 @@ CloudwatchDynamoPanelFactory = require("./factories/cloudwatch/dynamodb");

/**
* Generates widgets for all API gateways.
*
* @param {object} gateways
* @param {array} widgets
* @param {object} state
*/
function generateApiGatewayGraphs(gateways, region, widgets = [], state) {
if (!gateways) return;
const factory = new CloudwatchApiGatewayGraphFactory(region);
Object.keys(gateways).forEach(key => {
const title = gateways[key].title ? `API Gateway: ${gateways[key].title}` : `API Gateway: ${gateways[key].name}`
widgets.push(titleWidget(title, state));
widgets.push(factory.render('calls', gateways[key], state));
widgets.push(factory.render('latency', gateways[key], state));
state.position += 16;
widgets.push(factory.render('4xx', gateways[key], state));
widgets.push(factory.render('5xx', gateways[key], state));
state.position += 16;
});
}
/**
* Generates widgets for instances in all auto scaling groups.

@@ -426,2 +455,7 @@ *

// API Gateway
if (vars.api_gateways) {
generateApiGatewayGraphs(vars.api_gateways, vars.region, dashboard.widgets, state);
}
// ASGS

@@ -428,0 +462,0 @@ if (vars.asgs) {

2

package.json
{
"name": "datadog_dashboards",
"version": "2.5.0",
"version": "2.5.1",
"description": "A quick way to generate helpful, pre-canned datadog dashboards for Cloudwatch.",

@@ -5,0 +5,0 @@ "engines": {

Sorry, the diff of this file is not supported yet

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