From 2e2f24447ae97c985037eaac5563b41dbdf208ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Kr=C3=A4mer?= <fabian.kraemer@gmail.com>
Date: Tue, 8 Nov 2016 08:21:38 +1100
Subject: [PATCH] Add require_full_window option for Datadog monitors (#2653)

---
 lib/ansible/modules/extras/monitoring/datadog_monitor.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/ansible/modules/extras/monitoring/datadog_monitor.py b/lib/ansible/modules/extras/monitoring/datadog_monitor.py
index 7ed1805c66..1446218a35 100644
--- a/lib/ansible/modules/extras/monitoring/datadog_monitor.py
+++ b/lib/ansible/modules/extras/monitoring/datadog_monitor.py
@@ -101,6 +101,11 @@ options:
         required: false
         default: False
         version_added: 2.2
+    require_full_window:
+        description: ["A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to False for sparse metrics, otherwise some evaluations will be skipped."]
+        required: false
+        default: null
+        version_added: 2.2
 '''
 
 EXAMPLES = '''
@@ -167,7 +172,8 @@ def main():
             notify_audit=dict(required=False, default=False, type='bool'),
             thresholds=dict(required=False, type='dict', default=None),
             tags=dict(required=False, type='list', default=None),
-            locked=dict(required=False, default=False, type='bool')
+            locked=dict(required=False, default=False, type='bool'),
+            require_full_window=dict(required=False, default=None, type='bool')
         )
     )
 
@@ -253,6 +259,7 @@ def install_monitor(module):
         "escalation_message": module.params['escalation_message'],
         "notify_audit": module.boolean(module.params['notify_audit']),
         "locked": module.boolean(module.params['locked']),
+        "require_full_window" : module.params['require_full_window']
     }
 
     if module.params['type'] == "service check":