Monitoring Server + Data Collection Daemon

Christian Kahlau 8820bd2d7f Server: Readme documentation for server run on localhost hace 2 años
.vscode dd668be73d First Draft for Data Collection Daemon hace 3 años
bootstrap-theme @ c93759376b 04c7b9c048 Refactoring: moved bootstrap-theme one level up in order to use it in two angular sub projects hace 3 años
common 798cb12e9d (untested) first draft of dis-/conjunctive content checks hace 2 años
daemon 35dae47dc4 TS: enabled strict type checking on all sub-projects hace 3 años
fcm 3d8ae45e42 Server + FCM: Notify when server data request to server daemon fails hace 3 años
ng 6ad7724763 Merge branch 'feature/admin-panel' hace 2 años
server 8f59d4db26 WIP: testing / bugfixing dis/conjunctive http content checks hace 2 años
.gitignore da0da3f083 Server: FCM Admin SDK implementation; + Testing Endpoint POST /fcm/topics/:topic hace 3 años
.gitmodules 04c7b9c048 Refactoring: moved bootstrap-theme one level up in order to use it in two angular sub projects hace 3 años
.prettierrc.js dd668be73d First Draft for Data Collection Daemon hace 3 años
Readme.md 8820bd2d7f Server: Readme documentation for server run on localhost hace 2 años

Readme.md

HostBBQ Monitoring System

Monitoring Daemon

Install

curl -fsSL https://gogs.hostbbq.com/hostbbq/hostbbq-monitoring/raw/master/daemon/install/install.sh | sudo -E bash -

Monitoring Server & Web UI

Local Development

ℹ Für Entwicklungszwecke kann der Monitoring Server auch lokal betrieben werden. ⚠ Dabei muss allerdings darauf geachtet werden, dass der Sync für die Server Metrics deaktiviert ist (DEV_MODE=1), damit der lokale DEV Server nicht der Live-Instanz die Server Metrics Daten weg klaut.

  1. Runtime Dependencies installieren:

    $ cd server/
    $ npm install
    
  2. Live-Datenbank kopieren:

z.B. per Terminal mittels scp:

$ mkdir data
$ scp -p <user>@portantonio.hostbbq.net:/opt/hbbq/monitoring/data/data.db ./data/data-live.db

# data/data-live.db als Sicherung behalten, falls was schief geht,
# data/data.db aus Kopie von data/data-live.db erstellen:
$ cp data/data-live.db data/data.db

... oder auch einfach manuell mit WinSCP/FileZilla/... (ℹ Das Datenbank-File muss nach server/data/data.db - falls Unterordner noch nicht vorhanden, anlegen.)

  1. .env-File (in server/-Root) mit folgendem Inhalt anlegen:

    LOG_LEVEL=DEBUG
    WEB_PORT=8880
    DATA_DIR=data
    GOOGLE_APPLICATION_CREDENTIALS="google-cloud/firebase-adminsdk.json"
    NOTIFICATION_ICON_URL="https://fcm.hostbbq.net/logo.png"
    DEV_MODE=1
    
  2. Server starten:

    $ npm start
    

Danach sollte der Server unter [http://localhost:8880]() zur Verfügung stehen.

  1. Angular Dev Server Proxy umleiten:

ng/proxy-conf.json:

@@ -1,7 +1,7 @@
 [
   {
     "context": ["/api"],
-    "target": "http://10.8.0.1:8880",
+    "target": "http://localhost:8880",
     "secure": false,
     "pathRewrite": { "^/api": "" }
   }
  1. Angular Dev Server wie gewohnt starten:

    $ cd ng/
    $ (npm install)?
    $ npm start
    

Install

curl -fsSL https://gogs.hostbbq.com/hostbbq/hostbbq-monitoring/raw/master/server/install/install.sh | sudo -E bash -

HostBBQ FCM Registration Service

Install

curl -fsSL https://gogs.hostbbq.com/hostbbq/hostbbq-monitoring/raw/master/fcm/install/install.sh | sudo -E bash -