ceph_exporter icon indicating copy to clipboard operation
ceph_exporter copied to clipboard

add bucket usage collector

Open zhucan opened this issue 2 years ago • 4 comments

[root@rook-node01 /]# radosgw-admin usage show --bucket test-bucket5 --uid os-user-ce1dd0c1-f552-46da-9153-c0a785348b0e --categories="put_obj,get_obj" --show-log-entries=false
{
    "summary": [
        {
            "user": "os-user-ce1dd0c1-f552-46da-9153-c0a785348b0e",
            "categories": [
                {
                    "category": "get_obj",
                    "bytes_sent": 425099031,
                    "bytes_received": 0,
                    "ops": 3,
                    "successful_ops": 3
                },
                {
                    "category": "put_obj",
                    "bytes_sent": 0,
                    "bytes_received": 604471055,
                    "ops": 42,
                    "successful_ops": 42
                }
            ],
            "total": {
                "bytes_sent": 425099031,
                "bytes_received": 604471055,
                "ops": 45,
                "successful_ops": 45
            }
        }
    ]
}

zhucan avatar Nov 07 '22 09:11 zhucan

:wave: I'm going to say the same thing about this as https://github.com/digitalocean/ceph_exporter/issues/217 - this could maybe be added behind a enable/disable flag, as the cardinality of this data can get rather high.

Patches welcome, as always!

baergj avatar Nov 08 '22 17:11 baergj

the usage is printed by cmd "radosgw-admin usage show xxxx", not "radosgw-admin bucket stats".

zhucan avatar Nov 09 '22 02:11 zhucan

@zhucan I understand, and that wasn't my point; the issue is that anything that's per bucket can result in a very high number of prometheus metrics being collected each scrape, and this can quickly get folks into trouble, which is why I think it should be behind a flag if it gets implemented.

baergj avatar Nov 09 '22 03:11 baergj

Thanks for your explain. @baergj

zhucan avatar Nov 09 '22 03:11 zhucan