-
Notifications
You must be signed in to change notification settings - Fork 5
/
config.sample.toml
45 lines (39 loc) · 2.42 KB
/
config.sample.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
[app]
log_level = "debug" # To enable debug logging, level should be `debug`.
max_retries = 3 # Maximum number of retries for a failed request.
retry_interval = "5s" # Interval at which the app should retry if the previous request failed.
sync_interval = "5m" # Interval at which the app should fetch data from metrics store.
[lama.nse]
exchange_id = 1 # 1=National Stock Exchange
idle_timeout = "5m" # Idle timeout for HTTP requests
login_id = "redacted"
member_id = "redacted"
password = "redacted"
timeout = "30s" # Timeout for HTTP requests
url = "https://lama.nse.internal" # Endpoint for NSE LAMA API Gateway
[prometheus]
config_path = "/etc/prometheus/prometheus.yml" # Path to Prometheus config file. This is used to load a list of hosts to fetch metrics for.
endpoint = "http://prometheus:9090" # Endpoint for Prometheus API
idle_timeout = "5m" # Idle timeout for HTTP requests
max_idle_conns = 10
password = "redacted" # HTTP Basic Auth password
query_path = "/api/v1/query" # Endpoint for Prometheus query API
timeout = "10s" # Timeout for HTTP requests
username = "redacted" # HTTP Basic Auth username
[metrics.hardware] # Define Prometheus queries for hardware metrics
# List of hosts to fetch metrics for. Keep this empty to fetch metrics for all hosts defined in `prometheus.config_path` file.
cpu = '100 * (1 - avg(rate(node_cpu_seconds_total{mode="idle", hostname="%s"}[5m])))'
disk = '100 - ((node_filesystem_avail_bytes{hostname="%s",device!~"rootfs"} * 100) / node_filesystem_size_bytes{hostname="%s",device!~"rootfs"})'
hosts = []
memory = '(1 - ((node_memory_MemFree_bytes{hostname="%s"} + node_memory_Buffers_bytes{hostname="%s"} + node_memory_Cached_bytes{hostname="%s"}) / node_memory_MemTotal_bytes{hostname="%s"})) * 100'
uptime = '(node_time_seconds{hostname="%s"} - node_boot_time_seconds{hostname="%s"}) / 60'
[metrics.database] # Define Prometheus queries for db metrics
hosts = []
status = 'up{hostname="%s"}'
[metrics.network]
hosts = []
packet_errors = 'sum(rate(node_network_receive_errs_total{hostname="%s"}[5m])) + sum(rate(node_network_transmit_errs_total{hostname="%s"}[5m]))'
[metrics.application]
failure_count = 'sum(sum without (hostname, instance, server) (rate(haproxy_server_http_responses_total{job="my-app",code="5xx",proxy="my-backend"}[5m]))) by (code)'
hosts = []
throughput = 'sum(sum without (hostname, instance, server) (rate(haproxy_server_http_responses_total{job="my-app",proxy="my-backend"}[5m]))) by (proxy)'