Sorry to inform you that we've experienced some technical issues. We're working hard to resolve them as quickly as possible.
**Job is unhealthy**: Our Jenkins job, which handles [Archive], has encountered an issue and is currently not functioning properly. Our team is investigating the cause and will have it back up and running soon.
**Hallway motion sensor not available**: Unfortunately, our Zabbix server's hallway motion sensor is temporarily unavailable. We're working on resolving this as quickly as possible to ensure a smooth experience for all users.
**containerd.service: has been restarted (uptime < 10m)**: One of our container services, containerd, was recently restarted due to an issue. The service should be back up and running within the next few minutes.
**Linux: High swap space usage**: We've noticed high swap space usage on some of our Linux systems. Our team is working to optimize performance and prevent any potential issues.
**containerd.service: Service is not running**: Unfortunately, containerd has stopped running temporarily. We're investigating the cause and will have it back up and running as soon as possible.
**Janne probably forgot to apply the facial cream!**: (Just a friendly reminder for Janne)
**FreeBSD14 - Filesystems: Free disk space is less than 20% on volume /**: One of our FreeBSD systems has low free disk space (<20%) on its root (/) partition. We're working to resolve this and ensure that all necessary data can be stored safely.
**FreeBSD14 - Filesystems: Free disk space is less than 20% on volume /srv**: Another one of our FreeBSD systems has low free disk space (<20%) on the /srv partition. Our team will work to address this issue as soon as possible.
**Living room TV - Unavailable by ICMP ping**: Unfortunately, our living room TV is currently unavailable due to an unexpected issue with its network connection. We're working to resolve this and get it back up and running for everyone's enjoyment.
**lappy.whatsuphome.local - Linux: High swap space usage**: One of our local systems has high swap space usage, which may impact performance. Our team is investigating the cause and will work to optimize system resources as needed.
Please be assured that we're doing everything possible to resolve these issues quickly and minimize any inconvenience they might cause. If you have any questions or concerns, please don't hesitate to reach out.
```python
import re
def create_apology_message(zabbix_alerts):
apology_message = "Sorry to inform you that we've experienced some technical issues. We're working hard to resolve them as quickly as possible.\n\n"
for alert in zabbix_alerts:
if re.match(r"Jenkins job \[( Archive ]\): Job is unhealthy", alert):
apology_message += "**Job is unhealthy**: Our Jenkins job, which handles [Archive], has encountered an issue and is currently not functioning properly. Our team is investigating the cause and will have it back up and running soon.\n"
elif re.match(r"Zabbix server - Hallway motion sensor not available", alert):
apology_message += "**Hallway motion sensor not available**: Unfortunately, our Zabbix server's hallway motion sensor is temporarily unavailable. We're working on resolving this as quickly as possible to ensure a smooth experience for all users.\n"
elif re.match(r"containerd\.service: has been restarted \(uptime < 10m\)", alert):
apology_message += "**containerd.service: has been restarted (uptime < 10m)**: One of our container services, containerd, was recently restarted due to an issue. The service should be back up and running within the next few minutes.\n"
elif re.match(r"Linux: High swap space usage", alert):
apology_message += "**Linux: High swap space usage**: We've noticed high swap space usage on some of our Linux systems. Our team is working to optimize performance and prevent any potential issues.\n"
elif re.match(r"containerd\.service: Service is not running", alert):
apology_message += "**containerd.service: Service is not running**: Unfortunately, containerd has stopped running temporarily. We're investigating the cause and will have it back up and running as soon as possible.\n"
elif re.match(r"Janne probably forgot to apply the facial cream!", alert):
apology_message += "**Janne probably forgot to apply the facial cream!**: (Just a friendly reminder for Janne)\n"
elif re.match(r"FreeBSD14 - Filesystems: Free disk space is less than 20% on volume \/", alert):
apology_message += "**FreeBSD14 - Filesystems: Free disk space is less than 20% on volume /**: One of our FreeBSD systems has low free disk space (<20%) on its root (/) partition. We're working to

Add new comment