Skip to content

irabinovitch/alexa-datadog-sample

 
 

Repository files navigation

alexa-datadog-sample

This is a simple example of integrating Datadog with an Amazon Echo. This is written on top of the Serverless framework to simplify development and deployment, but that's not important to the implementation.

Currently the only supported query is to ask for CPU levels, which will list out the current CPU values for all hosts in your account. For example, saying:

Alexa, ask Datadog to check the CPU

will result in a response along the lines of:

Here are the current CPU loads. Gregs MacBook Pro is at 7%. Gregs iMac is at 4%

<iframe width="100%" height="80" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/269945578&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe>

Interaction Model

Here's an example of how to set up an interaction model for this skill.

Intent Schema

{
  "intents": [
    {
      "intent": "QueryIntent",
      "slots": [
        {
          "name": "Query",
          "type": "QUERY_LIST"
        }
      ]
    }
  ]
}

Custom Slot Types

Type Values
QUERY_LIST cpu

Sample Utterances

QueryIntent query {Query}
QueryIntent check {Query}
QueryIntent to query {Query}
QueryIntent to check {Query}
QueryIntent to query the {Query}
QueryIntent to check the {Query}

Additional Configuration

You'll also need to supply your Datadog API and app keys in order for the queries to work properly. You can set these in handler.js:

dogapi.initialize({
  api_key: 'TODO',
  app_key: 'TODO'
});

About

Sample showing how to expose Datadog through an Amazon Echo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%