Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong URL provided to Prometheus when the relation with Traefik is established. #130

Closed
Abuelodelanada opened this issue Feb 14, 2023 · 1 comment · Fixed by #150
Closed

Comments

@Abuelodelanada
Copy link
Contributor

Bug Description

An internal URL is provided to Prometheus when the relation with Traefik is established:

image

To Reproduce

  1. Deploy cos-lite: juju deploy cos-lite --channel=edge --trust
  2. Once all units are activeand idle, check the targets in Prometheus.

Environment

  • juju 3.0.2
  • micork8s v1.25.6
  • cos-lite: edge

Relevant log output

No erros in juju debug-log

Additional context

Charm versions:

$ juju status --color --relations           

Model  Controller           Cloud/Region        Version  SLA          Timestamp
cos    charm-dev-batteries  microk8s/localhost  3.0.2    unsupported  16:38:04-03:00

App           Version  Status  Scale  Charm             Channel  Rev  Address         Exposed  Message
alertmanager  0.23.0   active      1  alertmanager-k8s  edge      53  10.152.183.232  no       
catalogue              active      1  catalogue-k8s     edge      13  10.152.183.209  no       
grafana       9.2.1    active      1  grafana-k8s       edge      69  10.152.183.52   no       
loki          2.4.1    active      1  loki-k8s          edge      65  10.152.183.59   no       
prometheus    2.42.0   active      1  prometheus-k8s    edge     110  10.152.183.71   no       
traefik       2.9.6    active      1  traefik-k8s       edge     116  192.168.122.10  no       

Unit             Workload  Agent  Address      Ports  Message
alertmanager/0*  active    idle   10.1.36.93          
catalogue/0*     active    idle   10.1.36.124         
grafana/0*       active    idle   10.1.36.109         
loki/0*          active    idle   10.1.36.112         
prometheus/0*    active    idle   10.1.36.96          
traefik/0*       active    idle   10.1.36.81          

Relation provider                   Requirer                     Interface              Type     Message
alertmanager:alerting               loki:alertmanager            alertmanager_dispatch  regular  
alertmanager:alerting               prometheus:alertmanager      alertmanager_dispatch  regular  
alertmanager:grafana-dashboard      grafana:grafana-dashboard    grafana_dashboard      regular  
alertmanager:grafana-source         grafana:grafana-source       grafana_datasource     regular  
alertmanager:replicas               alertmanager:replicas        alertmanager_replica   peer     
alertmanager:self-metrics-endpoint  prometheus:metrics-endpoint  prometheus_scrape      regular  
catalogue:catalogue                 alertmanager:catalogue       catalogue              regular  
catalogue:catalogue                 grafana:catalogue            catalogue              regular  
catalogue:catalogue                 prometheus:catalogue         catalogue              regular  
grafana:grafana                     grafana:grafana              grafana_peers          peer     
grafana:metrics-endpoint            prometheus:metrics-endpoint  prometheus_scrape      regular  
loki:grafana-dashboard              grafana:grafana-dashboard    grafana_dashboard      regular  
loki:grafana-source                 grafana:grafana-source       grafana_datasource     regular  
loki:metrics-endpoint               prometheus:metrics-endpoint  prometheus_scrape      regular  
prometheus:grafana-dashboard        grafana:grafana-dashboard    grafana_dashboard      regular  
prometheus:grafana-source           grafana:grafana-source       grafana_datasource     regular  
prometheus:prometheus-peers         prometheus:prometheus-peers  prometheus_peers       peer     
traefik:ingress                     alertmanager:ingress         ingress                regular  
traefik:ingress                     catalogue:ingress            ingress                regular  
traefik:ingress-per-unit            loki:ingress                 ingress_per_unit       regular  
traefik:ingress-per-unit            prometheus:ingress           ingress_per_unit       regular  
traefik:metrics-endpoint            prometheus:metrics-endpoint  prometheus_scrape      regular  
traefik:traefik-route               grafana:ingress              traefik_route          regular 
@sed-i
Copy link
Contributor

sed-i commented Feb 15, 2023

Interesting. What does show-unit show for the hostname in the relation data alertmanager sends over to prom?

Abuelodelanada added a commit that referenced this issue Apr 19, 2023
* fix #130 - wrong url provided to Prometheus

* Update src/charm.py

Co-authored-by: Leon <82407168+sed-i@users.noreply.github.com>

* update grafana_dashboard.py lib

* remove comment

---------

Co-authored-by: Leon <82407168+sed-i@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants