Skip to content

Commit

Permalink
change metric names from ccp_container to ccp_nodemx, update dashboar…
Browse files Browse the repository at this point in the history
…ds with new names, remove invalid panel links
  • Loading branch information
pmereddy1 committed Aug 7, 2020
1 parent ab8c2c3 commit 4c13eb5
Show file tree
Hide file tree
Showing 8 changed files with 200 additions and 111 deletions.
38 changes: 19 additions & 19 deletions exporter/postgres/queries_containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Begin File: pod_metrics.yml
#
###
ccp_container_network:
query: "SELECT interface,tx_bytes,tx_packets, rx_bytes,rx_packets from public.proc_network_stats()"
ccp_nodemx_network:
query: "SELECT interface,tx_bytes,tx_packets, rx_bytes,rx_packets from monitor.proc_network_stats()"
metrics:
- interface:
usage: "LABEL"
Expand All @@ -21,16 +21,16 @@ ccp_container_network:
usage: "GAUGE"
description: "Number of packets received"

ccp_container_process:
query: "SELECT public.cgroup_process_count() as count"
ccp_nodemx_process:
query: "SELECT monitor.cgroup_process_count() as count"
metrics:
- count:
usage: "GAUGE"
description: "Total number of processes on database container"


ccp_container_mem:
query: "SELECT public.kdapi_scalar_bigint('mem_request') as request, public.kdapi_scalar_bigint('mem_limit') as limit, (select val from cgroup_setof_kv('memory.stat') where key='cache') as cache, (select val from cgroup_setof_kv('memory.stat') where key='rss') as rss, (select val from cgroup_setof_kv('memory.stat') where key='shmem') as shmem, (select val from cgroup_setof_kv('memory.stat') where key='mapped_file') as mapped_file, (select val from cgroup_setof_kv('memory.stat') where key='dirty') as dirty, (select val from cgroup_setof_kv('memory.stat') where key='active_anon') as active_anon, (select val from cgroup_setof_kv('memory.stat') where key='inactive_anon') as inactive_anon, (select val from cgroup_setof_kv('memory.stat') where key='active_file') as active_file, (select val from cgroup_setof_kv('memory.stat') where key='inactive_file') as inactive_file"
ccp_nodemx_mem:
query: "SELECT monitor.kdapi_scalar_bigint('mem_request') as request, monitor.kdapi_scalar_bigint('mem_limit') as limit, (select val from monitor.cgroup_setof_kv('memory.stat') where key='cache') as cache, (select val from monitor.cgroup_setof_kv('memory.stat') where key='rss') as rss, (select val from monitor.cgroup_setof_kv('memory.stat') where key='shmem') as shmem, (select val from monitor.cgroup_setof_kv('memory.stat') where key='mapped_file') as mapped_file, (select val from monitor.cgroup_setof_kv('memory.stat') where key='dirty') as dirty, (select val from monitor.cgroup_setof_kv('memory.stat') where key='active_anon') as active_anon, (select val from monitor.cgroup_setof_kv('memory.stat') where key='inactive_anon') as inactive_anon, (select val from monitor.cgroup_setof_kv('memory.stat') where key='active_file') as active_file, (select val from monitor.cgroup_setof_kv('memory.stat') where key='inactive_file') as inactive_file"
metrics:
- request:
usage: "GAUGE"
Expand Down Expand Up @@ -70,8 +70,8 @@ ccp_container_mem:
description: "Total bytes of file-backed memory on inactive LRU list"


ccp_container_cpu:
query: "SELECT public.kdapi_scalar_bigint('cpu_request') as request, public.kdapi_scalar_bigint('cpu_limit') as limit"
ccp_nodemx_cpu:
query: "SELECT monitor.kdapi_scalar_bigint('cpu_request') as request, monitor.kdapi_scalar_bigint('cpu_limit') as limit"
metrics:
- request:
usage: "GAUGE"
Expand All @@ -80,8 +80,8 @@ ccp_container_cpu:
usage: "GAUGE"
description: "CPU limit value in milli cores"

ccp_container_cpucfs:
query: "SELECT cgroup_scalar_bigint('cpu.cfs_period_us') as period_us, cgroup_scalar_bigint('cpu.cfs_quota_us') as quota_us"
ccp_nodemx_cpucfs:
query: "SELECT monitor.cgroup_scalar_bigint('cpu.cfs_period_us') as period_us, monitor.cgroup_scalar_bigint('cpu.cfs_quota_us') as quota_us"
metrics:
- period_us:
usage: "GAUGE"
Expand All @@ -90,15 +90,15 @@ ccp_container_cpucfs:
usage: "GAUGE"
description: "the length of a period (in microseconds)"

ccp_container_cpuacct:
query: "SELECT cgroup_scalar_bigint('cpuacct.usage') as usage"
ccp_nodemx_cpuacct:
query: "SELECT monitor.cgroup_scalar_bigint('cpuacct.usage') as usage"
metrics:
- usage:
usage: "GAUGE"
description: "CPU usage in nanoseconds"

ccp_container_cpustat:
query: "select (SELECT val as nr_periods FROM cgroup_setof_kv('cpu.stat') where key='nr_periods'), (SELECT val as nr_throttled FROM cgroup_setof_kv('cpu.stat') where key='nr_throttled'), (SELECT val as throttled_time FROM cgroup_setof_kv('cpu.stat') where key='throttled_time')"
ccp_nodemx_cpustat:
query: "select (SELECT val as nr_periods FROM monitor.cgroup_setof_kv('cpu.stat') where key='nr_periods'), (SELECT val as nr_throttled FROM monitor.cgroup_setof_kv('cpu.stat') where key='nr_throttled'), (SELECT val as throttled_time FROM monitor.cgroup_setof_kv('cpu.stat') where key='throttled_time')"
metrics:
- nr_threads:
usage: "GAUGE"
Expand All @@ -108,14 +108,14 @@ ccp_container_cpustat:
description: "number of runnable periods in which the application used its entire quota and was throttled"
- throttled_time:
usage: "GAUGE"
description: "sum total amount of time individual threads within the cgroup were throttled"
description: "sum total amount of time individual threads within the monitor.cgroup were throttled"


ccp_container_data_disk:
ccp_nodemx_data_disk:
query: "SELECT mount_point, fs_type,reads_completed_successfully as reads, sectors_read, writes_completed as writes,sectors_written, total_bytes,available_bytes,total_file_nodes,free_file_nodes
FROM proc_mountinfo() m
JOIN proc_diskstats() d USING (major_number, minor_number)
JOIN fsinfo(m.mount_point) f USING (major_number, minor_number)
FROM monitor.proc_mountinfo() m
JOIN monitor.proc_diskstats() d USING (major_number, minor_number)
JOIN monitor.fsinfo(m.mount_point) f USING (major_number, minor_number)
WHERE m.mount_point like '/pg%' or m.mount_point like '/tablespace%'"
metrics:
- mount_point:
Expand Down
16 changes: 7 additions & 9 deletions grafana/containers/crud_details.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"annotations": {
"list": [
{
"$$hashKey": "object:111",
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
Expand All @@ -17,7 +16,7 @@
"gnetId": null,
"graphTooltip": 0,
"id": 3,
"iteration": 1596723524049,
"iteration": 1596814000168,
"links": [
{
"icon": "external link",
Expand Down Expand Up @@ -147,9 +146,8 @@
{
"allValue": null,
"current": {
"selected": true,
"text": "dcsi:dcsi",
"value": "dcsi:dcsi"
"text": "postgres-operations:democluster1",
"value": "postgres-operations:democluster1"
},
"datasource": "PROMETHEUS",
"definition": "",
Expand Down Expand Up @@ -180,15 +178,15 @@
]
},
"datasource": "PROMETHEUS",
"definition": "",
"definition": "label_values({pg_cluster=\"[[cluster]]\"},pod)",
"hide": 0,
"includeAll": true,
"index": -1,
"label": "pod",
"multi": true,
"name": "pod",
"options": [],
"query": "label_values({pg_cluster=\"[[cluster]]\"},instance)",
"query": "label_values({pg_cluster=\"[[cluster]]\"},pod)",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
Expand Down Expand Up @@ -317,5 +315,5 @@
"variables": {
"list": []
},
"version": 1
}
"version": 2
}
11 changes: 5 additions & 6 deletions grafana/containers/pgbackrest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"annotations": {
"list": [
{
"$$hashKey": "object:183",
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
Expand All @@ -17,7 +16,7 @@
"gnetId": null,
"graphTooltip": 0,
"id": 4,
"iteration": 1596723551280,
"iteration": 1596814171540,
"links": [
{
"asDropdown": false,
Expand Down Expand Up @@ -248,8 +247,8 @@
{
"allValue": null,
"current": {
"text": "dcsi:dcsi",
"value": "dcsi:dcsi"
"text": "postgres-operations:democluster1",
"value": "postgres-operations:democluster1"
},
"datasource": "PROMETHEUS",
"definition": "label_values(pg_cluster)",
Expand All @@ -274,7 +273,7 @@
]
},
"time": {
"from": "now-3h",
"from": "now-5m",
"to": "now"
},
"timepicker": {
Expand Down Expand Up @@ -304,4 +303,4 @@
"list": []
},
"version": 1
}
}
Loading

0 comments on commit 4c13eb5

Please sign in to comment.