sermoni

"Service monitor" / cronjob status service
Log | Files | Refs

commit a89fc3c8f6256f8cbcc4f5e98e7eb83facab8ad9
parent 579d1a37a3b2c66955a433892c234d33c9b7cd69
Author: Vetle Haflan <vetle@haflan.dev>
Date:   Fri,  7 Aug 2020 01:45:16 +0200

Include event title in sermonic and on website +

Diffstat:
M.gitlab-ci.yml | 2+-
Minternal/http/setup.go | 7++++---
Mui/src/Events.vue | 1+
3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -build_image: +build: script: - docker build --no-cache -t d.haflan.dev/general/sermoni:latest . - docker push d.haflan.dev/general/sermoni diff --git a/internal/http/setup.go b/internal/http/setup.go @@ -18,8 +18,7 @@ var setupScriptTemplate = template.Must(template.New("setupScript").Parse(`#/bin # The easiest way to set up services is to run the following as root / su: # $ . <(curl -fsSL {{.HostName}}/setup) -# Generate this on server, based on host name: -sermoni={{.HostName}} +sermoni=https://{{.HostName}} ### Create unique token unless one exists if [ ! -f $HOME/.sermoni-token ]; then @@ -43,7 +42,7 @@ INSTALL_DIR=$BIN_DIR # Use first path from $PATH cat <<- 'EOF' > $INSTALL_DIR/sermonicli #!/bin/bash -sermoni={{.HostName}} +sermoni=https://{{.HostName}} TOKEN="$(cat $HOME/.sermoni-token)" # Prompt for password until the correct one is given @@ -184,9 +183,11 @@ if [ $RESULT -ne 0 -o -s "$ERR" ]; then fi details=$(json_escape "$(cat $FULLDETAILS)") status=error + title="'$(basename $2)' failed" else details=$(json_escape "$(cat $OUT)") status=ok + title="'$(basename $2)' finished successfully" fi sermonicli report $SERVICEID $status "$title" "$details" diff --git a/ui/src/Events.vue b/ui/src/Events.vue @@ -10,6 +10,7 @@ <!--<mq-layout mq="md+">--> <div class="event-field">{{ simplifyDate(e.timestamp) }}</div> <!--</mq-layout>--> + <div class="event-field">{{ e.title }}</div> <button v-show="e.id > 0" class="delete-button">&times;</button> </div> <div v-show="e.open" style="padding: 5px; border: 1px solid rgba(0,0,0,.125); border-top: 0">