-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Badge
(Version >= 1.16.0)
status
, ping
, uptime
, avg-response
, cert-exp
and response
-badges are generated locally.
The server does this for all monitors which have been added to status pages and have thus been published.
The design is based on badge-maker aka. shields.io.
These are the endpoints that return an SVG graphic for a given (public) monitor:
Badge Type | URL scheme | URL example | Graphic example |
---|---|---|---|
status |
<kuma-url>/api/badge/:monitorID/status |
<kuma-url>/api/badge/1/status |
|
uptime |
<kuma-url>/api/badge/:monitorID/uptime:duration |
<kuma-url>/api/badge/1/uptime |
|
ping |
<kuma-url>/api/badge/:monitorID/ping:duration |
<kuma-url>/api/badge/1/ping |
|
avg-response |
<kuma-url>/api/badge/:monitorID/avg-response:duration |
<kuma-url>/api/badge/1/avg-response |
|
cert-exp |
<kuma-url>/api/badge/:monitorID/cert-exp |
<kuma-url>/api/badge/1/cert-exp |
|
response |
<kuma-url>/api/badge/:monitorID/response |
<kuma-url>/api/badge/1/response |
Tip
We have an Badge Generator integrated which makes this configuration more interactive.
You can use said generator via:
-
navigating to a status page in edit mode
-
Clicking on the settings icon
-
Clicking on the
Open Badge Maker
-button -
filling out the form to create your own badge
There are options to customize the status badge's appearance:
-
upLabel
,Default value: Up -
downLabel
, Default value: Down upColor
downColor
Examples
Badge | Url |
---|---|
<kuma-url>/api/badge/<monitorId>/status?upLabel=<upLabel>&downLabel=<downLabel> |
|
<kuma-url>/api/badge/<monitorId>/status?upColor=white&downColor=black |
There are options to customize the ping, uptime, avg-response and response badge's text:
labelPrefix
label
-
labelSuffix
, Default: value: uptime, ping & avg-response image=h
prefix
-
suffix
, Default value: uptime=%
, ping, avg-response & response=ms
color
labelColor
Examples
Badge | Url |
---|---|
<kuma-url>/api/badge/<monitorId>/ping/24?labelPrefix=<labelPrefix>&label=<label>&labelSuffix=<labelSuffix>&prefix=<prefix>&suffix=<suffix> |
|
<kuma-url>/api/badge/<monitorId>/uptime/24?labelPrefix=<labelPrefix>&label=<label>&labelSuffix=<labelSuffix>&prefix=<prefix>&suffix=<suffix> |
|
<kuma-url>/api/badge/<monitorId>/avg-response/24?labelPrefix=<labelPrefix>&label=<label>&labelSuffix=<labelSuffix>&prefix=<prefix>&suffix=<suffix> |
The default uptime badge's color is based on the uptime percentage:
but can be overwritten with predefined color or any other color in HEX code:
The given time interval at Badge Duration (in hours)
has to be in 'hours', but customizing options allow for a different display:
Example
Badge | Url |
---|---|
<kuma-url>/api/badge/1/uptime/720?label=30&labelSuffix=d |
There are the same options like ping, uptime and avg-response and additional to customize the cert-exp badge's text:
upColor
downColor
warnDays
downDays
The different badge styles as defined by https://shields.io/#styles. (thx @throwabird / comment )
-
flat
(default) flat-square
plastic
for-the-badge
social
Example
Badge | Url |
---|---|
<kuma-url>/api/badge/<monitorId>/status?style=flat-square |