Skip to content

Commit 043f2d8

Browse files
committed
add prometheus config to README
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
1 parent 3ea19c9 commit 043f2d8

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,53 @@ Metrics:
127127
# TYPE azure_loganalytics_operationstatus_count gauge
128128
azure_loganalytics_operationstatus_count{OperationStatus="Succeeded",workspaceId="xxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",workspaceTable="PrimaryResult"} 1
129129
```
130+
131+
Prometheus configuration
132+
------------------------
133+
134+
predefined workspaces (at startup via parameter/environment variable)
135+
136+
```yaml
137+
- job_name: azure-loganalytics-exporter
138+
scrape_interval: 1m
139+
metrics_path: /probe
140+
params:
141+
cache: ["10m"]
142+
parallel: ["5"]
143+
static_configs:
144+
- targets: ["azure-loganalytics-exporter:8080"]
145+
```
146+
147+
dynamic workspaces (defined in prometheus configuration)
148+
149+
```yaml
150+
- job_name: azure-loganalytics-exporter
151+
scrape_interval: 1m
152+
metrics_path: /probe/workspace
153+
params:
154+
workspace:
155+
- xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx
156+
- xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx
157+
- xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx
158+
cache: ["10m"]
159+
parallel: ["5"]
160+
static_configs:
161+
- targets: ["azure-loganalytics-exporter:8080"]
162+
```
163+
164+
find workspaces with servicediscovery via subscription
165+
166+
```yaml
167+
- job_name: azure-loganalytics-exporter
168+
scrape_interval: 1m
169+
metrics_path: /probe/subscription
170+
params:
171+
subscription:
172+
- xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx
173+
- xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx
174+
- xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx
175+
cache: ["10m"]
176+
parallel: ["5"]
177+
static_configs:
178+
- targets: ["azure-loganalytics-exporter:8080"]
179+
```

0 commit comments

Comments
 (0)