-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanifest.yaml
165 lines (151 loc) · 4.87 KB
/
manifest.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
id: serverboards.prometheus
name: Prometheus Service Integration
author: David Moreno Montero <[email protected]>
url: https://serverboards.io
description: |
This plugin allows Serveboards to connect to a Prometheus installation.
Prometheus is an state of the art monitoring system that allows to know the
state of you full infrastucture KPI over time, providing a powerful
quering system.
With this plugin is is possible to have graphs in the dashboards as well as
alerting when some conditions apply.
Prometheus configuration is done adding services that will define which
external services exist, or even installs data exporter agents as required.
version: "18.01"
components:
- id: service
type: service
name: Prometheus
description: Access to an existing Prometheus instance.
traits: prometheus url cloud server
fields:
- name: via
label: Via service
description: Connect via this service to access prometheus.
type: service
traits: ssh
- name: url
label: URL
description: URL to access prometheus, relative to service
placeholder: "http://localhost:9090"
type: url
card: true
status:
command: serverboards.prometheus/daemon
call: prometheus_is_up
frequency: 10m
- id: agent
type: service
name: Prometheus Target
description: Access to a prometheus agent, as a node_exporter, or any other prometheus data exporter.
traits: prometheus.node cloud
fields:
- name: via
label: SSH Server
description: Access via this SSH server. leave empty for direct connection.
type: service
traits: ssh
- name: url
label: URL
description: URL to access prometheus agent, relative to service.
placeholder: "http://localhost:9100"
default: http://localhost:9090
type: url
card: true
status:
command: serverboards.prometheus/daemon
call: agent_is_up
frequency: 10m
- id: node_exporter
type: service
name: Managed Prometheus Node Exporter
description: Install a node exporter on the given SSH server.
traits: prometheus.node server
fields:
- name: server
label: SSH Server
description: Install the node exporter at this SSH server.
type: service
traits: ssh
card: true
status:
command: serverboards.prometheus/daemon
call: node_exporter_is_up
frequency: 10m
- id: widget
type: widget
name: Prometheus graph
params:
- label: Prometheus service
name: service
type: service
traits: prometheus
placeholder: If left empty means its at http://localhost:9090
- label: Prometheus expression
name: expr
type: textarea
description: |
Check the [Prometheus documentation](https://prometheus.io/docs/querying/basics/)
for more information.
Its possible to set several graphs, one on each line.
Each graph can have a name set as `name:` at the begining of the definition.
placeholder: "scrape_duration_seconds"
autocomplete:
command: serverboards.prometheus/daemon
call: autocomplete_values
- id: daemon
type: cmd
strategy: singleton
name: Prometheus proxy
command: serverboards-prometheus.py
timeout: 1d
perms: plugin service.get
- id: init.daemon
type: cmd
strategy: init
name: Prometheus Supervisor
command: prometheus-init.py
perms: plugin service.get action.trigger[serverboards.core.actions/open-issue] action.trigger[serverboards.core.actions/close-issue]
- id: init
type: init
command: init.daemon
call: start_prometheus
- id: trigger
name: Prometheus Alert
type: trigger
command: daemon
traits: prometheus cloud server
start:
method: watch_start
params:
- name: service
label: Prometheus service
type: service
traits: prometheus
- name: period
label: Check period
description: |
Check every given time for the expression.
Time can use time modifiers as 1m, 30s, 1h...
placeholder: 5m
card: true
type: text
- name: expression
label: Prometheus expression
placeholder: "up == 1"
description: Which expression to watch.
type: text
result:
value: Current value of the expression
stop: watch_stop
data:
prometheus:
url: https://github.com/prometheus/prometheus/releases/download/v2.2.1/prometheus-2.2.1.linux-amd64.tar.gz
files:
- prometheus
- prometheus.yml
- promtool
node_exporter:
url: https://github.com/prometheus/node_exporter/releases/download/v0.16.0-rc.0/node_exporter-0.16.0-rc.0.linux-amd64.tar.gz
files:
- node_exporter