Incident Handling: Difference between revisions

From Delft Solutions
Jump to navigation Jump to search
 
Line 12: Line 12:


== Critical incidents ==
== Critical incidents ==
* Critical incidents are resolved within 16 hours.
'''Critical incidents are resolved within 16 hours.'''


As first responder you take on the responsiblity of seeing an incident resolved. This does not mean that you are the person required to do all the work. You can attempt to involve other to help you (often referred to as escalating the incident), but since other are not on-call, they are not obliged to help you, especially outside of normal working hours.
As first responder you take on the responsiblity of seeing an incident resolved. This does not mean that you are the person required to do all the work. You can attempt to involve other to help you (often referred to as escalating the incident), but since other are not on-call, they are not obliged to help you, especially outside of normal working hours.

Latest revision as of 07:36, 6 November 2024

Zulip migration

Due to a migration to Zulip, the integration as was available on Mattermost is not available yet on Zulip. This leads to the following process changes:

  • Acknowlegements and triggers resolving are not posted to Zulip by Zabbix
  • Triggers are grouped in a topic on Zulip per host
  • When an incident has been fully resolved, mark the topic as resolved, when any other incidents reported for the host are resolved
  • There's no `?ongoing`, instead for now we can track open incidents by checking for unresolved topics
  • The posting of incidents is less smart (only posting when not posted yet), so in order to prevent an incident from not being reported due to network issues or the likes, a message is posted after an inteval (8 hours for non-critical and lower, 1 hour for critical and above) while the incident has not been acknowleged.
  • Incidents can be manually tracked by creating a topic by hand and reporting the problem
  • There is no automatic gitlab issue creation or syncing anymore.

Finally, where this process says to do something on Mattermost, you should now do so on Zulip. The updates in the process chapters themselves are WIP.

Critical incidents

Critical incidents are resolved within 16 hours.

