Skip to content

Use cases

zynzel edited this page Apr 30, 2025 · 9 revisions

Inform someone that you are not reachable (possibly dead)

DMH can be used to inform someone, that you didnt log for long period of time - and possibly you are dead or need lawyer.

It might also trigger action in some external system e.g. publish some blog post, publish message in social media or restart your server to ensure that your data stays encrypted.

Safeguard message delivery

Can be us used as safeguard mechanism for whistleblowers, journalists or activists. When you are missing, release EVERYTHING.

Side note:

  • In that case ALWAYS host DMH and Vault on different servers/environments
  • Dont use active actions(mail, sms, ...) to ask if you are still alive - those actions can be intercepted and then used to confirm that you are alive (when its not a case anymore). Find other way to inform DMH about your state, ex. visit https://dmh-domain/api/alive on your own.
  • Dont host DMH or Vault in your home/office. Nobody should be aware that DMH is in use.
  • Before depending on DMH, PLEASE DO SOME TESTING.

Dead-man-switch for other services

DMH can be used not only for humans, but it can detect other service unavailability.

Most common usecase would be "monitoring for monitoring". Imagine that you are hosting monitoring for your infrastructure. How would you know, that your monitoring is dead?

Prometheus / Victoria-metrics

  • Configure Prometheus alert which is always firing
  - alert: Watchdog
    expr: scalar(1)
    labels:
      service: dmh-watchdog
      severity: info
  • Configure Alertmanager route:
receivers:
- name: dmh
  webhook_configs:
  - send_resolved: false
    timeout: 3s
    url: http://dmh.monitoring:8080/api/alive
route:
  [...]
  routes:
  - matchers:
    - service="dmh-watchdog"
    receiver: dmh
    repeat_interval: 5m
  • Add notification action:
dmh-cli action add --kind mail --process-after 1 --min-interval 6 --data '{"message": "Monitoring stack is down, please investigate.", "subject": "DMH detected monitoring down", "destination": ["email@address.com"]}'
  • When Prometheus/Alertmanager will stop sending alert to DMH /api/alive it means that something breaks and you would receive notification.

Clone this wiki locally