RosiKyu commented on PR #13218:
URL: https://github.com/apache/cloudstack/pull/13218#issuecomment-6962603618

   @DaanHoogland I tested this on a KVM lab (Oracle Linux 9, advanced zone), 
first on 24.0 without this PR, then the PR packages, with 
`prometheus.exporter.enable=true`.
   
   **Works when only isolated-network routers are running:**
   - `cloudstack_virtualrouter_healthcheck_result` and 
`cloudstack_virtualrouter_healthcheck_lastcheck` appear for each check of the 
running router, with HELP/TYPE lines, check name, type, zone and router name. A 
failing check (`haproxy_check.py`, also `false` in 
`getRouterHealthCheckResults`) shows `0`, the others `1`.
   - Stopped routers are not listed.
   - With `router.health.checks.enabled=false` the health lines are gone and 
the other metrics stay.
   
   **Problem with a VPC router:** I created a VPC with two tiers and a VM in 
each tier, so its router `r-25-VM` is on both tiers. While that router is 
running, every scrape of `/metrics` logs:
   
   ```
   WARN  [o.a.c.m.PrometheusExporterImpl] (HTTP-Dispatcher:[]) (logid:) Getting 
metrics failed java.lang.IllegalStateException: Duplicate key 25 (attempted 
merging values VM instance 
{"id":25,"instanceName":"r-25-VM","state":"Running","type":"DomainRouter",...} 
and VM instance {"id":25,"instanceName":"r-25-VM",...})
   ```
   
   and the page then has no router health lines at all (also none for the other 
running router), and the domain metrics (`cloudstack_domain_limit_*`, 
`cloudstack_domain_resource_count`, `cloudstack_domain_resource_limit`) are 
missing too. On 24.0 without this PR, with the same VPC, those domain metrics 
are there. Stopping the VPC router brings everything back; starting it again 
breaks it again. This looks like the open Copilot comment about duplicate 
router IDs. 
   
   Could you have a look?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to