Bug 1552516 - "site can’t be reached" error after cliking "Source" link in alertmanager web UI
Summary: "site can’t be reached" error after cliking "Source" link in alertmanager web UI
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 3.9.z
Assignee: Paul Gier
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-07 09:09 UTC by Junqi Zhao
Modified: 2018-09-06 18:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-09-06 18:10:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
alert manager UI (80.83 KB, image/png)
2018-03-07 09:09 UTC, Junqi Zhao
no flags Details
"This site can’t be reached" error after cliking "Source" link (30.86 KB, image/png)
2018-03-07 09:11 UTC, Junqi Zhao
no flags Details
Issue is fixed (108.72 KB, image/png)
2018-08-15 08:14 UTC, Junqi Zhao
no flags Details

Description Junqi Zhao 2018-03-07 09:09:22 UTC
Created attachment 1405199 [details]
alert manager UI

Description of problem:
configure rules file to catch alerts and then deploy prometheus,"site can’t be reached" error after cliking "Source" link in alertmanager web UI
check from the "alerts in alerts UI" of [Additional info] part, it seems generatorURL did not take correct value, it is 
"http://prometheus-0:9090/graph?g0.expr=up%7Bjob%3D%22kubernetes-nodes%22%7D+%3E+0\u0026g0.tab=1

Version-Release number of selected component (if applicable):
prometheus-alertmanager/images/v3.9.3-1
prometheus/images/v3.9.3-1
prometheus-alert-buffer/images/v3.9.3-1
oauth-proxy/images/v3.9.3-1

How reproducible:
Always

Steps to Reproduce:
1. Deploy prometheus 3.9 with alert rules file, rules file see the [Additional info] part
2. Log in alertmanager web UI with cluster-admin user, and click "Source" link in UI
3.

Actual results:
"site can’t be reached" error after cliking "Source" link in alertmanager web UI

Expected results:
Should be able to view source

Additional info:
# alert rules file
groups:
- name: example-rules
  interval: 30s # defaults to global interval
  rules:
  - alert: kubernetes-nodes > 0
    expr: up{job="kubernetes-nodes"} > 0
    annotations:
      miqTarget: "ContainerNode"
      severity: "HIGH"
      message: "up{job=\"kubernetes-nodes\"} > 0"


alerts in alerts UI.
https://alerts-openshift-metrics.apps.0307-hdf.qe.rhcloud.com/topics/alerts
{"generationID":"40ef7ca4-8db6-421d-a013-319578fb2aa0","messages":[{"index":1,"timestamp":"2018-03-07T07:42:30.232426708Z","data":{"alerts":[{"annotations":{"message":"up{job=\"kubernetes-nodes\"} \u003e 0","miqTarget":"ContainerNode","severity":"HIGH"},"endsAt":"0001-01-01T00:00:00Z","generatorURL":"http://prometheus-0:9090/graph?g0.expr=up%7Bjob%3D%22kubernetes-nodes%22%7D+%3E+0\u0026g0.tab=1","labels":{"alertname":"kubernetes-nodes \u003e 0","beta_kubernetes_io_arch":"amd64","beta_kubernetes_io_instance_type":"n1-standard-2","beta_kubernetes_io_os":"linux","failure_domain_beta_kubernetes_io_region":"us-central1","failure_domain_beta_kubernetes_io_zone":"us-central1-a","instance":"qe-juzhao-39-gce-3-master-etcd-1","job":"kubernetes-nodes","kubernetes_io_hostname":"qe-juzhao-39-gce-3-master-etcd-1","node_role_kubernetes_io_master":"true","openshift_infra":"apiserver","role":"node"},"startsAt":"2018-03-07T07:42:00.179442376Z","status":"firing"},{"annotations":{"message":"up{job=\"kubernetes-nodes\"} \u003e 0","miqTarget":"ContainerNode","severity":"HIGH"},"endsAt":"0001-01-01T00:00:00Z","generatorURL":"http://prometheus-0:9090/graph?g0.expr=up%7Bjob%3D%22kubernetes-nodes%22%7D+%3E+0\u0026g0.tab=1","labels":{"alertname":"kubernetes-nodes \u003e 0","beta_kubernetes_io_arch":"amd64","beta_kubernetes_io_instance_type":"n1-standard-2","beta_kubernetes_io_os":"linux","failure_domain_beta_kubernetes_io_region":"us-central1","failure_domain_beta_kubernetes_io_zone":"us-central1-a","instance":"qe-juzhao-39-gce-3-nrr-1","job":"kubernetes-nodes","kubernetes_io_hostname":"qe-juzhao-39-gce-3-nrr-1","metrics":"enabled","registry":"enabled","role":"node","router":"enabled"},"startsAt":"2018-03-07T07:42:00.179442376Z","status":"firing"}],"commonAnnotations":{"message":"up{job=\"kubernetes-nodes\"} \u003e 0","miqTarget":"ContainerNode","severity":"HIGH"},"commonLabels":{"alertname":"kubernetes-nodes \u003e 0","beta_kubernetes_io_arch":"amd64","beta_kubernetes_io_instance_type":"n1-standard-2","beta_kubernetes_io_os":"linux","failure_domain_beta_kubernetes_io_region":"us-central1","failure_domain_beta_kubernetes_io_zone":"us-central1-a","job":"kubernetes-nodes","role":"node"},"externalURL":"http://prometheus-0:9093","groupKey":"{}:{}","groupLabels":{},"receiver":"alert-buffer-wh","status":"firing","version":"4"}}]}

Comment 1 Junqi Zhao 2018-03-07 09:11:30 UTC
Created attachment 1405200 [details]
"This site can’t be reached" error after cliking "Source" link

Comment 2 Paul Gier 2018-08-09 15:28:17 UTC
Upstream PR: https://github.com/openshift/openshift-ansible/pull/9507

Comment 3 Vadim Rutkovsky 2018-08-13 10:54:58 UTC
3.9 PR - https://github.com/openshift/openshift-ansible/pull/9553

Comment 4 Junqi Zhao 2018-08-15 08:13:38 UTC
Need new openshift-ansible package to test this defect, but tested with the fix, issue is fixed, click "Source" link in alertmanager web UI, it will navigate to {{ openshift_prometheus_hostname }} url, see the attached picture

Verification steps please see Comment 0

Comment 5 Junqi Zhao 2018-08-15 08:14:46 UTC
Created attachment 1476084 [details]
Issue is  fixed

Comment 6 Junqi Zhao 2018-08-15 08:15:35 UTC
Will close this defect after the new openshift-ansible package comes out

Comment 7 Junqi Zhao 2018-08-16 11:20:06 UTC
(In reply to Junqi Zhao from comment #6)
> Will close this defect after the new openshift-ansible package comes out

NOTE:
The currently latest openshift-ansible-roles-3.9.40-1.git.0.188c954.el7.noarch does not contain the fix

Comment 8 Junqi Zhao 2018-08-21 05:53:38 UTC
Fix is merged in openshift-ansible-roles-3.9.41-1.git.0.4c55974.el7.noarch, close this defect per Comment 4 to Comment 7


Note You need to log in before you can comment on or make changes to this bug.