Skip to content

Commit f60622c

Browse files
Documentation streamlining (#123)
1 parent 2f66bb4 commit f60622c

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

README.adoc

+14-9
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@ These metrics are exported:
236236
237237
Additional labels can be configured in the configuration file (see below).
238238
239-
<namespace> can be ommited or overrided - see <<Namespace-as-labels>>
239+
`<namespace>` can be omitted or overridden - see <<Namespace-as-labels>> for
240+
more information.
240241
241242
== Configuration file
242243
@@ -272,8 +273,9 @@ namespace "app1" {
272273
"/var/log/nginx/app1/access.log"
273274
]
274275
}
275-
#metrics_override = { prefix = "myprefix" }
276-
#namespace_label = "vhost"
276+
277+
# metrics_override = { prefix = "myprefix" }
278+
# namespace_label = "vhost"
277279

278280
labels {
279281
app = "application-one"
@@ -321,9 +323,9 @@ namespaces:
321323
source:
322324
files:
323325
- /var/log/nginx/app1/access.log
324-
#metrics_override:
325-
# prefix: "myprefix"
326-
#namespace_label: "vhost"
326+
# metrics_override:
327+
# prefix: "myprefix"
328+
# namespace_label: "vhost"
327329
labels:
328330
app: "application-one"
329331
environment: "production"
@@ -340,7 +342,9 @@ Advanced features
340342
-----------------
341343
### Namespace as labels
342344

343-
It's more convinient to have same metrics across different
345+
For historic reasons, this exporter exports separate metrics for different
346+
namespaces (because the namespace is part of the metric name). However, in many
347+
(most) cases, it's more convenient to have the same metric name across different
344348
namespaces (with different log formats and names).
345349

346350
This can be done in two steps:
@@ -374,11 +378,12 @@ myprefix_http_response_count_total{vhost="app2", ...}
374378
----
375379

376380
* `prefix` can be set to `""`, resulting metrics like `http_response_count_total{...}`
377-
* `namespace_label` can be ommited - so you have full control on metric format
381+
* `namespace_label` can be omitted - so you have full control on metric format
378382

379-
Some details and history: https://github.com/martin-helmich/prometheus-nginxlog-exporter/issues/13[Issue #13]
383+
Some details and history on this can be found in https://github.com/martin-helmich/prometheus-nginxlog-exporter/issues/13[issue #13].
380384

381385
### Custom labels pass-through
386+
382387
Partial case of <<Dynamic-re-labeling>>:
383388

384389
[source,hcl]

0 commit comments

Comments
 (0)