Skip to content

Commit

Permalink
modify rate to irate in grafana dashboards
Browse files Browse the repository at this point in the history
Signed-off-by: Kamesh Akella <kamesh.asp@gmail.com>
  • Loading branch information
kami619 committed Sep 5, 2024
1 parent fe57c4c commit ccd4b44
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(rate(http_server_requests_seconds_bucket{uri=~\"/realms/{realm}/protocol/{protocol}/(token|auth|logout)|/realms/{realm}/login-actions/authenticate\", le=\"0.25\", namespace=\"$namespace\", pod=\"$pod_name\"}[2m])) without (le) / rate(http_server_requests_seconds_count{uri=~\"/realms/{realm}/protocol/{protocol}/(token|auth|logout)|/realms/{realm}/login-actions/authenticate\", namespace=\"$namespace\", pod=\"$pod_name\"}[2m]) ",
"expr": "sum(irate(http_server_requests_seconds_bucket{uri=~\"/realms/{realm}/protocol/{protocol}/(token|auth|logout)|/realms/{realm}/login-actions/authenticate\", le=\"0.25\", namespace=\"$namespace\", pod=\"$pod_name\"}[2m])) without (le) / irate(http_server_requests_seconds_count{uri=~\"/realms/{realm}/protocol/{protocol}/(token|auth|logout)|/realms/{realm}/login-actions/authenticate\", namespace=\"$namespace\", pod=\"$pod_name\"}[2m]) ",
"format": "time_series",
"hide": false,
"instant": false,
Expand All @@ -148,7 +148,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "rate(vendor_statistics_hits{cache=\"realms\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]) / (rate(vendor_statistics_hits{cache=\"realms\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]) + rate(vendor_statistics_misses{cache=\"realms\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]))",
"expr": "irate(vendor_statistics_hits{cache=\"realms\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]) / (irate(vendor_statistics_hits{cache=\"realms\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]) + irate(vendor_statistics_misses{cache=\"realms\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]))",
"hide": false,
"legendFormat": "Realms cache hit ratio",
"range": true,
Expand All @@ -160,7 +160,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "rate(vendor_statistics_hits{cache=\"users\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]) / (rate(vendor_statistics_hits{cache=\"users\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]) + rate(vendor_statistics_misses{cache=\"users\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]))",
"expr": "irate(vendor_statistics_hits{cache=\"users\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]) / (irate(vendor_statistics_hits{cache=\"users\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]) + irate(vendor_statistics_misses{cache=\"users\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]))",
"hide": false,
"legendFormat": "Users cache hit ratio",
"range": true,
Expand Down Expand Up @@ -365,7 +365,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "histogram_quantile(0.99, sum(rate(http_server_requests_seconds_bucket{uri=~\"/realms/{realm}/protocol/{protocol}/(token|auth|logout)|/realms/{realm}/login-actions/authenticate\", namespace=\"$namespace\", pod=\"$pod_name\"}[2m])) by (le,uri))",
"expr": "histogram_quantile(0.99, sum(irate(http_server_requests_seconds_bucket{uri=~\"/realms/{realm}/protocol/{protocol}/(token|auth|logout)|/realms/{realm}/login-actions/authenticate\", namespace=\"$namespace\", pod=\"$pod_name\"}[2m])) by (le,uri))",
"legendFormat": "{{uri}}",
"range": true,
"refId": "A"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(rate(http_server_requests_seconds_bucket{uri=\"/realms/{realm}/protocol/{protocol}/token\", le=\"0.05\", namespace=\"$namespace\", pod=\"$pod_name\"}[2m])) without (le) / rate(http_server_requests_seconds_count{uri=\"/realms/{realm}/protocol/{protocol}/token\", namespace=\"$namespace\", pod=\"$pod_name\"}[2m])",
"expr": "sum(irate(http_server_requests_seconds_bucket{uri=\"/realms/{realm}/protocol/{protocol}/token\", le=\"0.05\", namespace=\"$namespace\", pod=\"$pod_name\"}[2m])) without (le) / irate(http_server_requests_seconds_count{uri=\"/realms/{realm}/protocol/{protocol}/token\", namespace=\"$namespace\", pod=\"$pod_name\"}[2m])",
"format": "time_series",
"hide": false,
"instant": false,
Expand All @@ -147,7 +147,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "rate(vendor_statistics_hits{cache=\"realms\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]) / (rate(vendor_statistics_hits{cache=\"realms\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]) + rate(vendor_statistics_misses{cache=\"realms\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]))",
"expr": "irate(vendor_statistics_hits{cache=\"realms\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]) / (irate(vendor_statistics_hits{cache=\"realms\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]) + irate(vendor_statistics_misses{cache=\"realms\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]))",
"hide": false,
"legendFormat": "Realms cache hit ratio",
"range": true,
Expand All @@ -159,7 +159,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "rate(vendor_statistics_hits{cache=\"users\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]) / (rate(vendor_statistics_hits{cache=\"users\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]) + rate(vendor_statistics_misses{cache=\"users\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]))",
"expr": "irate(vendor_statistics_hits{cache=\"users\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]) / (irate(vendor_statistics_hits{cache=\"users\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]) + irate(vendor_statistics_misses{cache=\"users\", namespace=\"${namespace}\", pod=\"$pod_name\"}[2m]))",
"hide": false,
"legendFormat": "Users cache hit ratio",
"range": true,
Expand Down Expand Up @@ -364,7 +364,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "histogram_quantile(0.99, sum(rate(http_server_requests_seconds_bucket{uri=\"/realms/{realm}/protocol/{protocol}/token\", namespace=\"$namespace\", pod=\"$pod_name\"}[2m])) by (le,uri))",
"expr": "histogram_quantile(0.99, sum(irate(http_server_requests_seconds_bucket{uri=\"/realms/{realm}/protocol/{protocol}/token\", namespace=\"$namespace\", pod=\"$pod_name\"}[2m])) by (le,uri))",
"legendFormat": "{{uri}}",
"range": true,
"refId": "A"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "rate(vendor_cache_container_stats_hits{namespace=\"${namespace}\", job=~\"infinispan-admin|${namespace}/keycloak-metrics\"}[2m]) / (rate(vendor_cache_container_stats_hits{namespace=\"${namespace}\", job=~\"infinispan-admin|${namespace}/keycloak-metrics\"}[2m]) + rate(vendor_cache_container_stats_misses{namespace=\"${namespace}\", job=~\"infinispan-admin|${namespace}/keycloak-metrics\"}[2m]))",
"expr": "irate(vendor_cache_container_stats_hits{namespace=\"${namespace}\", job=~\"infinispan-admin|${namespace}/keycloak-metrics\"}[2m]) / (irate(vendor_cache_container_stats_hits{namespace=\"${namespace}\", job=~\"infinispan-admin|${namespace}/keycloak-metrics\"}[2m]) + irate(vendor_cache_container_stats_misses{namespace=\"${namespace}\", job=~\"infinispan-admin|${namespace}/keycloak-metrics\"}[2m]))",
"legendFormat": "{{pod}}",
"range": true,
"refId": "A"
Expand Down Expand Up @@ -658,7 +658,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "rate(vendor_jgroups_red_get_dropped_messages{namespace=\"${namespace}\", job=~\"infinispan-admin|${namespace}/keycloak-metrics\"}[2m]) / rate(vendor_jgroups_red_get_total_messages{namespace=\"${namespace}\", job=~\"infinispan-admin|${namespace}/keycloak-metrics\"}[2m])",
"expr": "irate(vendor_jgroups_red_get_dropped_messages{namespace=\"${namespace}\", job=~\"infinispan-admin|${namespace}/keycloak-metrics\"}[2m]) / irate(vendor_jgroups_red_get_total_messages{namespace=\"${namespace}\", job=~\"infinispan-admin|${namespace}/keycloak-metrics\"}[2m])",
"legendFormat": "{{pod}}",
"range": true,
"refId": "A"
Expand Down Expand Up @@ -754,7 +754,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "rate(vendor_jgroups_red_get_total_messages{namespace=\"${namespace}\", job=~\"infinispan-admin|$namespace/keycloak-metrics\"}[2m])",
"expr": "irate(vendor_jgroups_red_get_total_messages{namespace=\"${namespace}\", job=~\"infinispan-admin|$namespace/keycloak-metrics\"}[2m])",
"legendFormat": "{{pod}}",
"range": true,
"refId": "A"
Expand Down Expand Up @@ -958,7 +958,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "rate(vendor_statistics_stores{cache=\"$distributed_cache\", job=~\"infinispan-admin|$namespace/keycloak-metrics\"}[2m])",
"expr": "irate(vendor_statistics_stores{cache=\"$distributed_cache\", job=~\"infinispan-admin|$namespace/keycloak-metrics\"}[2m])",
"legendFormat": "{{pod}}",
"range": true,
"refId": "A"
Expand Down Expand Up @@ -1244,7 +1244,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "sum by (pod,site) (rate(vendor_rpc_manager_number_xsite_requests_sent_to_site{job=\"infinispan-admin\", cache=\"$distributed_cache\", namespace=\"$namespace\"}[2m]))",
"expr": "sum by (pod,site) (irate(vendor_rpc_manager_number_xsite_requests_sent_to_site{job=\"infinispan-admin\", cache=\"$distributed_cache\", namespace=\"$namespace\"}[2m]))",
"legendFormat": "{{pod}} -> {{site}} - sent",
"range": true,
"refId": "A"
Expand All @@ -1255,7 +1255,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "sum by (pod,site) (rate(vendor_rpc_manager_number_xsite_requests_received_from_site{job=\"infinispan-admin\", cache=\"$distributed_cache\", namespace=\"$namespace\"}[2m]))",
"expr": "sum by (pod,site) (irate(vendor_rpc_manager_number_xsite_requests_received_from_site{job=\"infinispan-admin\", cache=\"$distributed_cache\", namespace=\"$namespace\"}[2m]))",
"hide": false,
"legendFormat": "{{pod}} <- {{site}} - received",
"range": true,
Expand Down Expand Up @@ -1354,7 +1354,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "rate(vendor_rpc_manager_cross_site_replication_times_seconds_sum{job=\"infinispan-admin\", cache=\"$distributed_cache\", namespace=\"$namespace\"} [2m]) / rate(vendor_rpc_manager_cross_site_replication_times_seconds_count{job=\"infinispan-admin\", cache=\"$distributed_cache\", namespace=\"$namespace\"} [2m])",
"expr": "irate(vendor_rpc_manager_cross_site_replication_times_seconds_sum{job=\"infinispan-admin\", cache=\"$distributed_cache\", namespace=\"$namespace\"} [2m]) / irate(vendor_rpc_manager_cross_site_replication_times_seconds_count{job=\"infinispan-admin\", cache=\"$distributed_cache\", namespace=\"$namespace\"} [2m])",
"legendFormat": "{{pod}}",
"range": true,
"refId": "A"
Expand Down Expand Up @@ -1560,7 +1560,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "rate(vendor_statistics_hits{cache=\"${local_cache}\", namespace=\"${namespace}\", job=\"${namespace}/keycloak-metrics\"}[2m]) / (rate(vendor_statistics_hits{cache=\"${local_cache}\", namespace=\"${namespace}\", job=\"${namespace}/keycloak-metrics\"}[2m]) + rate(vendor_statistics_misses{cache=\"${local_cache}\", namespace=\"${namespace}\", job=\"${namespace}/keycloak-metrics\"}[2m]))",
"expr": "irate(vendor_statistics_hits{cache=\"${local_cache}\", namespace=\"${namespace}\", job=\"${namespace}/keycloak-metrics\"}[2m]) / (irate(vendor_statistics_hits{cache=\"${local_cache}\", namespace=\"${namespace}\", job=\"${namespace}/keycloak-metrics\"}[2m]) + irate(vendor_statistics_misses{cache=\"${local_cache}\", namespace=\"${namespace}\", job=\"${namespace}/keycloak-metrics\"}[2m]))",
"legendFormat": "{{pod}}",
"range": true,
"refId": "A"
Expand Down
28 changes: 14 additions & 14 deletions provision/minikube/monitoring/dashboards/keycloak-perf-tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "rate(node_disk_reads_completed_total[2m])",
"expr": "irate(node_disk_reads_completed_total[2m])",
"hide": false,
"legendFormat": "{{device}} : {{instance}}",
"range": true,
Expand Down Expand Up @@ -750,7 +750,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "rate(node_disk_writes_completed_total[2m])",
"expr": "irate(node_disk_writes_completed_total[2m])",
"hide": false,
"legendFormat": "{{device}} : {{instance}}",
"range": true,
Expand Down Expand Up @@ -849,7 +849,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "rate(node_disk_writes_completed_total[2m]) + rate(node_disk_reads_completed_total[2m])",
"expr": "irate(node_disk_writes_completed_total[2m]) + irate(node_disk_reads_completed_total[2m])",
"hide": false,
"legendFormat": "{{device}} : {{instance}}",
"range": true,
Expand Down Expand Up @@ -965,7 +965,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(irate(container_cpu_usage_seconds_total{job=\"kubelet\", namespace=\"$namespace\",container!=\"\"}\r\n[$__rate_interval])) without (cpu)",
"expr": "sum(iirate(container_cpu_usage_seconds_total{job=\"kubelet\", namespace=\"$namespace\",container!=\"\"}\r\n[$__rate_interval])) without (cpu)",
"hide": false,
"legendFormat": "{{pod}}",
"range": true,
Expand Down Expand Up @@ -1068,7 +1068,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "irate(container_cpu_cfs_throttled_seconds_total{namespace=\"$namespace\",container=\"keycloak\"}[1m])",
"expr": "iirate(container_cpu_cfs_throttled_seconds_total{namespace=\"$namespace\",container=\"keycloak\"}[1m])",
"hide": false,
"legendFormat": "{{pod}}",
"range": true,
Expand Down Expand Up @@ -1274,7 +1274,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(irate(container_network_receive_bytes_total{job=\"kubelet\",namespace=\"$namespace\"}[1m])) without (interface)",
"expr": "sum(iirate(container_network_receive_bytes_total{job=\"kubelet\",namespace=\"$namespace\"}[1m])) without (interface)",
"hide": false,
"legendFormat": "{{pod}} receive",
"range": true,
Expand All @@ -1286,7 +1286,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "- sum(rate(container_network_transmit_bytes_total{job=\"kubelet\",namespace=\"$namespace\"}[$__rate_interval])) without (interface)",
"expr": "- sum(irate(container_network_transmit_bytes_total{job=\"kubelet\",namespace=\"$namespace\"}[$__rate_interval])) without (interface)",
"hide": false,
"legendFormat": "{{pod}} transmit",
"range": true,
Expand Down Expand Up @@ -2300,7 +2300,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "rate(jvm_gc_pause_seconds_sum{namespace=\"$namespace\"}[$__rate_interval])",
"expr": "irate(jvm_gc_pause_seconds_sum{namespace=\"$namespace\"}[$__rate_interval])",
"format": "time_series",
"hide": false,
"instant": false,
Expand All @@ -2315,7 +2315,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "rate(jvm_gc_pause_seconds_count{namespace=\"$namespace\"}[$__rate_interval])",
"expr": "irate(jvm_gc_pause_seconds_count{namespace=\"$namespace\"}[$__rate_interval])",
"format": "time_series",
"hide": true,
"instant": false,
Expand Down Expand Up @@ -2548,7 +2548,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "rate(jvm_gc_memory_allocated_bytes_total{namespace=\"$namespace\"}[$__rate_interval])",
"expr": "irate(jvm_gc_memory_allocated_bytes_total{namespace=\"$namespace\"}[$__rate_interval])",
"format": "time_series",
"instant": false,
"legendFormat": "{{ pod }} : JVM GC Memory Alloc Total",
Expand All @@ -2562,7 +2562,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "rate(jvm_gc_memory_promoted_bytes_total{namespace=\"$namespace\"}[$__rate_interval])",
"expr": "irate(jvm_gc_memory_promoted_bytes_total{namespace=\"$namespace\"}[$__rate_interval])",
"format": "time_series",
"hide": false,
"instant": false,
Expand Down Expand Up @@ -3368,7 +3368,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "100 * (rate(pg_stat_database_blks_hit{datname=\"keycloak\",namespace=\"${namespace}\"}[$__rate_interval]) /\n((rate(pg_stat_database_blks_hit{datname=\"keycloak\",namespace=\"${namespace}\"}[$__rate_interval]) +\nrate(pg_stat_database_blks_read{datname=\"keycloak\",namespace=\"${namespace}\"}[$__rate_interval]))>0))",
"expr": "100 * (irate(pg_stat_database_blks_hit{datname=\"keycloak\",namespace=\"${namespace}\"}[$__rate_interval]) /\n((irate(pg_stat_database_blks_hit{datname=\"keycloak\",namespace=\"${namespace}\"}[$__rate_interval]) +\nirate(pg_stat_database_blks_read{datname=\"keycloak\",namespace=\"${namespace}\"}[$__rate_interval]))>0))",
"legendFormat": "cache hit rate",
"range": true,
"refId": "A"
Expand Down Expand Up @@ -3464,7 +3464,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "rate(pg_stat_bgwriter_checkpoints_req{namespace=\"${namespace}\"}[5m]) /\n(rate(pg_stat_bgwriter_checkpoints_req{namespace=\"${namespace}\"}[5m]) + rate(pg_stat_bgwriter_checkpoints_timed{namespace=\"${namespace}\"}[5m])) * 100",
"expr": "irate(pg_stat_bgwriter_checkpoints_req{namespace=\"${namespace}\"}[5m]) /\n(irate(pg_stat_bgwriter_checkpoints_req{namespace=\"${namespace}\"}[5m]) + irate(pg_stat_bgwriter_checkpoints_timed{namespace=\"${namespace}\"}[5m])) * 100",
"legendFormat": "requested checkpoint rate",
"range": true,
"refId": "A"
Expand Down Expand Up @@ -3560,7 +3560,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "rate(pg_stat_database_deadlocks{datname=\"keycloak\",namespace=\"${namespace}\"}[$__rate_interval])",
"expr": "irate(pg_stat_database_deadlocks{datname=\"keycloak\",namespace=\"${namespace}\"}[$__rate_interval])",
"legendFormat": "{{pod}} : pg_stat_db_deadlocks",
"range": true,
"refId": "A"
Expand Down

0 comments on commit ccd4b44

Please sign in to comment.