mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
fix service state timeline key error and change scrape interval
This commit is contained in:
parent
6189dd4c01
commit
ad5d7ba1e9
3 changed files with 6 additions and 4 deletions
|
@ -240,5 +240,6 @@ scrape_configs:
|
|||
|
||||
- job_name: 'haproxy state'
|
||||
static_configs:
|
||||
- targets: ['localhost:5569']:
|
||||
metrics_path: /state/
|
||||
- targets: ['localhost:5569']
|
||||
metrics_path: /state/
|
||||
scrape_interval: 30s
|
|
@ -236,4 +236,5 @@ scrape_configs:
|
|||
metrics_path: /state/
|
||||
scheme: http
|
||||
tls_config:
|
||||
insecure_skip_verify: true
|
||||
insecure_skip_verify: true
|
||||
scrape_interval: 30s
|
|
@ -36,7 +36,7 @@ def format_state_data(label, data):
|
|||
formatted_data = {}
|
||||
for k, v in data.items():
|
||||
if v:
|
||||
formatted_data[k] = f'{label}{{servername="{k}"}} {STATUS_MAPPING[v]}'
|
||||
formatted_data[k] = f'{label}{{servername="{k}"}} {STATUS_MAPPING[v.strip()]}'
|
||||
return formatted_data
|
||||
|
||||
def get_state():
|
||||
|
|
Loading…
Add table
Reference in a new issue