Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Commit e5e1c65

Browse files
committed
Fix module doc
Closes: #8
1 parent b5f4840 commit e5e1c65

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

library/grafana_annotations.py

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
description: Allows to create annotations in Grafana from playbooks.
1515
short_description: Create annotations in Grafana through the dedicated API.
1616
options:
17-
addr:
17+
url:
1818
required: true
1919
description:
2020
- address of the grafana REST API
@@ -30,12 +30,12 @@
3030
required: false
3131
description:
3232
- Grafana API token
33-
time:
33+
tstamp:
3434
required: false
3535
description:
3636
- epoch datetime in seconds.
3737
If not specified, the current localtime is used.
38-
timeEnd:
38+
end_tstamp:
3939
required: false
4040
description:
4141
- epoch datetime in seconds, automatically define the annotation as a region annotation.
@@ -48,43 +48,36 @@
4848
required: true
4949
description:
5050
- Text to be displayed in the annotation
51-
secure:
52-
required: false
53-
default: false
54-
description:
55-
- If true, an https connection will be established with the Grafana server.
5651
'''
5752

5853
EXAMPLES = '''
5954
- name: Create a global annotation
6055
grafana_annotations:
61-
addr: "10.4.3.173:8080"
56+
url: "10.4.3.173:8080/api/annotations"
6257
user: "grafana_login"
6358
passwd: "grafana_password"
6459
text: "Started update of production environment"
6560
6661
- name: Create a global annotation
6762
grafana_annotations:
68-
addr: "10.4.3.173:8080"
63+
url: "10.4.3.173:8080/api/annotations"
6964
user: "grafana_login"
7065
passwd: "grafana_password"
71-
time: 1513000095
66+
tstamp: 1513000095
7267
text: "Planned intervention on production server"
7368
7469
- name: Create a global region annotation
7570
grafana_annotations:
76-
addr: "10.4.3.173:8080"
71+
url: "10.4.3.173:8080/api/annotations"
7772
user: "grafana_login"
7873
passwd: "grafana_password"
79-
time: 1513000095
80-
timeEnd: 1513005095
74+
tstamp: 1513000095
75+
end_tstamp: 1513005095
8176
text: "Execution of the xxxx playbook"
8277
8378
'''
8479

8580

86-
87-
8881
def default_filter(annos, annotation):
8982
"""default filter comparing 'time', 'text' and 'tags' parameters"""
9083
result = []

0 commit comments

Comments
 (0)