Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Scan only runs on startup #707

Open
goaliedude3919 opened this issue Nov 1, 2024 · 0 comments
Open

[BUG] Scan only runs on startup #707

goaliedude3919 opened this issue Nov 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@goaliedude3919
Copy link

Describe the bug
The scan only runs when the docker container is restarted, it never runs when it should via cron.

Expected behavior
I expect the scans to run daily based on the cron

Screenshots
Screenshot

Log Files
Logs show no errors that I can see and nothing happens at the time the cron should run.

Docker Compose

version: "3.3"
services:
  scrutiny:
    container_name: scrutiny
    image: ghcr.io/analogj/scrutiny:master-omnibus
    cap_add:
      - SYS_RAWIO
      - SYS_ADMIN
    ports:
      - "6090:8080" # webapp
      - "8086:8086" # influxDB admin
    volumes:
      - /run/udev:/run/udev:ro
      - /volume1/docker/scrutiny:/opt/scrutiny/config
      - /volume1/docker/scrutiny/influxdb:/opt/scrutiny/influxdb
    devices:
      - /dev/sata1:/dev/sata1
      - /dev/sata2:/dev/sata2

    environment:
      - SCRUTINY_WEB_INFLUXDB_TOKEN=<token>
      - SCRUTINY_WEB_INFLUXDB_INIT_USERNAME=<user>
      - SCRUTINY_WEB_INFLUXDB_INIT_PASSWORD=<pass>
      - COLLECTOR_CRON_SCHEDULE=0 23 * * *

    restart: unless-stopped

in another terminal trigger the collector
docker exec scrutiny scrutiny-collector-metrics run
I ran this command but it did not produce any log file in the config directory

$ sudo docker exec scrutiny scrutiny-collector-metrics run
2024/11/01 13:20:47 Loading configuration file: /opt/scrutiny/config/collector.yaml
time="2024-11-01T13:20:47Z" level=info msg="Verifying required tools" type=metrics
time="2024-11-01T13:20:47Z" level=info msg="Executing command: smartctl --scan --json" type=metrics

 ___   ___  ____  __  __  ____  ____  _  _  _  _
/ __) / __)(  _ \(  )(  )(_  _)(_  _)( \( )( \/ )
\__ \( (__  )   / )(__)(   )(   _)(_  )  (  \  /
(___/ \___)(_)\_)(______) (__) (____)(_)\_) (__)
AnalogJ/scrutiny/metrics                                dev-0.8.0

time="2024-11-01T13:20:47Z" level=info msg="Executing command: smartctl --info --json --device sat /dev/sata1" type=metrics
time="2024-11-01T13:20:47Z" level=info msg="Generating WWN" type=metrics
time="2024-11-01T13:20:47Z" level=info msg="Executing command: smartctl --info --json --device sat /dev/sata2" type=metrics
time="2024-11-01T13:20:47Z" level=info msg="Generating WWN" type=metrics
time="2024-11-01T13:20:47Z" level=info msg="Sending detected devices to API, for filtering & validation" type=metrics
time="2024-11-01T13:20:47Z" level=info msg="Collecting smartctl results for sata1\n" type=metrics
time="2024-11-01T13:20:47Z" level=info msg="Executing command: smartctl --xall --json --device sat /dev/sata1" type=metrics
time="2024-11-01T13:20:48Z" level=info msg="Publishing smartctl results for 0x5000c500c8547871\n" type=metrics
time="2024-11-01T13:21:01Z" level=info msg="Collecting smartctl results for sata2\n" type=metrics
time="2024-11-01T13:21:01Z" level=info msg="Executing command: smartctl --xall --json --device sat /dev/sata2" type=metrics
time="2024-11-01T13:21:02Z" level=info msg="Publishing smartctl results for 0x5000c500c8900308\n" type=metrics
time="2024-11-01T13:21:14Z" level=info msg="Main: Completed" type=metrics
/volume1/docker/scrutiny$ ls -l
total 40
-rwxrwxrwx+ 1 <user> users   112 Mar 20  2024 collector.yaml
drwxrwxrwx+ 1 <user> users    86 Mar 20  2024 influxdb
-rwxrwxrwx+ 1 root      root  28672 Nov  1 08:21 scrutiny.db
-rwxrwxrwx+ 1 <user>  users  4360 Mar 20  2024 scrutiny.yaml

Please also provide the output of docker info

$ sudo docker info
Client:
 Context:    default
 Debug Mode: false

Server:
 Containers: 26
  Running: 19
  Paused: 0
  Stopped: 7
 Images: 94
 Server Version: 20.10.23
 Storage Driver: btrfs
  Build Version: Btrfs v4.0
  Library Version: 101
 Logging Driver: db
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs db fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: b23a389d8c181697302d163356e97dec04eb8d88
 runc version: 5af893d
 init version: ed96d00
 Security Options:
  apparmor
 Kernel Version: 4.4.302+
 Operating System: Synology NAS

 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 17.42GiB
 Name: Skelton-NAS
 ID: 3DMI:IMQT:S5NW:XXFJ:SLXV:I75K:75L3:E7HN:VBBM:25TB:EH7N:FY2P
 Docker Root Dir: /volume1/@docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No kernel memory TCP limit support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
@goaliedude3919 goaliedude3919 added the bug Something isn't working label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant