Project

General

Profile

Actions

action #166979

closed

Grafana aka monitor.qa.suse.de reporting Bad Gateway error

Added by livdywan 3 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Regressions/Crashes
Start date:
2024-09-18
Due date:
% Done:

0%

Estimated time:

Description

Observation

Trying to open Grafana to check alerts I found it's not available and showing a white page with an error code:

502 Bad Gateway
nginx/1.21.5

Suggestions

  • Check ssh access
  • Restart grafana

Related issues 1 (0 open1 closed)

Copied to openQA Infrastructure (public) - action #167257: Grafana aka monitor.qa.suse.de reporting Bad Gateway error - again size:SResolvednicksinger2024-10-25

Actions
Actions #1

Updated by livdywan 3 months ago

  • Check ssh access
  • Restart grafana

SSH is fine. No failed systemd services.

Actions #2

Updated by livdywan 3 months ago

Sep 18 11:09:55 monitor systemd[1]: Failed to start Grafana instance.                                                                                                 
Sep 18 11:09:55 monitor systemd[1]: grafana-server.service: Failed with result 'exit-code'.                                                                           
Sep 18 11:09:55 monitor systemd[1]: grafana-server.service: Main process exited, code=exited, status=1/FAILURE                                                        
Sep 18 11:09:55 monitor grafana[9230]: Error: ✗ alert rules: a conflicting alert rule is found: rule title under the same organisation and folder should be unique
Actions #3

Updated by livdywan 3 months ago

  • Priority changed from High to Urgent

Increasing priority as I couldn't find a quick way to restore it yet and it encumbers our alert handling. Asking team for help now.

Actions #4

Updated by livdywan 3 months ago

  • Status changed from In Progress to Feedback
Actions #5

Updated by livdywan 3 months ago

  • Status changed from Feedback to In Progress
Actions #6

Updated by nicksinger 3 months ago

  • Priority changed from Urgent to Normal

So the MR of @okurz didn't fix it. Oli remembered that we recently added worker36 back but according alerts where never updated when I switched them to generated UID based ones. So we had the same alert (name) with different UIDs in our database. We followed https://gitlab.suse.de/openqa/salt-states-openqa#further-remarks to remove every existing reference to "worker36" in the database and restarted grafana which now works again, so reducing the priority. To resolve we should ensure the same will not happen again with worker37-39 (and possibly others).

Actions #7

Updated by livdywan 3 months ago

  • Status changed from In Progress to Workable
  • Assignee deleted (livdywan)

Putting it back in the queue for now.

Actions #8

Updated by okurz 3 months ago · Edited

  • Status changed from Workable to In Progress
  • Assignee set to okurz

we still have the w36 dashboard file not included in provisioning files so I am not sure if the previous solution worked. Continuing.

I included the deployment file and it's fine. Removing old rules for w37-w39.

Actions #9

Updated by okurz 3 months ago

  • Status changed from In Progress to Resolved
systemctl stop grafana-server && for host in worker37 worker38 worker39 ; do sudo -u grafana sqlite3 /var/lib/grafana/grafana.db "delete from alert_instance where rule_uid = 'memory_usage_alert_$host';" && sudo -u grafana sqlite3 /var/lib/grafana/grafana.db "delete from annotation where text regexp '.*_$host.*';" && sudo -u grafana sqlite3 /var/lib/grafana/grafana.db "delete from provenance_type where record_key regexp '.*_$host.*';" && sudo -u grafana sqlite3 /var/lib/grafana/grafana.db "delete from alert_rule_version where rule_uid regexp '.*_$host.*';" && sudo -u grafana sqlite3 /var/lib/grafana/grafana.db "delete from alert_rule where uid regexp '.*_$host.*';" ; done && systemctl start grafana-server

this seems to have done it.

Actions #10

Updated by livdywan 3 months ago

  • Copied to action #167257: Grafana aka monitor.qa.suse.de reporting Bad Gateway error - again size:S added
Actions

Also available in: Atom PDF