-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
adding support for a collector config file. #88
Conversation
/scrutiny/config/collector.yaml Adding ability to specify host identifier (label), that is updated on every collector run. Can be specified by `host-id` CLI or `COLLECTOR_HOST_ID` env var. Created a config class, interface and associated tests. Created a "TransformDetectedDrives" function, that will allow users to insert drives not detected by Smarctl --scan, ignore drives that they dont want, and override smartctl device type. Added Upsert functionality when registering devices. Replaced "github.com/jinzhu/gorm" with "gorm.io/gorm" (ORM location moved, was using incorrect lib url) Removed machineid library.
Codecov Report
@@ Coverage Diff @@
## master #88 +/- ##
==========================================
+ Coverage 32.86% 40.06% +7.19%
==========================================
Files 12 14 +2
Lines 286 332 +46
==========================================
+ Hits 94 133 +39
- Misses 187 189 +2
- Partials 5 10 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This config is working great for me for 2 SAS and 2 SATA drives on an H240 controller as HBA. I'm also running scrutiny on multiple hosts in docker with the standalone connector and not seeing any obvious issues yet. Nice work!
|
Works for me! I'm using the 3ware type for 7 SATA drives, and it works great! Good to see all my drives are healthy :) |
Awesome! Thanks for the feedback :) |
Thanks for the patch, confirm this is also working great for my Synology DS1513 + 2 expansion units. |
Hello, First of all, wonderful piece of software 👍 I run Scrutiny on a Kubernetes cluster, where it is not possible to passthrough devices to unprivileged containers. I'm running scrutiny with It seems that I should be using the "ignore: true" features on "devices" in collector.yaml , but I cannot know how many volumes will be present on each drives, so I cannot ignore specific devices. I would like something like this to be working :
It seems that this is not working, as scrutiny-web still reports dozen of unwanted ISCI drives. Thanks |
Hey @auricom Unfortunately there's no way to block a device type completely, only individual devices. |
hello, |
Glad this is in here, hopefully makes it to the readme at some point. I got some nice metrics (woo, cool, great app) for my hp server running hpsa (HP Storage Array RAID) type--took a bit of digging into smartctl to find:
but putting the -d stuff in the config file worked a charm. Maybe it'll show up if anyone searches and runs into the same thing. I got here from the dell megaraid thread. Also I'm dumb and didn't read the comments fully in the sample config. XD Woulda made it a little more obvious. |
This is still a WIP. But here's an example of what the
collector
config file will look like:You can test it out yourself by using the
analogj/scrutiny:detect
docker image. Then just create acollector.yaml
file in the host directory you bind to/scrutiny/config
:Current Changelog
Adding ability to specify host identifier (label), that is updated on every collector run.
Can be specified by
host-id
CLI orCOLLECTOR_HOST_ID
env var.Created a config class, interface and associated tests.
Created a "TransformDetectedDrives" function, that will allow users to insert drives not detected by Smarctl --scan, ignore drives that they dont want, and override smartctl device type.
Added Upsert functionality when registering devices.
Replaced "github.com/jinzhu/gorm" with "gorm.io/gorm" (ORM location moved, was using incorrect lib url)
Removed machineid library.
fixes #46
fixes #45
fixes #48
fixes #39
related #50 - adds a HostID to the database that is updated on every collector run. Not displayed in UI yet.