[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-grid5k] 79/189: add histograms
From: |
gnunet |
Subject: |
[taler-grid5k] 79/189: add histograms |
Date: |
Thu, 28 Apr 2022 10:47:29 +0200 |
This is an automated email from the git hooks/post-receive script.
marco-boss pushed a commit to branch master
in repository grid5k.
commit b6b72c873ea41ddf7e00bd0cf31cfdcfa6200c89
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Sun Mar 13 09:05:46 2022 +0100
add histograms
---
configs/etc/monitor/postgres-exporter.yaml | 142 ++++++++++++++---------------
configs/etc/monitor/promtail.yaml | 32 +++++--
2 files changed, 97 insertions(+), 77 deletions(-)
diff --git a/configs/etc/monitor/postgres-exporter.yaml
b/configs/etc/monitor/postgres-exporter.yaml
index 67c3562..1f4eb37 100644
--- a/configs/etc/monitor/postgres-exporter.yaml
+++ b/configs/etc/monitor/postgres-exporter.yaml
@@ -158,77 +158,77 @@ pg_database:
usage: "GAUGE"
description: "Disk space used by the database"
-pg_stat_statements:
- query: "SELECT t2.rolname, t3.datname, substring(query from 1 for 265) as
query, calls, total_exec_time / 1000 as total_time_seconds, min_exec_time /
1000 as min_time_seconds, max_exec_time / 1000 as max_time_seconds,
mean_exec_time / 1000 as mean_time_seconds, stddev_exec_time / 1000 as
stddev_time_seconds, rows, shared_blks_hit, shared_blks_read,
shared_blks_dirtied, shared_blks_written, local_blks_hit, local_blks_read,
local_blks_dirtied, local_blks_written, temp_blks_read, temp_blk [...]
- master: true
- metrics:
- - rolname:
- usage: "LABEL"
- description: "Name of user"
- - datname:
- usage: "LABEL"
- description: "Name of database"
- - query:
- usage: "LABEL"
- description: "Query"
- - calls:
- usage: "COUNTER"
- description: "Number of times executed"
- - total_time_seconds:
- usage: "COUNTER"
- description: "Total time spent in the statement, in seconds"
- - min_time_seconds:
- usage: "GAUGE"
- description: "Minimum time spent in the statement, in seconds"
- - max_time_seconds:
- usage: "GAUGE"
- description: "Maximum time spent in the statement, in seconds"
- - mean_time_seconds:
- usage: "GAUGE"
- description: "Mean time spent in the statement, in seconds"
- - stddev_time_seconds:
- usage: "GAUGE"
- description: "Population standard deviation of time spent in the
statement, in seconds"
- - rows:
- usage: "COUNTER"
- description: "Total number of rows retrieved or affected by the
statement"
- - shared_blks_hit:
- usage: "COUNTER"
- description: "Total number of shared block cache hits by the statement"
- - shared_blks_read:
- usage: "COUNTER"
- description: "Total number of shared blocks read by the statement"
- - shared_blks_dirtied:
- usage: "COUNTER"
- description: "Total number of shared blocks dirtied by the statement"
- - shared_blks_written:
- usage: "COUNTER"
- description: "Total number of shared blocks written by the statement"
- - local_blks_hit:
- usage: "COUNTER"
- description: "Total number of local block cache hits by the statement"
- - local_blks_read:
- usage: "COUNTER"
- description: "Total number of local blocks read by the statement"
- - local_blks_dirtied:
- usage: "COUNTER"
- description: "Total number of local blocks dirtied by the statement"
- - local_blks_written:
- usage: "COUNTER"
- description: "Total number of local blocks written by the statement"
- - temp_blks_read:
- usage: "COUNTER"
- description: "Total number of temp blocks read by the statement"
- - temp_blks_written:
- usage: "COUNTER"
- description: "Total number of temp blocks written by the statement"
- - blk_read_time_seconds:
- usage: "COUNTER"
- description: "Total time the statement spent reading blocks, in
seconds (if track_io_timing is enabled, otherwise zero)"
- - blk_write_time_seconds:
- usage: "COUNTER"
- description: "Total time the statement spent writing blocks, in
seconds (if track_io_timing is enabled, otherwise zero)"
-
+#pg_stat_statements:
+# query: "SELECT t2.rolname, t3.datname, queryid, calls, total_exec_time /
1000 as total_time_seconds, min_exec_time / 1000 as min_time_seconds,
max_exec_time / 1000 as max_time_seconds, mean_exec_time / 1000 as
mean_time_seconds, stddev_exec_time / 1000 as stddev_time_seconds, rows,
shared_blks_hit, shared_blks_read, shared_blks_dirtied, shared_blks_written,
local_blks_hit, local_blks_read, local_blks_dirtied, local_blks_written,
temp_blks_read, temp_blks_written, blk_read_time / 1000 [...]
+# master: true
+# metrics:
+# - rolname:
+# usage: "LABEL"
+# description: "Name of user"
+# - datname:
+# usage: "LABEL"
+# description: "Name of database"
+# - queryid:
+# usage: "LABEL"
+# description: "Query"
+# - calls:
+# usage: "COUNTER"
+# description: "Number of times executed"
+# - total_time_seconds:
+# usage: "COUNTER"
+# description: "Total time spent in the statement, in seconds"
+# - min_time_seconds:
+# usage: "GAUGE"
+# description: "Minimum time spent in the statement, in seconds"
+# - max_time_seconds:
+# usage: "GAUGE"
+# description: "Maximum time spent in the statement, in seconds"
+# - mean_time_seconds:
+# usage: "GAUGE"
+# description: "Mean time spent in the statement, in seconds"
+# - stddev_time_seconds:
+# usage: "GAUGE"
+# description: "Population standard deviation of time spent in the
statement, in seconds"
+# - rows:
+# usage: "COUNTER"
+# description: "Total number of rows retrieved or affected by the
statement"
+# - shared_blks_hit:
+# usage: "COUNTER"
+# description: "Total number of shared block cache hits by the
statement"
+# - shared_blks_read:
+# usage: "COUNTER"
+# description: "Total number of shared blocks read by the statement"
+# - shared_blks_dirtied:
+# usage: "COUNTER"
+# description: "Total number of shared blocks dirtied by the statement"
+# - shared_blks_written:
+# usage: "COUNTER"
+# description: "Total number of shared blocks written by the statement"
+# - local_blks_hit:
+# usage: "COUNTER"
+# description: "Total number of local block cache hits by the statement"
+# - local_blks_read:
+# usage: "COUNTER"
+# description: "Total number of local blocks read by the statement"
+# - local_blks_dirtied:
+# usage: "COUNTER"
+# description: "Total number of local blocks dirtied by the statement"
+# - local_blks_written:
+# usage: "COUNTER"
+# description: "Total number of local blocks written by the statement"
+# - temp_blks_read:
+# usage: "COUNTER"
+# description: "Total number of temp blocks read by the statement"
+# - temp_blks_written:
+# usage: "COUNTER"
+# description: "Total number of temp blocks written by the statement"
+# - blk_read_time_seconds:
+# usage: "COUNTER"
+# description: "Total time the statement spent reading blocks, in
seconds (if track_io_timing is enabled, otherwise zero)"
+# - blk_write_time_seconds:
+# usage: "COUNTER"
+# description: "Total time the statement spent writing blocks, in
seconds (if track_io_timing is enabled, otherwise zero)"
+#
#pg_process_idle:
# query: |
# WITH
diff --git a/configs/etc/monitor/promtail.yaml
b/configs/etc/monitor/promtail.yaml
index 172f098..94d98c7 100644
--- a/configs/etc/monitor/promtail.yaml
+++ b/configs/etc/monitor/promtail.yaml
@@ -32,23 +32,43 @@ scrape_configs:
selector: '{job="proxy"}'
stages:
- regex:
- expression:
'.*uri=/(?P<ep>[a-zA-Z]+)(?:/\w+)?(?:/(?P<act>[a-zA-Z]+))?
s=(?P<status>\d{3}).*'
+ expression:
'.*uri=/(?P<ep>[a-zA-Z]+)(?:/\w+)?(?:/(?P<act>[a-zA-Z]+))?
s=(?P<status>\d{3}).*rt=(?P<response_time>\d+\.\d+) rl=(?P<request_length>\d+)
bs=(?P<bytes_sent>\d+).*'
- template:
source: endpoint
template: '{{ printf "%s-%s" .ep .act | trimSuffix "-" }}'
- labels:
endpoint:
status:
- - match:
- selector: '{job="proxy"} |~ "s=200" |~ "(/withdraw|/deposit)"'
- stages:
- metrics:
- tps:
+ total_requests:
+ prefix: 'taler_requests_'
type: Counter
- description: "Transactions per Second (successful requests to
/withdraw and /deposit)"
+ description: "Total Requests"
config:
match_all: true
action: inc
+ #
https://www.robustperception.io/how-does-a-prometheus-histogram-work
+ request_length:
+ prefix: 'taler_requests_'
+ type: Histogram
+ description: "Request Length reported from Nginx"
+ source: request_length
+ config:
+ buckets: [1,10,50,100,200,500,1000,2000,5000]
+ bytes_sent:
+ prefix: 'taler_requests_'
+ type: Histogram
+ description: "Number of bytes sent, reported from Nginx"
+ source: bytes_sent
+ config:
+ buckets: [1,10,50,100,200,500,1000,2000,5000]
+ response_time_hist:
+ prefix: 'taler_requests_'
+ type: Histogram
+ description: "Time taken for Nginx to respond"
+ source: response_time
+ config:
+ buckets:
[0.001,0.0025,0.005,0.010,0.025,0.050,0.1,0.25,0.5,1,2,5]
- job_name: wallet
syslog:
listen_address: 0.0.0.0:1516
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-grid5k] 90/189: add doc, (continued)
- [taler-grid5k] 90/189: add doc, gnunet, 2022/04/28
- [taler-grid5k] 77/189: test custom metrics, gnunet, 2022/04/28
- [taler-grid5k] 116/189: fix verbose output, gnunet, 2022/04/28
- [taler-grid5k] 124/189: enable admin api for prometheus in order to test snapshots, gnunet, 2022/04/28
- [taler-grid5k] 75/189: also separate wallet from the main syslog receiver, gnunet, 2022/04/28
- [taler-grid5k] 80/189: change denominations, gnunet, 2022/04/28
- [taler-grid5k] 62/189: fix lookahead sign, gnunet, 2022/04/28
- [taler-grid5k] 84/189: cleaner exchange setup, gnunet, 2022/04/28
- [taler-grid5k] 118/189: add sharding logic, gnunet, 2022/04/28
- [taler-grid5k] 105/189: work towards parsing logs, gnunet, 2022/04/28
- [taler-grid5k] 79/189: add histograms,
gnunet <=
- [taler-grid5k] 108/189: update explain.py - multiline params not working yet - needs some style improvements, gnunet, 2022/04/28
- [taler-grid5k] 99/189: add explain analyzer, gnunet, 2022/04/28
- [taler-grid5k] 88/189: fix build, gnunet, 2022/04/28
- [taler-grid5k] 95/189: fix, gnunet, 2022/04/28
- [taler-grid5k] 109/189: update promtail message size, gnunet, 2022/04/28
- [taler-grid5k] 117/189: some db config, gnunet, 2022/04/28
- [taler-grid5k] 64/189: fix, gnunet, 2022/04/28
- [taler-grid5k] 96/189: fixes, add lookahead sign as param, gnunet, 2022/04/28
- [taler-grid5k] 70/189: fix, gnunet, 2022/04/28
- [taler-grid5k] 120/189: update postgres exporter to work when there is no merchant, update grafana dashboards, gnunet, 2022/04/28