As first responder you take on the responsiblity of seeing an incident resolved. This does not mean that you are the person required to do all the work. You can attempt to involve other to help you (often referred to as escalating the incident), but since other are not on-call, they are not obliged to help you, especially outside of normal working hours. Involving multiple people can quickly be required if multiple critical incidents with different causes occur simultaniously. In that case, the First Responder usually takes on a more information management role and steers those that are brought on into resolving the issues. (Example: if a server crashes, several critical triggers can fire, but the underlying cause can quite quickly be determined to be a single issue, the crashed server. So you wouldn't need to call in people to manage each incident. But a client's service being down in one cluster while in a different cluster a different VM no longer boots is likely to be to different issues, so in order to resolve them on time you'd want to call in help to resolve the incident in time).

Process

The general process is made up of the folowing steps. Each step has additional information on how to handle/execute them in the sections below.

  1. Take responsibility for seeing the incident resolved
  2. Determine if incident is still ongoing
  3. If ongoing: Communicate to affected clients that the issue is being investigated
  4. Communicate plan/next steps (even if that is gathering information)
  5. Communicate findings/results of executed plan, go back to previous step if not resolved
  6. Resolve incident + cleanup

During working on an incident it is expected that all communication is done in the incident's thread. This means all information to a problem can be found in a clear a predictable place. Sometimes an incident can be resolved by work done in another incident. In that case, it is required to post a link to that thread in the incident's thread with the comment that the resolution is done in that thread.

Acknowledge the incident on Zabbix

The first step is to take responsibility for seeing the incident resolved by acknowledging the incident on Zabbix. Simply acknowledging the trigger suffices. It is however entirely possible that multiple critical incidents are firing at the same time. This can be a coincidence, or can be because of a share cause of failure. For example, a server crashing will cause server VM' to reboot, or the router having an connectivity issue will lead to most other VM's having connectivity issues as well. If there are multiple critical incidents, it is advised to quickly observe what's ongoing, Zabbix is the best source of firing triggers for this, and pick the incident that is likely the root cause to

  • Acknowledging an incident on Zabbix will stop Zabbix from calling the First Responder to notify them of the ongoing incident. And stops Zabbix from posting reminders on Zulip.

Determine if incident is still ongoing

The next step is to check if the reported problem is still ongoing. Depending on the observations made here your process to follow and steps needed to resolve the incident can change. There are three options:

  1. The trigger resolved itself and the problem cannot be observed. Example: HTTPS is down for a site, but the FR can access the site through HTTPS without incident.
  2. The trigger resolved itself and the problem can still be observed.
  3. The trigger is still firing but the problem cannot be observed: Our triggers might not be perfect, so it could be that something else is causing it to fire. A simple example would be that Zabbix reports that the the DNS for a site can't be resolved, but in reality there's a bug in the script we wrote that checks if the DNS resolves and the DNS resolves fine. Final note: keep in mind that an 'it works on my machine' does not necessarily mean it works for most other people, so depening on the trigger you need to do some evaluations if your tests suffice.

In order to make sure you are actually trying to observe the same thing as the trigger is looking for, make sure to check the trigger definition and the current data of the associated item(s). Some triggers might fire if one of multiple conditions is met (Such as a trigger that monitors the ping response time firing if the value exceeds a certain threshold, or if no data for a certain period of time was observed).

Make sure to report your findings in the incident's thread. It's advised to post a screenshot of the relevant item(s) and your own observations. (Continuing the ping example, you would post a screenshot of the relevant values, state your conclusion why the trigger is firing, and your own observations/pings)

Communicate to affected clients

If the incident is still ongoing and the service is down, we need to communicate to affected clients that we are aware of the problem and that we are investigating it. This is because critical incident usually mean the service is down, something the clients can notice/are affected by, so we to be transparent that something is going on. There are some additional notes to this though:

  • If an incident has already resolved itself and the problem is no longer observable, we don't communicate anything. Doing so might only cause confusion, and since the client has not reported any issues, they have not had a noticeable problem with it themselves.
  • Although a critical incident generally means that the client service is down or experiencing reduced service, not all critical incidents are of that nature. Some are more administrative, or are only an issue for Delft Solutions itself. As of writing I don't have an exhaustive list, but here is those I can think of:
    • SSH Service is down: We don't have any clients that SSH into their services, so it's generally not a problem. But SSH is mostly used for SRE maintenance and publishing new builds. The SRE maintenance is an internal problem, so no need to communicate to the client. The publishing is done to Kaboom, preventing new builds from being published, and the two SM VM's.
    • No backup for x days: Clients don't notice it if a backup is running late, so no need to communicate with clients. Just need to make sure the backup gets completed
    • SSL certificate is expiring in < 24 hours: This is a bit dependent on how soon this incident is being handled, but if it handled quickly, the certificate never actually expired, and there has not been any disruption to the client's service, so no need for communicating about it.
  • Determining which clients are being affected can be done by looking at the host's DNS in the trigger, and/or looking up the VM in Proxmox and checking the tags of the VM's for client names. In the case that this issue is causing multiple other critical triggers to fire, you would have to check for which clients are affected by those incidents.
  • Communicating to DS about ongoing incidents is usually assumed to be automaticly have been done by the fact that the incident was reported on Zulip.

As always, report the decisions taken and actions maded in the incident thread. (e.g.: I've sent a message in the Slack to let Kaboom know that we aware of problem x, and that we are investigating it)

Communicate plan/next steps + Communicate findings/results of executed plan

This is the main part of handling an incident. There are several actions you can take in these steps, but at the basis they consist of sharing your next steps, performing those, and reporting the results. The reason all this needs to be reported is to ensure that all known information about a problem is logged, making it easier for someone else to be onboarded into the issue, for later reference if a similar issue is encountered, and even for use during the incident itself in case an older configuration needs to be referenced after you changed it. The objective from these steps is determining what is actually wrong and how to resolve it. Depending on the observations made earlier on whether the incident is still ongoing and is (still) observable your investigation can go into different directions. (e.g. Find the underlying cause for a trigger, or determining why the trigger is firing while it likely shouldn't, and then how to resolve that underlying cause or how to update the trigger to work better)

There are three main types of steps defined, but you are not limited to these:

  1. Hypothesis: If you have an idea what could be causing it, you would state your hypothesis and your next step would be to prove that hypothesis. For example, for an incident 'SSH service is down on X' your hypothesis could be that this is due to 'MaxStartups' throttling, which can be proven by 'grep'ing journalctl for that, and compare the start and end times of throttling with the timestamps of the item reporting the status of the SSH service.
  2. Information gathering: Sometimes it just helps to get some facts about the situation collected. What is usefull information that is relevant depends on the triggers, but some examples are: The syslog/journalctl of the host from around the time of the incident (it can contain a reference to the an underlying problem in various levels of explicitness), the ping response from several hosts on the route to a host or a traceroute (this helps with networking issues). The gathered information is usually intended to help you come up with an hypothesis on what's wrong.
  3. Investigative: The most rigorous of process. The full process is described here originally Drive - Final Coundown - General Investigative Process. To summarize, when you don't know why something is failing, and/or don't have any decent hypotheses to follow up, you can follow this process to systematicly find the problem.

Regarding the resolution to an incident: The resolution to any incident is usually one of two things:

  1. Fix the underlying problem.
  2. Fix the trigger itself.

Fixing the trigger is relavively straightforward, but do make sure document in the thread what you changed to which trigger. Fixing the underlying problem can be more complex. A trade-off needs to be made sometimes between resolving technical debt, or simply patching the current system to resolve the issue. We usually look for a resolution that ensures that the problem won't re-occur soon, or makes it unexpected/unlikely for the problem to re-occur. Taking into account the timeframe that is available to resolve the incident you can make some trade-offs. An example would be: normal backups of VM's are failing due to the Proxmox backup server being down/unreachable and it is determined that this cannot be resolved at that moment. We can set up automatic backups to local storage temporary to resolve the immediate problem and ensure we keep our SLO's versus setting up a new Proxmox Backup server at a different location. Since we don't have much time to resolve the problem, the resolution would be to set up the automatic backups to local storage, and set up a new Proxmox Backup Server later as a seperate issue.

Some know issues and their resolutions:

  • SSH service is down: The internet is a vile place. There's constant port scanning and hacking attempts ongoing to any machine connected to the internet (mostly IPv4). Due to this, SSH has a throttling functionality build in to prevent a system from being DDOS'ed by the amount of malicious SSH requests. This throttling can cause the Zabbix server from being denied an SSH connection, of which several failures fire this trigger. This hypothesis can be proven with a `journalctl -u ssh | grep 'MaxStartupsThrottling'` (you probably want to select a relevant time period with `--since "2 hours ago"` or something similar to prevent having to process a month of logging). You can then compare the throttling start and end times with the timestamps of the item data itself. The resolution for the issue is to add our custom ssh configuration Custom SSH Configuration.
  • No backup for 3 days: Are S3 backup is very slow. Not much to prove as an underlying issue here. What needs to be done is check that the backup process is ongoing. The Zabbix latest data can be checked to verify that backups are running by checking that that days backups were done for the smaller buckets. The devteam email can be checked for if the backup process could not start on day due to it already running (it takes 24+ hours, and an attempt to start it is done each day by cron).
  • git.* HTTPS is down: On Sunday mostly, Gitlab gets automaticly updated, but this incurs some downtime as the service is restarted. This is usually short enough to not be reported to Zulip as per our settings, but sometimes it's longer. If the service does not stay down, the issue can be just resolved.

Resolve incident + cleanup

When you've executed and verified the resolution in the previous steps we can proceed resolving the issue in our Mattermost integration. Resolving an incident can be done by doing the following:

  1. Verify that the trigger is no longer firing. An incident will be immediatly re-opened if the trigger is still firing, and the incident cannot be considered resolved if the trigger is still firing. If the trigger is still firing but you're sure that you've resolved the problem, you might need to force the item the trigger depends on to update. This can be done by finding the item in the host's configuration on Zabbix and selecting 'Execute Now', after a short period this should force Zabbix to re-execute the item. You can check the timestamps in the latest data of an item to check if it was updated.
  2. Close the incident by marking the topic as resolved, when there are no other triggers firing for the host.

Unfortunatly, some problems cause multiple critical and non-critical triggers to fire. This means we have to check Zabbix and Zulip for other fired triggers and ongoing incidents. The goal is to identify critical and non-critical incidents that were caused by the incident/underlying issue you just resolved.

  1. First, these incidents need to be acknowledged on Zabbix, and in the acknowledgement message you mention the incident/problem that caused this.
  2. Next, check the incident tracked by the integration on Mattermost using the `?ongoing` command. Resolve incidents that were (re-)opened by this incident by executing the following steps. If the first two fail (problem still persists, trigger is still firing), the incident needs to considered it's own issue and the relevant process needs to be followed (critical or non-critical depending on criticality).
    1. Ensuring the mentioned problem is no longer observable
    2. The trigger has resolved (You might need to force an update with `Execute Now`).
    3. Posting a link to the main incident you resolved with the comment that the underlying problem was resolved in that topic.
    4. Closing the incident by marking the topic as resolved, when there are no other triggers firing for the host.

When you are done, there should be no more critical triggers firing in Zabbix or open in the Zabbix-Mattermost intergration, for which no-one has taken responsibility or you have taken responsibility for and are not actively handling.

Additional context

  • Critical incidents are posted in SLA - Critical.
  • When it is being tracked on GitLab a heavy check mark is added to the message.
  • Responses on the thread and on GitLab are automatically synced (to some extend)
  • When you reply with I agree that this has been fully resolved eventually our Zabbix-Mattermost integration will pick this up and a green check mark is added to the message.

Non-Critical incidents

  • Non-critical incidents are acknowledged within 9 hours and resolved within one week.

Acknowledging

Fully acknowledging a non-critical incident requires the following tasks to have been completed:

  • Acknowledging the incident on Zabbix
  • Add the non-critical incident as a milestone in the metrics sheet
    • Start date is the date of the incident
    • DoD states what needs to be true for the non-critical incident to be consider resolved
  • Add the non-critical incident to Lynx as a project
    • Tasks need to be added
    • Final tasks needs to have the SLO deadline set as 'contraint'
    • Project priority is set to 20 (as a default)
    • The tasks are estimated for SP
  • The Lynx project ID is reported in the non-critical incident's topic on Zulip
  • A Kimai activity is created in Kimai for the non-critical incident

Checklist (outdated)

  1. Acknowledge on Zabbix and state who is responsible for resolving this in the description
  2. Communicate plan/next steps (even if that is gathering information)
  3. Communicate findings/results of executed plan, go back to previous step if not resolved
  4. If there is no resolution to the incident, evaluate if the trigger needs updating/disabling
  5. Resolve incident

Informational incidents

  • Informational incidents are acknowledged within 72 hours

Checklist

  1. Acknowledge on Zabbix
  2. Sanity check the event, post result in thread
  3. If action needed, perform action

If an incident is reported by other means than the Zabbix-Zulip intergration

  1. Acknowledge receipt.
  2. Classify the incident as critical, non-critical, or informational.
  3. Create an topic in the relevant SRE channel, stating the problem and that you is responsible for resolving it.
  4. Proceed to treat the incident according to the criticality you just classified it as. (So for a critical incident, it means you now start the critical incident handling process)

Handover

When handing over the responsibility of first responder (FR), the following needs to happen:

  • The handover can be initiated by both the upcoming FR or the acting FR
  • Acting FR adds the upcoming FR the the IPA sla-first-responder user group and enables Zabbix calling for that the upcoming FR if they have that set by going to Zabbix > Configuration > Actions > Trigger actions
  • The upcoming FR makes sure they are aware of the state of the SLA and knows what questions they wants to ask the acting FR.
  • The upcoming FR makes sure they are subscribed to the right channels

The following steps can be done async or in person:

  • The acting FR announces/informs the upcoming FR has been added to the sla-first-responder group (In Zulip's Organisational channel if asynq).
  • If the acting FR wants to hand over responsibility for any ongoing incident they also state which incidents they want the upcoming FR to take over.
  • If there are any particularities the upcoming FR needs to be aware of, those are shared.
  • The upcoming FR asks their questions until they are satisfied and able to take over the FR
  • The upcoming FR ensures they are subscribed to the following channels on Zulip: SRE - General, SRE # Critical and if part of the SRE team SRE ## Non-Critical and SRE ### Informational.
  • The upcoming FR announces/informs that they are now the acting FR over Zulip's Organisational channel
  • The now acting FR removes the previous FR from IPA the sla-first-responder user group and disables Zabbix calling for the previous FR if they had that enabled by going to Zabbix > Configuration > Actions > Trigger actions

Checklist for Handing Over First Responder (FR) Responsibilities

When transferring the role of First Responder (FR), follow these steps:

1. Initiate the Handover:

  - Acting FR or Upcoming FR*: Initiate the handover process.

2. Add Upcoming FR to User Group and Enable Zabbix Calling:

  - Acting FR:
    - Add the upcoming FR to the IPA `sla-first-responder` user group.
    - Enable Zabbix calling for the upcoming FR (if applicable) by navigating to:
      - Zabbix> Configuration > Actions > [Trigger actions](https://status.delftinfra.net/zabbix/actionconf.php?eventsource=0#).

3. Announce Addition to User Group:

  - Acting FR:
    - Inform the upcoming FR that they have been added to the `sla-first-responder` group.
    - If communicating asynchronously, announce this in Zulip's [Organisational channel](https://chat.dsinternal.net/#narrow/stream/13-Organisational).

4. Communicate Ongoing Incidents and Particularities:

  - Acting FR:
    - Share details of any ongoing incidents to be handed over.
    - Inform the upcoming FR of any specific details they need to be aware of.

5. Review SLA State and Prepare Questions:

  - Upcoming FR:
     - Familiarize yourself with the current state of the SLA.
     - Prepare any questions for the acting FR.

6. Clarify and Confirm Understanding:

  - Upcoming FR:
    - Ask all necessary questions until you are confident in taking over the FR role.

7. Subscribe to Relevant Zulip Channels:

  - Upcoming FR:
    - Subscribe to the following channels:
      - [SRE - General](https://chat.dsinternal.net/#narrow/stream/23-SRE---General)
      - [SRE # Critical](https://chat.dsinternal.net/#narrow/stream/24-SRE-.23-Critical)
    - If part of the SRE team, also subscribe to:
      - [SRE ## Non-Critical](https://chat.dsinternal.net/#streams/4/SRE%20##%20Non-critical)
      - [SRE ### Informational](https://chat.dsinternal.net/#streams/5/SRE%20###%20Informational)

8. Announce Acceptance of FR Role:

  - Upcoming FR (now Acting FR):
    - Announce that you are now the acting FR in Zulip's [Organisational channel](https://chat.dsinternal.net/#narrow/stream/13-Organisational).

9. Remove Previous FR from User Group and Disable Zabbix Calling:

  - Now Acting FR:
    - Remove the previous FR from the IPA `sla-first-responder` user group.
    - Disable Zabbix calling for the previous FR by navigating to:
      - Zabbix> Configuration > Actions > [Trigger actions](https://status.delftinfra.net/zabbix/actionconf.php?eventsource=0#).
    - Ensure the previous FR's phone number is disabled in Zabbix calling settings.

10. Confirm Completion of Handover:

   - Now Acting FR:
     - Verify that all steps have been completed and the handover is fully executed.