- type: custom-api title: Uptime Status title-url: ${UPTIME_KUMA_URL} hide-header: true url: ${UPTIME_KUMA_URL}/api/status-page/${UPTIME_KUMA_STATUS_SLUG} subrequests: heartbeats: url: ${UPTIME_KUMA_URL}/api/status-page/heartbeat/${UPTIME_KUMA_STATUS_SLUG} cache: 5m template: | {{ $hb := .Subrequest "heartbeats" }} {{ if not (.JSON.Exists "publicGroupList") }}

Error reading response

{{ else if eq (len (.JSON.Array "publicGroupList")) 0 }}

No monitors found

{{ else }}
{{ range .JSON.Array "publicGroupList" }} {{ range .Array "monitorList" }} {{ $id := .String "id" }} {{ $name := .String "name" }} {{ $hbPath := concat "heartbeatList." $id }} {{ $hbArray := $hb.JSON.Array $hbPath }} {{ $latest := "" }} {{ range $hbArray }}{{ $latest = . }}{{ end }}
{{ if eq $name "AvEmy" }} {{ else if eq $name "ayris.tech" }} {{ else if eq $name "AyrisApart" }} {{ else if eq $name "irisiptv.online" }} {{ else if eq $name "screencapr.com" }} {{ else if eq $name "Portainer" }} {{ else if eq $name "Backrest" }} {{ else }} {{ end }}
{{ $name }}
{{ if $latest }} {{ if eq ($latest.String "status") "1" }} OK {{ $latest.Int "ping" }}ms {{ else }} DOWN {{ if $latest.Exists "msg" }} {{ $latest.String "msg" }} {{ end }} {{ end }} {{ else }} No data {{ end }}
{{ if $latest }} {{ if eq ($latest.String "status") "1" }} {{ else }} {{ end }} {{ else }} {{ end }}
{{ end }} {{ end }}
{{ end }}