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.
pull/28/head
Jason Kulatunga 4 years ago
parent 458eaf2726
commit 266c95f857

@ -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: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 - `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 ## Usage

@ -99,14 +99,16 @@ OPTIONS:
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.StringFlag{ &cli.StringFlag{
Name: "api-endpoint", Name: "api-endpoint",
Usage: "The api server endpoint", Usage: "The api server endpoint",
Value: "http://localhost:8080", Value: "http://localhost:8080",
EnvVars: []string{"SCRUTINY_API_ENDPOINT"},
}, },
&cli.BoolFlag{ &cli.BoolFlag{
Name: "debug", Name: "debug",
Usage: "Enable debug logging", Usage: "Enable debug logging",
EnvVars: []string{"DEBUG"},
}, },
}, },
}, },

@ -99,14 +99,16 @@ OPTIONS:
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.StringFlag{ &cli.StringFlag{
Name: "api-endpoint", Name: "api-endpoint",
Usage: "The api server endpoint", Usage: "The api server endpoint",
Value: "http://localhost:8080", Value: "http://localhost:8080",
EnvVars: []string{"SCRUTINY_API_ENDPOINT"},
}, },
&cli.BoolFlag{ &cli.BoolFlag{
Name: "debug", Name: "debug",
Usage: "Enable debug logging", Usage: "Enable debug logging",
EnvVars: []string{"DEBUG"},
}, },
}, },
}, },

@ -15,7 +15,7 @@ FROM node:lts-slim as frontendbuild
ENV NPM_CONFIG_LOGLEVEL=warn NG_CLI_ANALYTICS=false ENV NPM_CONFIG_LOGLEVEL=warn NG_CLI_ANALYTICS=false
WORKDIR /scrutiny/src WORKDIR /scrutiny/src
COPY ./webapp/frontend /scrutiny/src COPY webapp/frontend /scrutiny/src
RUN npm install -g @angular/cli@9.1.4 && \ RUN npm install -g @angular/cli@9.1.4 && \
mkdir -p /scrutiny/dist && \ mkdir -p /scrutiny/dist && \

@ -19,9 +19,9 @@ resultSinks:
jobs: jobs:
MetricsJob: 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. # run daily at midnight.
time: '0 0 * * *' time: '0 0 0 * * *'
onError: Backoff onError: Backoff
notifyOnSuccess: notifyOnSuccess:
- *filesystemSink - *filesystemSink

Loading…
Cancel
Save