Skip to content

Commit f2b0eec

Browse files
author
Dominik Rosiek
committed
sumologicexporter: extract source templates as another README section
Signed-off-by: Dominik Rosiek <[email protected]>
1 parent f8d3bf1 commit f2b0eec

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

exporter/sumologicexporter/README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ Empty string means no compression
1212
- `log_format` (optional) (logs only): Format to use when sending logs to Sumo. (default `json`) (possible values: `json`, `text`)
1313
- `metric_format` (optional) (metrics only): Format of the metrics to be sent (default is `prometheus`) (possible values: `carbon2`, `graphite`, `prometheus`).
1414
- `graphite_template` (default=`%{_metric_}`) (optional) (metrics only): Template for Graphite format.
15-
Placeholders `%{attr_name}` will be replaced with attribute value for `attr_name`. `%{_metric_}` is going to be replaced with metric name.
15+
[Source templates](#source-templates) are going to be applied.
1616
Applied only if `metric_format` is set to `graphite`.
1717
- `source_category` (optional): Desired source category. Useful if you want to override the source category configured for the source.
18-
Placeholders `%{attr_name}` will be replaced with attribute value for `attr_name`.
18+
[Source templates](#source-templates) are going to be applied.
1919
- `source_name` (optional): Desired source name. Useful if you want to override the source name configured for the source.
20-
Placeholders `%{attr_name}` will be replaced with attribute value for `attr_name`.
20+
[Source templates](#source-templates) are going to be applied.
2121
- `source_host` (optional): Desired host name. Useful if you want to override the source host configured for the source.
22-
Placeholders `%{attr_name}` will be replaced with attribute value for `attr_name`.
22+
[Source templates](#source-templates) are going to be applied.
2323
- `timeout` (default = 5s): Is the timeout for every attempt to send data to the backend.
2424
Maximum connection timeout is 55s.
2525
- `retry_on_failure`
@@ -35,7 +35,15 @@ Maximum connection timeout is 55s.
3535
- `num_seconds` is the number of seconds to buffer in case of a backend outage
3636
- `requests_per_second` is the average number of requests per seconds.
3737

38-
Example:
38+
## Source Templates
39+
40+
You can specify a template with an attribute for `source_category`, `source_name`, `source_host` or `graphite_template` using `%{attr_name}`.
41+
42+
For example, when there is an attribute `my_attr`: `my_value`, `metrics/%{my_attr}` would be expanded to `metrics/my_value`.
43+
44+
For `graphite_template`, in addition to above, `%{_metric_}` is going to be replaced with metric name.
45+
46+
## Example Configuration
3947

4048
```yaml
4149
exporters:

0 commit comments

Comments
 (0)