You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.4 KiB

  1. {% load hc_extras humanize %}
  2. {
  3. "username": "healthchecks.io",
  4. "icon_url": "https://healthchecks.io/static/img/[email protected]",
  5. "attachments": [{
  6. {% if check.status == "up" %}
  7. "color": "good",
  8. {% else %}
  9. "color": "danger",
  10. {% endif %}
  11. "fallback": "The check \"{{ check.name_then_code|escapejs }}\" is {{ check.status|upper }}.",
  12. "mrkdwn_in": ["fields"],
  13. "text": "“{{ check.name_then_code|escapejs }}” is {{ check.status|upper }}.",
  14. "fields": [
  15. {
  16. "title": "Period",
  17. "value": "{{ check.timeout|hc_duration }}",
  18. "short": true
  19. },
  20. {
  21. "title": "Last Ping",
  22. {% if check.last_ping %}
  23. "value": "{{ check.last_ping|naturaltime }}",
  24. {% else %}
  25. "value": "Never",
  26. {% endif %}
  27. "short": true
  28. },
  29. {% if check.tags_list %}
  30. {
  31. "title": "Tags",
  32. "value": "{% for tag in check.tags_list %}`{{ tag|escapejs }}` {% endfor %}",
  33. "short": true
  34. },
  35. {% endif %}
  36. {
  37. "title": "Total Pings",
  38. "value": {{ check.n_pings }},
  39. "short": true
  40. }
  41. ]
  42. }]
  43. }