prometheus: Properly split the port off IPv6 addresses
The Prometheus module when splitting the port nubmer for public and
client networks/ips doesn't take IPv6 addresses into account.
This patch fixes this by using `rsplit(':', 1)` rather then `split(':')`
which leads to bugs like:
curl --silent http://localhost:9283/metrics | grep ceph_mon_metadata{
ceph_mon_metadata{ceph_daemon="mon.mon2",hostname="mon2.example.net",public_addr="[2001",rank="0",ceph_version="ceph version 15.2.4 (
7447c15c6ff58d7fce91843b705a268a1917325c) octopus (stable)"} 1.0
Note the public_addr above being split at the first ':' of an IPv6
address.
Signed-off-by: Matthew Oliver <moliver@suse.com>
Fixes: https://tracker.ceph.com/issues/46846
(cherry picked from commit
985cce055bcee60b843806291458517c7ee890a3)