Skip to content
This repository was archived by the owner on Jun 2, 2021. It is now read-only.

Commit 8d70b37

Browse files
author
Gavin M. Roy
committed
Update to show the new multi-host format for all plugins
1 parent 6bc2bbf commit 8d70b37

File tree

1 file changed

+120
-46
lines changed

1 file changed

+120
-46
lines changed

README.md

Lines changed: 120 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,34 @@ or
7474

7575
pip install -e .[postgresql]
7676

77+
Plugin Configuration Stanzas
78+
----------------------------
79+
Each plugin can support gathering data from a single or multiple targets. To support multiple targets for a plugin, you create a list of target stanzas:
80+
81+
plugin_name:
82+
- name: target_name
83+
host: localhost
84+
foo: bar
85+
- name: target_name
86+
host: localhost
87+
foo: bar
88+
89+
While you can use the multi-target format for a plugins configuration stanza like:
90+
91+
plugin_name:
92+
- name: target_name
93+
host: localhost
94+
foo: bar
95+
96+
You can also use a single mapping like follows:
97+
98+
plugin_name:
99+
name: target_name
100+
host: localhost
101+
foo: bar
102+
103+
The fields for plugin configurations can vary due to a plugin's configuration requirements.
104+
77105
Apache HTTPd Installation Notes
78106
-------------------------------
79107
Enable the HTTPd server status page in the default virtual host. The following example configuration snippet for Apache HTTPd 2.2 demonstrates how to do this:
@@ -106,7 +134,31 @@ MongoDB Installation Notes
106134
--------------------------
107135
You need to install the pymongo driver, either by running "pip install pymongo" or by following the "Installing Additional Requirements" above. Each database you wish to collect metrics for must be enumerated in the configuration.
108136

109-
To use authentication, include the username and password configuration values, otherwise omit them.
137+
There are two configuration stanza formats for MongoDB. You must use one or the other, they can not be mixed. For non-authenticated polling, you can simply enumate the databases you would like stats from as a list:
138+
139+
mongodb:
140+
name: hostname
141+
host: localhost
142+
port: 27017
143+
databases:
144+
- database_name_1
145+
- database_name_2
146+
147+
If your MongoDB server requires authentication, you must provide both admin credentials and database level credentials and the stanza is formatted as a nested array:
148+
149+
mongodb:
150+
name: hostname
151+
host: localhost
152+
port: 27017
153+
admin_username: foo
154+
admin_password: bar
155+
databases:
156+
database_name_1:
157+
username: foo
158+
password: bar
159+
database_name_2:
160+
username: foo
161+
password: bar
110162

111163
Nginx Installation Notes
112164
------------------------
@@ -161,67 +213,89 @@ Configuration Example
161213
#proxy: http://localhost:8080
162214

163215
apache_httpd:
164-
name: hostname
165-
scheme: http
166-
host: localhost
167-
port: 80
168-
path: /server-status
169-
#verify_ssl_cert: true
216+
- name: hostname1
217+
scheme: http
218+
host: localhost
219+
port: 80
220+
path: /server-status
221+
#verify_ssl_cert: true
222+
- name: hostname2
223+
scheme: http
224+
host: localhost
225+
port: 80
226+
path: /server-status
227+
#verify_ssl_cert: true
170228

171229
couchdb:
172-
name: localhost
173-
host: localhost
174-
port: 5984
175-
#verify_ssl_cert: true
230+
- name: localhost
231+
host: localhost
232+
port: 5984
233+
#verify_ssl_cert: true
234+
- name: localhost
235+
host: localhost
236+
port: 5984
237+
#verify_ssl_cert: true
176238

177239
edgecast:
178-
name: My Edgecase Account
179-
account: ACCOUNT_NUMBER
180-
token: API_TOKEN
240+
- name: My Edgecase Account
241+
account: ACCOUNT_NUMBER
242+
token: API_TOKEN
181243

182244
mongodb:
183245
name: hostname
184246
host: localhost
185247
port: 27017
186-
username: foo
187-
password: bar
248+
admin_username: foo
249+
admin_password: bar
188250
databases:
189-
- database_name_1
190-
- database_name_2
191-
- etc
251+
database_name_1:
252+
username: foo
253+
password: bar
254+
database_name_2:
255+
username: foo
256+
password: bar
192257

193258
memcached:
194-
name: localhost
195-
host: localhost
196-
port: 11211
197-
path: /path/to/unix/socket
259+
- name: localhost
260+
host: localhost
261+
port: 11211
262+
path: /path/to/unix/socket
263+
- name: localhost
264+
host: localhost
265+
port: 11211
266+
path: /path/to/unix/socket
198267

199268
nginx:
200-
name: hostname
201-
host: localhost
202-
port: 80
203-
path: /nginx_stub_status
204-
#verify_ssl_cert: true
269+
- name: hostname
270+
host: localhost
271+
port: 80
272+
path: /nginx_stub_status
273+
#verify_ssl_cert: true
274+
- name: hostname
275+
host: localhost
276+
port: 80
277+
path: /nginx_stub_status
278+
#verify_ssl_cert: true
205279

206280
pgbouncer:
207-
host: localhost
208-
port: 6000
209-
user: stats
281+
- host: localhost
282+
port: 6000
283+
user: stats
210284

211285
postgresql:
212-
host: localhost
213-
port: 5432
214-
user: postgres
215-
dbname: postgres
216-
superuser: True
286+
- host: localhost
287+
port: 5432
288+
user: postgres
289+
dbname: postgres
290+
superuser: True
217291

218292
rabbitmq:
219-
name: rabbitmq@localhost
220-
host: localhost
221-
port: 15672
222-
username: guest
223-
password: guest
224-
#verify_ssl_cert: true
293+
- name: rabbitmq@localhost
294+
host: localhost
295+
port: 15672
296+
username: guest
297+
password: guest
298+
#verify_ssl_cert: true
225299

226300
redis:
227301
- name: localhost
@@ -236,10 +310,10 @@ Configuration Example
236310
password: foobar
237311

238312
riak:
239-
name: localhost
240-
host: localhost
241-
port: 8098
242-
#verify_ssl_cert: true
313+
- name: localhost
314+
host: localhost
315+
port: 8098
316+
#verify_ssl_cert: true
243317

244318
Daemon:
245319
user: newrelic

0 commit comments

Comments
 (0)