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] scrutiny in rootless mode Docker #718

Open
seawolf82 opened this issue Nov 20, 2024 · 0 comments
Open

[BUG] scrutiny in rootless mode Docker #718

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

Comments

@seawolf82
Copy link

Describe the bug
Hi,
I'm trying to run scrutiny in rootless mode with docker but it doesn't work. I obtain this error:

time="2024-11-20T08:23:45Z" level=info msg="Executing command: smartctl --info --json --device sat /dev/sda" type=metrics
time="2024-11-20T08:23:45Z" level=error msg="Could not retrieve device information for sda: exit status 2" type=metrics

Expected behavior
The behavior I expect instead is to receive the information on the device. How I can fix it?

Log Files
If related to missing devices or SMART data, please run the collector in DEBUG mode, and attach the log file.
See /docs/TROUBLESHOOTING_DEVICE_COLLECTOR.md for other troubleshooting tips.

services:
  scrutiny:
    container_name: scrutiny
    image: ghcr.io/analogj/scrutiny:master-omnibus
    cap_add:
      - SYS_RAWIO
      - SYS_ADMIN
    ports:
      - 6090:8080/tcp # webapp
      - 8086:8086/tcp # influxDB admin
    volumes:
      - /run/udev:/run/udev:ro
      - /media/NAS/scrutiny:/opt/scrutiny/config
      - /media/NAS/scrutiny/influxdb:/opt/scrutiny/influxdb

    devices:
      - /dev/sda:/dev/sda
    environment:
      - SCRUTINY_WEB_INFLUXDB_TOKEN=ANYLONGSTRING
      - SCRUTINY_WEB_INFLUXDB_INIT_USERNAME=influxdb
      - SCRUTINY_WEB_INFLUXDB_INIT_PASSWORD=influxdb
      - COLLECTOR_CRON_SCHEDULE=0 * * * *
    security_opt:
      - no-new-privileges:true
    restart: unless-stopped

# in another terminal trigger the collector
docker exec scrutiny /opt/scrutiny/bin/scrutiny-collector-metrics run

2024/11/20 08:23:45 Loading configuration file: /opt/scrutiny/config/collector.yaml


/ ) / )( _ ( )( )( )( )( ( )( / )
_
( (
) / )(
)( )( )( ) ( \ /
(
/ _)()_)() () ()()_) (__)
AnalogJ/scrutiny/metrics dev-0.8.1

time="2024-11-20T08:23:45Z" level=info msg="Verifying required tools" type=metrics
time="2024-11-20T08:23:45Z" level=info msg="Executing command: smartctl --scan --json" type=metrics
time="2024-11-20T08:23:45Z" level=info msg="Executing command: smartctl --info --json --device sat /dev/sda" type=metrics
time="2024-11-20T08:23:45Z" level=error msg="Could not retrieve device information for sda: exit status 2" type=metrics
time="2024-11-20T08:23:45Z" level=info msg="Sending detected devices to API, for filtering & validation" type=metrics
time="2024-11-20T08:23:45Z" level=info msg="Main: Completed" type=metrics

@seawolf82 seawolf82 added the bug Something isn't working label Nov 20, 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