mirror of
https://github.com/yavook/kiwi-simple-metrics.git
synced 2024-11-24 16:33:01 +00:00
"result" param for webhooks
This commit is contained in:
parent
41a9446f55
commit
2572afac22
2 changed files with 4 additions and 4 deletions
|
@ -28,13 +28,13 @@ metrics:
|
|||
image: yavook/kiwi-simple-metrics:0.1
|
||||
environment:
|
||||
METRICS__LOG__ENABLED: "True"
|
||||
METRICS__WEBHOOK__URL: "https://my.webhook.host/success?report={}"
|
||||
METRICS__WEBHOOK__FAIL: "https://my.webhook.host/failure?report={}"
|
||||
METRICS__WEBHOOK__URL: "https://my.webhook.host/success?report={result}"
|
||||
METRICS__WEBHOOK__FAIL: "https://my.webhook.host/failure?report={result}"
|
||||
```
|
||||
|
||||
- same metrics as above
|
||||
- logs reports to stdout
|
||||
- triggers webhooks (`{}` is the placeholder for the result string)
|
||||
- triggers webhooks (`{result}` is the placeholder for the result string)
|
||||
|
||||
## Configuration
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ class Report:
|
|||
|
||||
requests.get(
|
||||
url=str(url).format(
|
||||
urllib.parse.quote_plus(self.result)
|
||||
result=urllib.parse.quote_plus(self.result)
|
||||
),
|
||||
verify=not SETTINGS.webhook.insecure,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue