Skip to content

exported custom metrics are not removed once tarred #191

@jasonriddell

Description

@jasonriddell

If you create a custom metric export:

./promdump --url=http://127.0.0.1:9090/ --start_time=2025-06-11T17:00:00Z --batch=15m --period=1h --node_prefix_validation=false --node_prefix=yb-api-demo-demo --metric='{__name__=~"container_memory_working_set_bytes|container_cpu_usage"}' --out='k8s_custom'

The files created as part of the k8s_custom (the --out setting) export are packaged in the tar file, but not removed from the filesystem like the standard YB metrics. Not a big issue but worth fixing it when someone is working on the code.

Thanks.
Jason.

/tmp/promdump $ ls -alrt
total 26648
-rwxr-xr-x    1 10001    10001     14446703 Jan 15 16:43 promdump
drwxrwxrwt    1 root     root          4096 Jun 18 14:54 ..
-rw-r--r--    1 10001    10001       299318 Jun 18 14:58 k8s_custom.00000
-rw-r--r--    1 10001    10001       298899 Jun 18 14:58 k8s_custom.00003
-rw-r--r--    1 10001    10001       299362 Jun 18 14:58 k8s_custom.00002
-rw-r--r--    1 10001    10001       299091 Jun 18 14:58 k8s_custom.00001
-rw-r--r--    1 10001    10001         4958 Jun 18 14:58 promdump.log
-rw-r--r--    1 10001    10001     11609989 Jun 18 14:58 promdump-yb-api-demo-demo-20250618-145730.tar.gz
drwxr-xr-x    2 10001    10001         4096 Jun 18 14:58 .
/tmp/promdump $ tar vtf promdump-yb-api-demo-demo-20250618-145730.tar.gz
-rw-r--r-- 10001/10001     30696 2025-06-18 14:58:00 cql_export.00000
-rw-r--r-- 10001/10001     30696 2025-06-18 14:58:00 cql_export.00001
-rw-r--r-- 10001/10001     30696 2025-06-18 14:58:00 cql_export.00002
-rw-r--r-- 10001/10001     30696 2025-06-18 14:58:00 cql_export.00003
-rw-r--r-- 10001/10001   7178330 2025-06-18 14:58:00 ysql_export.00000
-rw-r--r-- 10001/10001   7181469 2025-06-18 14:58:01 ysql_export.00001
-rw-r--r-- 10001/10001   7179031 2025-06-18 14:58:02 ysql_export.00002
-rw-r--r-- 10001/10001   7180149 2025-06-18 14:58:03 ysql_export.00003
-rw-r--r-- 10001/10001  33270028 2025-06-18 14:58:06 master_export.00000
-rw-r--r-- 10001/10001  33337962 2025-06-18 14:58:09 master_export.00001
-rw-r--r-- 10001/10001  33308441 2025-06-18 14:58:14 master_export.00002
-rw-r--r-- 10001/10001  33305053 2025-06-18 14:58:17 master_export.00003
-rw-r--r-- 10001/10001     92194 2025-06-18 14:58:17 node_export.00000
-rw-r--r-- 10001/10001     92194 2025-06-18 14:58:17 node_export.00001
-rw-r--r-- 10001/10001     92194 2025-06-18 14:58:17 node_export.00002
-rw-r--r-- 10001/10001     92194 2025-06-18 14:58:17 node_export.00003
-rw-r--r-- 10001/10001   5109536 2025-06-18 14:57:31 platform.00000
-rw-r--r-- 10001/10001   5110419 2025-06-18 14:57:31 platform.00001
-rw-r--r-- 10001/10001   5109734 2025-06-18 14:57:32 platform.00002
-rw-r--r-- 10001/10001   5109206 2025-06-18 14:57:32 platform.00003
-rw-r--r-- 10001/10001  70889252 2025-06-18 14:57:39 tserver_export.00000
-rw-r--r-- 10001/10001  70919066 2025-06-18 14:57:46 tserver_export.00001
-rw-r--r-- 10001/10001  70895306 2025-06-18 14:57:53 tserver_export.00002
-rw-r--r-- 10001/10001  70802767 2025-06-18 14:58:00 tserver_export.00003
-rw-r--r-- 10001/10001    299318 2025-06-18 14:58:17 k8s_custom.00000
-rw-r--r-- 10001/10001    299091 2025-06-18 14:58:17 k8s_custom.00001
-rw-r--r-- 10001/10001    299362 2025-06-18 14:58:17 k8s_custom.00002
-rw-r--r-- 10001/10001    298899 2025-06-18 14:58:17 k8s_custom.00003
-rw-r--r-- 10001/10001      4759 2025-06-18 14:58:20 promdump.log

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpromdumpIssues related to the prometheus-remote-backfill tools

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions