Update README, set timeout as default 10 in configuration sample
This commit is contained in:
		@ -40,3 +40,9 @@ Sending POST on /reload :
 | 
				
			|||||||
curl -XPOST http://my-nodegopher-host:8080/reload
 | 
					curl -XPOST http://my-nodegopher-host:8080/reload
 | 
				
			||||||
{"message":"configuration successfully reloaded"}
 | 
					{"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'
 | 
					language: 'english'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# datasource describe a way to get prometheus metrics.
 | 
					# datasource describe a way to get prometheus metrics.
 | 
				
			||||||
@ -7,51 +7,44 @@ language: 'english'
 | 
				
			|||||||
# - address: the address of prometheus.
 | 
					# - address: the address of prometheus.
 | 
				
			||||||
# - query: prometheus query. Same as typed in prometheus graph page.
 | 
					# - 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.
 | 
					# - 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:
 | 
					datasources:
 | 
				
			||||||
  - name: prom_samples_per_sec
 | 
					  - name: prom_samples_per_sec
 | 
				
			||||||
    type: query
 | 
					    type: query
 | 
				
			||||||
    address: 'http://prometheus.local.lan:9090'
 | 
					    address: 'http://prometheus.local.lan:9090'
 | 
				
			||||||
    query: 'rate(prometheus_tsdb_head_samples_appended_total{type="float"}[10m])'
 | 
					    query: 'rate(prometheus_tsdb_head_samples_appended_total{type="float"}[10m])'
 | 
				
			||||||
    timeout: 10
 | 
					    timeout: 15
 | 
				
			||||||
  - name: node_cpu_metric
 | 
					  - name: node_cpu_metric
 | 
				
			||||||
    # Simple query, return an instant metric
 | 
					    # Simple query, return an instant metric
 | 
				
			||||||
    type: query
 | 
					    type: query
 | 
				
			||||||
    address: 'http://prometheus.local.lan:9090'
 | 
					    address: 'http://prometheus.local.lan:9090'
 | 
				
			||||||
    query: 'sum(rate(node_cpu_seconds_total{instance="router01.local.lan:9100",job="node",mode!~"idle"}[30s]))*100'
 | 
					    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
 | 
					  - name: node_cpu_metric_over_80
 | 
				
			||||||
    type: query
 | 
					    type: query
 | 
				
			||||||
    address: 'http://prometheus.local.lan:9090'
 | 
					    address: 'http://prometheus.local.lan:9090'
 | 
				
			||||||
    # Return 1 if cpu rate > 80%
 | 
					    # 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'
 | 
					    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
 | 
					  - 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.
 | 
					    # 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
 | 
					    type: query_range
 | 
				
			||||||
    address: 'http://prometheus.local.lan:9090'
 | 
					    address: 'http://prometheus.local.lan:9090'
 | 
				
			||||||
    query: 'rate(node_network_receive_bytes_total{device="igb0", instance="router01.local.lan:9100", job="node"}[30s])'
 | 
					    query: 'rate(node_network_receive_bytes_total{device="igb0", instance="router01.local.lan:9100", job="node"}[30s])'
 | 
				
			||||||
    timeout: 10
 | 
					 | 
				
			||||||
  - name: router01_net_up_rate
 | 
					  - name: router01_net_up_rate
 | 
				
			||||||
    type: query_range
 | 
					    type: query_range
 | 
				
			||||||
    address: 'http://prometheus.local.lan:9090'
 | 
					    address: 'http://prometheus.local.lan:9090'
 | 
				
			||||||
    query: 'rate(node_network_transmit_bytes_total{device="igb0", instance="router01.local.lan:9100", job="node"}[30s])'
 | 
					    query: 'rate(node_network_transmit_bytes_total{device="igb0", instance="router01.local.lan:9100", job="node"}[30s])'
 | 
				
			||||||
    timeout: 10
 | 
					 | 
				
			||||||
  - name: router01_lan_down_rate
 | 
					  - name: router01_lan_down_rate
 | 
				
			||||||
    type: query_range
 | 
					    type: query_range
 | 
				
			||||||
    address: 'http://prometheus.local.lan:9090'
 | 
					    address: 'http://prometheus.local.lan:9090'
 | 
				
			||||||
    query: 'rate(node_network_receive_bytes_total{device="ix3", instance="router01.local.lan:9100", job="node"}[30s])'
 | 
					    query: 'rate(node_network_receive_bytes_total{device="ix3", instance="router01.local.lan:9100", job="node"}[30s])'
 | 
				
			||||||
    timeout: 10
 | 
					 | 
				
			||||||
  - name: router01_lan_up_rate
 | 
					  - name: router01_lan_up_rate
 | 
				
			||||||
    type: query_range
 | 
					    type: query_range
 | 
				
			||||||
    address: 'http://prometheus.local.lan:9090'
 | 
					    address: 'http://prometheus.local.lan:9090'
 | 
				
			||||||
    query: 'rate(node_network_transmit_bytes_total{device="ix3", instance="router01.local.lan:9100", job="node"}[30s])'
 | 
					    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
 | 
					  - name: router01_net_down_rate_perten
 | 
				
			||||||
    type: query
 | 
					    type: query
 | 
				
			||||||
    address: 'http://prometheus.local.lan:9090'
 | 
					    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'
 | 
					    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.
 | 
					# 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 :
 | 
					#  For this example named "internet", grafana URL will be :
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user