-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathpillar.example
292 lines (292 loc) · 7.65 KB
/
pillar.example
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
collectd:
FQDNLookup: true
# To add new types to collectd, you need to reference the new file in TypesDB
TypesDB: ['/usr/share/collectd/types.db', '/etc/collectd/plugins/types.db']
# and add types below
types:
- 'jmx_memory value:GAUGE:0:U'
# if true, all non salt-managed files in plugindir will be removed
purge_plugindir: false
# if false, service is not enabled and not started
enable_service: true
plugins:
default: [battery, cpu, entropy, load, memory, swap, users]
curl_json:
Url "http://127.0.0.1/status?json":
instance: php-fpm
keys:
start since:
type: uptime
accepted conn:
type: http_requests
listen queue:
type: phpfpm_listen_queue
listen queue len:
type: phpfpm_listen_queue
max listen queue:
type: phpfpm_listen_queue
idle processes:
type: phpfpm_processes
active processes:
type: phpfpm_processes
total processes:
type: phpfpm_processes
max active processes:
type: phpfpm_processes
max children reached:
type: phpfpm_processes
slow requests:
type: phpfpm_slow_requests
curl_xml:
Url "127.0.0.1/stats":
instance: instance
xpaths:
- name: /stats
data:
type: uptime
values_from:
- uptime
apache:
instances:
- name: name
url: 'http://localhost/server-status?auto'
user: user
pass: pass
bind:
proto: http
host: localhost
port: 8053
parsetime: true
opcodes: true
qtypes: true
serverstats: true
zonemaintstats: true
resolverstats: false
memorystats: true
views:
- name: _default
qtypes: false
resolverstats: false
cacherrsets: false
zones:
- 127.in-addr.arpa/IN
dbi:
queries:
- name: mysql_user_connections
statement: >-
SELECT user, count(*) as nof_connections
FROM information_schema.processlist
GROUP BY user
results:
- type: gauge
instancePrefix: mysql_user_connections
instancesFrom: user
valuesFrom: nof_connections
databases:
- name: name
driver: mysql
queries:
- mysql_user_connections
driverOptions:
- name: host
value: 192.168.1.100
# Another method is to use `grains.get`:
# value: {{ salt['grains.get']('ip4_interfaces:eth1')[0] }}
- name: username
value: user
- name: password
value: pass
exec:
- Exec "myuser:mygroup" "myprog"
- Exec "otheruser" "/path/to/another/binary" "arg0" "arg1"
- NotificationExec "user" "/usr/lib/collectd/exec/handle_notification"
syslog:
loglevel: info
network:
host: 'logstash'
port: 25826
securitylevel: 'Encrypt'
username: 'user'
password: 'password'
mysql:
databases:
- host: 'foo'
port: '3306'
user: 'myuser'
pass: 'mypass'
name: 'mydb'
masterstats: true
- host: 'foo'
name: 'mydb'
socket: '/var/run/mysql/mysqld.sock'
slavestats: true
slavenotifications: true
postgresql:
databases:
- name: 'foo'
host: 'hostname'
port: '5432'
user: 'username'
pass: 'secret'
sslmode: 'prefer'
krbsrvname: 'kerberos_service_name'
service: 'service_name'
queries:
- 'magic'
- name: 'bar'
service: 'service_name'
queries:
- 'backend'
- 'rt36_tickets'
queries:
- name: 'magic'
statement: "SELECT magic FROM wizard WHERE host = $1;"
param: 'hostname'
results:
- type: 'gauge'
instanceprefix: 'magic'
valuesfrom: 'magic'
- name: 'rt36_tickets'
statement: |
SELECT COUNT(type) AS count, type
FROM (SELECT CASE
WHEN resolved = 'epoch' THEN 'open'
ELSE 'resolved' END AS type
FROM tickets) type
GROUP BY type;
results:
- type: 'counter'
instanceprefix: 'rt36_tickets'
instancesfrom: 'type'
valuesfrom: 'count'
powerdns:
socket: '/var/run/pdns.controlsocket'
protocols:
IgnoreSelected: true
openldap:
instances:
- name: ldap
url: ldap://localhost
binddn: "cn=monitor, dc=example, dc=com"
password: MyOwnPassword
verifyhost: true
starttls: true
cacert: /etc/ssl/certs/ca-cert.pem
df:
Devices:
- 'md1'
- 'md2'
MountPoints:
- '/home'
FSTypes:
- 'ext4'
- 'tmpfs'
IgnoreSelected: false
ReportByDevice: false
ReportInodes: false
ntpd:
host: localhost
port: 123
ReverseLookups: 'false'
java:
host: localhost
port: 17264
user: ''
pass: ''
lib: '/usr/lib/jvm/java-7-oracle/jre/lib/amd64/libjava.so'
ethstat:
interface: 'eth0'
interface:
interfaces: ['eth0', 'lo0']
IgnoreSelected: 'false'
# defaults as of 20141103
ping:
hosts: ['google.com', 'yahoo.com']
# interval: 1.0
# timeout: 0.9
# ttl: 64
# sourceaddress: 10.0.1.1
# device: eth0
# maxmissed: -1
disk:
matches: ['/^[hs]d[a-f][0-9]?$/']
write_graphite:
name: graphite
host: graphite-host
port: "2003"
protocol: "tcp"
prefix: "collectd."
postfix: ""
logsenderrors: false
escapecharacter: "_"
separateinstances: true
storerates: true
alwaysappendds: false
processes:
Processes:
- 'java'
- 'python'
ProcessMatches:
- '.*java.*'
statsd:
host: localhost
port: 8125
tail:
- file: '/var/log/exim4/mainlog'
instance: exim
match:
- instance: 'total'
dstype: 'CounterAdd'
type: 'ipt_bytes'
regex: 'S=([1-9][0-9]*)'
- instance: 'local_user'
dstype: 'CounterInc'
type: 'counter'
regex: '\\<R=local_user\\>'
md:
Device: ['md1', 'md2']
IgnoreSelected: false
librato:
user: example@example.com
token: deadbeef
python:
Globals: true
ModulePath: "/usr/share/collectd/modules"
LogTraces: true
Interactive: false
modules:
module_name: # Replace module_name by your Python module
variables:
var1: value1
var2: value2
extra:
cpu:
ReportByCpu: false
tcpconns:
listening_ports: 'true'
all_ports_summary: 'false'
local_ports: []
remote_ports: []
openvpn:
status_file:
- "/var/log/openvpn/openvpn-status.log"
individual_users: 'false'
user_count: 'true'
compression: 'false'
improved_naming_scheme: 'true'
rabbitmq:
username: 'guest'
password: 'guest'
realm: 'RabbitMQ Management'
host: 'localhost'
port: 15672
ignore_queue_regex:
- '^queue'
ignore_exchange_regex:
- '^exchange'
zookeeper:
host: localhost
port: 2181