0.2.43 • Published 3 years ago

@nomadblacky/cdk-datadog-resources v0.2.43

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

AWS CDK Datadog Resources

npm version

An AWS CDK construct library that wraps DataDog/datadog-cloudformation-resources.

Requirements

Before using this library, register datadog-cloudformation-resources to your AWS account.

You need to register the correct version listed in Supported Resources.

Supported CDK Languages

  • TypeScript
  • Python
  • Java Sorry, there is a problem with the release. (#22)

Supported Resources

Supported?ResourceDatadog CF Resource NameDescriptionDatadog CF Version
DashboardsDatadog::Dashboards::DashboardCreate, update, and delete Datadog dashboards.1.0.0
Datadog-AWS integrationDatadog::Integrations::AWSManage your Datadog-Amazon Web Service integration.1.1.0
MonitorsDatadog::Monitors::MonitorCreate, update, and delete Datadog monitors.3.0.0
DowntimesDatadog::Monitors::DowntimeEnable or disable downtimes for your monitors.2.0.0
UsersDatadog::IAM::UserCreate and manage Datadog users.1.2.0

Installation

TypeScript

npm install @nomadblacky/cdk-datadog-resources

Python

pip install cdk-datadog-resources

Java

<dependency>
    <groupId>dev.nomadblacky</groupId>
    <artifactId>cdk-datadog-resources</artifactId>
    <version>x.y.z</version>
</dependency>

Usage

Below are examples of TypeScript.

Dashboards

import * as fs from 'fs';
import { DatadogDashboard } from '@nomadblacky/cdk-datadog-resources';

new DatadogDashboard(yourStack, 'TestDashboard', {
  datadogCredentials: {
    apiKey: process.env.DATADOG_API_KEY!,
    applicationKey: process.env.DATADOG_APP_KEY!,
  },
  dashboardDefinition: fs.readFileSync(`${__dirname}/path/to/your/dashboard-definition.json`).toString(),
});

Monitors

import { DatadogMonitor } from '@nomadblacky/cdk-datadog-resources';

new DatadogMonitor(yourStack, 'TestMonitor', {
  datadogCredentials: {
    apiKey: process.env.DATADOG_API_KEY!,
    applicationKey: process.env.DATADOG_APP_KEY!,
  },
  query: 'avg(last_1h):sum:system.cpu.system{host:host0} > 100',
  type: MonitorType.QueryAlert,
  name: 'Test Monitor',
  options: {
    thresholds: {
      critical: 100,
      warning: 80,
      oK: 90,
    },
    notifyNoData: true,
    evaluationDelay: 60,
  },
});

Downtimes

import { DatadogDowntime } from '@nomadblacky/cdk-datadog-resources';

new DatadogDowntime(stack, 'TestMonitor', {
  datadogCredentials: {
    apiKey: 'DATADOG_API_KEY',
    applicationKey: 'DATADOG_APP_KEY',
  },
  scope: ['host:myserver', 'service:myservice'],
  start: 1624542715,
  end: 1624546321,
});

Users

import { DatadogIAMUser } from '@nomadblacky/cdk-datadog-resources';

new DatadogIAMUser(stack, 'TestUser', {
  datadogCredentials: {
    apiKey: 'DATADOG_API_KEY',
    applicationKey: 'DATADOG_APP_KEY',
  },
  email: 'jane.doe@example.com',
  name: 'name_example',
  handle: 'title_example',
  disabled: false,
});

DataDog Integration

import { DatadogIntegrationAWS } from '@nomadblacky/cdk-datadog-resources';

new DatadogIntegrationAWS(this, 'DataDogIntegration', {
  datadogCredentials: {
    apiKey: "DATADOG_API_KEY",
    applicationKey: "DATADOG_APP_KEY",
  },
  accountId: "ACCOUNT_ID",
  roleName: "DatadogIntegrationRole",
});
0.2.43

3 years ago

0.2.42

3 years ago

0.2.41

3 years ago

0.2.40

3 years ago

0.2.39

3 years ago

0.2.38

3 years ago

0.2.37

3 years ago

0.2.36

3 years ago

0.2.35

3 years ago

0.2.34

3 years ago

0.2.33

3 years ago

0.2.27

3 years ago

0.2.26

3 years ago

0.2.25

3 years ago

0.2.24

3 years ago

0.2.23

3 years ago

0.2.30

3 years ago

0.2.32

3 years ago

0.2.31

3 years ago

0.2.29

3 years ago

0.2.28

3 years ago

0.2.22

3 years ago

0.2.21

3 years ago

0.2.20

3 years ago

0.2.19

3 years ago

0.2.18

3 years ago

0.1.12

3 years ago

0.2.17

3 years ago

0.2.16

3 years ago

0.2.15

3 years ago

0.2.14

3 years ago

0.2.13

3 years ago

0.2.12

3 years ago

0.2.11

3 years ago

0.2.10

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.9

3 years ago

0.2.8

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago