Update README, set timeout as default 10 in configuration sample
This commit is contained in:
parent
8958845f65
commit
44ecd2d49c
@ -40,3 +40,9 @@ Sending POST on /reload :
|
||||
curl -XPOST http://my-nodegopher-host:8080/reload
|
||||
{"message":"configuration successfully reloaded"}
|
||||
```
|
||||
|
||||
Reloading a badly formated configuration will produce an error and keep the old configuration running.
|
||||
```
|
||||
% curl -XPOST 127.1:8080/reload
|
||||
{"error":"Unable to load new configuration, keeping old one. See logs."}
|
||||
```
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Formatting metrics in main & secondarystat. Supported: "english", "french", "german", "ukrainian", "chinese", "arabic"
|
||||
# Formatting metrics in main & secondarystat. Supported: "english", "french", "german", "ukrainian", "chinese", "arabic". Default is english.
|
||||
language: 'english'
|
||||
|
||||
# datasource describe a way to get prometheus metrics.
|
||||
@ -7,51 +7,44 @@ language: 'english'
|
||||
# - address: the address of prometheus.
|
||||
# - query: prometheus query. Same as typed in prometheus graph page.
|
||||
# - type: type of query. "query" will get instant value, "query_range" will get all samples for the grafana period. Result will be averaged.
|
||||
# - timeout: query timeout in seconds.
|
||||
# - timeout: query timeout in seconds. default is 10.
|
||||
datasources:
|
||||
- name: prom_samples_per_sec
|
||||
type: query
|
||||
address: 'http://prometheus.local.lan:9090'
|
||||
query: 'rate(prometheus_tsdb_head_samples_appended_total{type="float"}[10m])'
|
||||
timeout: 10
|
||||
timeout: 15
|
||||
- name: node_cpu_metric
|
||||
# Simple query, return an instant metric
|
||||
type: query
|
||||
address: 'http://prometheus.local.lan:9090'
|
||||
query: 'sum(rate(node_cpu_seconds_total{instance="router01.local.lan:9100",job="node",mode!~"idle"}[30s]))*100'
|
||||
timeout: 10
|
||||
- name: node_cpu_metric_over_80
|
||||
type: query
|
||||
address: 'http://prometheus.local.lan:9090'
|
||||
# Return 1 if cpu rate > 80%
|
||||
query: '(sum(rate(node_cpu_seconds_total{instance="router01.local.lan:9100",job="node",mode!~"idle"}[30s]))*100) > bool 80'
|
||||
timeout: 10
|
||||
- name: router01_net_down_rate
|
||||
# Range query. Return all metrics from a time range. Result will be averaged from these metrics. Time range will be provided by Grafana.
|
||||
type: query_range
|
||||
address: 'http://prometheus.local.lan:9090'
|
||||
query: 'rate(node_network_receive_bytes_total{device="igb0", instance="router01.local.lan:9100", job="node"}[30s])'
|
||||
timeout: 10
|
||||
- name: router01_net_up_rate
|
||||
type: query_range
|
||||
address: 'http://prometheus.local.lan:9090'
|
||||
query: 'rate(node_network_transmit_bytes_total{device="igb0", instance="router01.local.lan:9100", job="node"}[30s])'
|
||||
timeout: 10
|
||||
- name: router01_lan_down_rate
|
||||
type: query_range
|
||||
address: 'http://prometheus.local.lan:9090'
|
||||
query: 'rate(node_network_receive_bytes_total{device="ix3", instance="router01.local.lan:9100", job="node"}[30s])'
|
||||
timeout: 10
|
||||
- name: router01_lan_up_rate
|
||||
type: query_range
|
||||
address: 'http://prometheus.local.lan:9090'
|
||||
query: 'rate(node_network_transmit_bytes_total{device="ix3", instance="router01.local.lan:9100", job="node"}[30s])'
|
||||
timeout: 10
|
||||
- name: router01_net_down_rate_perten
|
||||
type: query
|
||||
address: 'http://prometheus.local.lan:9090'
|
||||
query: 'rate(node_network_receive_bytes_total{device="igb0", instance="router01.local.lan:9100", job="node"}[30s])/62500000*10'
|
||||
timeout: 10
|
||||
|
||||
# graphs identifies context for a nodegraph. You can have many contexts, and your grafana query will mention this context name.
|
||||
# For this example named "internet", grafana URL will be :
|
||||
|
Loading…
Reference in New Issue
Block a user