Make sure that the collector attempts to correctly communicate with webapp container, even when running in dedicated container (and triggered manually).
fixes cron schedule to run daily.
added instructions for dedicated containers.
This commit is contained in:
Jason Kulatunga
2020-09-18 09:23:39 -06:00
parent 458eaf2726
commit 266c95f857
5 changed files with 30 additions and 13 deletions
+13
View File
@@ -66,6 +66,19 @@ In addition to the Omnibus image (available under the `latest` tag) there are 2
- `analogj/scrutiny:collector` - Contains the Scrutiny data collector, `smartctl` binary and cron-like scheduler. You can run one collector on each server.
- `analogj/scrutiny:web` - Contains the Web UI, API and Database. Only one container necessary
```bash
docker run -it --rm -p 8080:8080 \
--name scrutiny-web \
analogj/scrutiny:web
docker run -it --rm \
-v /run/udev:/run/udev:ro \
-v /dev/disk:/dev/disk \
-e SCRUTINY_API_ENDPOINT=http://SCRUTINY_WEB_IPADDRESS:8080 \
--name scrutiny-collector \
--privileged analogj/scrutiny:collector
```
## Usage
@@ -102,11 +102,13 @@ OPTIONS:
Name: "api-endpoint",
Usage: "The api server endpoint",
Value: "http://localhost:8080",
EnvVars: []string{"SCRUTINY_API_ENDPOINT"},
},
&cli.BoolFlag{
Name: "debug",
Usage: "Enable debug logging",
EnvVars: []string{"DEBUG"},
},
},
},
@@ -102,11 +102,13 @@ OPTIONS:
Name: "api-endpoint",
Usage: "The api server endpoint",
Value: "http://localhost:8080",
EnvVars: []string{"SCRUTINY_API_ENDPOINT"},
},
&cli.BoolFlag{
Name: "debug",
Usage: "Enable debug logging",
EnvVars: []string{"DEBUG"},
},
},
},
+1 -1
View File
@@ -15,7 +15,7 @@ FROM node:lts-slim as frontendbuild
ENV NPM_CONFIG_LOGLEVEL=warn NG_CLI_ANALYTICS=false
WORKDIR /scrutiny/src
COPY ./webapp/frontend /scrutiny/src
COPY webapp/frontend /scrutiny/src
RUN npm install -g @angular/cli@9.1.4 && \
mkdir -p /scrutiny/dist && \
+2 -2
View File
@@ -19,9 +19,9 @@ resultSinks:
jobs:
MetricsJob:
cmd: /scrutiny/bin/scrutiny-collector-metrics run --api-endpoint ${SCRUTINY_API_ENDPOINT:-http://localhost:8080}
cmd: /scrutiny/bin/scrutiny-collector-metrics run
# run daily at midnight.
time: '0 0 * * *'
time: '0 0 0 * * *'
onError: Backoff
notifyOnSuccess:
- *filesystemSink