|
|
@ -1,5 +1,7 @@
|
|
|
|
#!/usr/bin/env python
|
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# (c) 2014-2015, Epic Games, Inc.
|
|
|
|
|
|
|
|
|
|
|
|
import requests
|
|
|
|
import requests
|
|
|
|
import time
|
|
|
|
import time
|
|
|
|
import json
|
|
|
|
import json
|
|
|
@ -46,13 +48,13 @@ options:
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
EXAMPLES = '''
|
|
|
|
EXAMPLES = '''
|
|
|
|
# Create a simple annotation event with a source
|
|
|
|
# Create a simple annotation event with a source, defaults to start and end time of now
|
|
|
|
- circonus_annotation:
|
|
|
|
- circonus_annotation:
|
|
|
|
api_key: XXXXXXXXXXXXXXXXX
|
|
|
|
api_key: XXXXXXXXXXXXXXXXX
|
|
|
|
title: 'App Config Change'
|
|
|
|
title: 'App Config Change'
|
|
|
|
description: 'This is a detailed description of the config change'
|
|
|
|
description: 'This is a detailed description of the config change'
|
|
|
|
category: 'This category groups like annotations'
|
|
|
|
category: 'This category groups like annotations'
|
|
|
|
# Create an annotation with a duration of 5 minutes
|
|
|
|
# Create an annotation with a duration of 5 minutes and a default start time of now
|
|
|
|
- circonus_annotation:
|
|
|
|
- circonus_annotation:
|
|
|
|
api_key: XXXXXXXXXXXXXXXXX
|
|
|
|
api_key: XXXXXXXXXXXXXXXXX
|
|
|
|
title: 'App Config Change'
|
|
|
|
title: 'App Config Change'
|
|
|
@ -88,7 +90,7 @@ def create_annotation(module):
|
|
|
|
if module.params['stop'] != None:
|
|
|
|
if module.params['stop'] != None:
|
|
|
|
stop = module.params['stop']
|
|
|
|
stop = module.params['stop']
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
stop = int(time.time())+duration
|
|
|
|
stop = int(time.time())+ duration
|
|
|
|
annotation['start'] = int(start)
|
|
|
|
annotation['start'] = int(start)
|
|
|
|
annotation['stop'] = int(stop)
|
|
|
|
annotation['stop'] = int(stop)
|
|
|
|
annotation['category'] = module.params['category']
|
|
|
|
annotation['category'] = module.params['category']
|
|
|
|