mcarbonne
6362512406
Update go to 1.25 ( #875 )
...
Closes #872
* update go to 1.25
* update deprecated gomock
* remove deprecated ioutil
* update (and fix) ci
* add golang lint (as warning)
* enable formatters + freeze golang version
2026-02-08 20:46:36 -08:00
Jason Kulatunga
3de12cd739
Merge branch 'master' into override-config-with-env-variables
2025-01-04 15:26:10 -07:00
Pablo Garcia
9ad96e6d37
Change to time.Seconds
2024-11-26 15:13:44 +01:00
Pablo Garcia
85d98316f3
Issue 706: Fix time unit
2024-11-26 10:46:27 +01:00
Pablo Garcia Alvarez
c168e1e9fc
Add check for the wait
2024-11-11 22:07:57 +01:00
Pablo Garcia
56a9454730
Add a wait between disks checks
2024-11-07 11:54:46 +01:00
Martin Kleine
a783604c4e
Feature: Use automatic binding of env variables
2024-10-15 00:18:54 +02:00
Martin Kleine
604dcf355c
feat: Ability to override commands args
...
In order to override the arguments which are used e.g. to call smartctl, they need to be bind to the respective environment variable.
2024-10-15 00:18:54 +02:00
Nic Johnson
c9429c61b2
feat: create allow-list for filtering down devices to only a subset
2024-09-11 23:12:00 -05:00
Thomas Way
db86bac9ef
fix(collector): show correct nvme capacity
...
Some nvme devices do not report their capacity through the usual
'user_capacity' field, instead the total capacity is reported with the
'nvme_total_capacity' field.
Fixes : #466
2024-01-23 22:02:02 +00:00
Michael Manganiello
932e191510
Allow configuration files with yml extension
...
If a `collector.yml` or `scrutiny.yml` configuration file is present,
use it as long as a `.yaml` version is not available too.
Fixes #79
2023-04-06 20:55:22 -03:00
Jason Kulatunga
22d2f9847c
fixes #418
...
when using device type `sat,auto`, scrutiny config parser will treat `type: 'sat,auto'` as a list, which will cause it to be treated like a raid disk. force single command execution using `type: ['sat,auto']`
2023-01-11 17:24:01 -08:00
adripo
222b8103d6
fix: increase timeout
2022-11-05 04:14:44 +01:00
Jason Kulatunga
f823127825
simplify logger creation (move logic into a function in main packages)
...
Ensure logger creation is consistent between Web and Collector
Create logger in main, pass down to downstream functions (like gin)
In debug mode, print a copy of AppConfig
Better debugging for logger.
2022-08-03 22:51:44 -07:00
Jason Kulatunga
8e05b2e2f8
Revert "add a solaris collector detect engine."
...
This reverts commit 64e1c93d16 .
https://gitlab.com/cznic/sqlite does not support Solaris.
> build constraints exclude all Go files in /home/runner/work/scrutiny/scrutiny/vendor/modernc.org/libc/errno
related #120
2022-07-11 20:52:15 -07:00
Jason Kulatunga
64e1c93d16
add a solaris collector detect engine.
2022-07-11 20:48:30 -07:00
Jason Kulatunga
5ea149d878
upgrading to go 1.18 for generics (and lodash-like library).
...
devices with an empty wwn should be filtered out (not uploaded during device registration, skipped when attempting to upload metrics).
added a migration to delete existing device entries with an empty `wwn`
fixes #314
2022-07-09 18:28:49 -07:00
Jason Kulatunga
3d9001a5e4
when deviceType not specified in collector config, scrutiny will ignore the device. We need to make sure we correctly override the device.
...
fixes #255
2022-06-25 11:19:44 -07:00
Jason Kulatunga
d718b0898b
trying to fix tests.
2022-06-20 17:21:27 -07:00
Jason Kulatunga
157c93b967
provide a mechanism to specify the absolute path to the smartctl binary used by metrics collector.
...
- fixes #304
2022-06-20 12:09:56 -07:00
Jason Kulatunga
a53397210c
adding mechanism to override the smartctl commands used by scrutiny for device scanning, device identification and smart data retrieval.
...
adding tests for command overrides.
rename GetScanOverrides() to GetDeviceOverrides()
fixes #255
2022-05-28 15:32:44 -07:00
Jason Kulatunga
999c12748c
added a way to retrieve raw udev data. Can be used to retrieve disk label, UUID and "disk/by-id/*" device info.
...
Storing it in the database during device registration.
2022-05-20 20:59:29 -07:00
Jason Kulatunga
eb4a738746
documentation & updates for configuring scrutiny behind a reverse proxy with path rewriting.
2022-05-09 16:37:05 -07:00
Jason Kulatunga
381a6799cc
updates for v0.4.0 release. Slight refactor/organization.
2022-05-09 14:50:35 -07:00
Jason Kulatunga
de702414b9
moving all filesystem references to /scrutiny to /opt/scrutiny
...
fixes #230
2022-05-09 09:29:39 -07:00
Jason Kulatunga
21d07a0712
adding tests for Detect struct in collector. Adding ability to mock out exec.Command calls.
2022-05-06 20:07:23 -07:00
Jason Kulatunga
fabc629e40
handle case where WWN not detected for a device (print error messages, but skip device collection & uploading).
2022-05-05 23:03:06 -07:00
Jason Kulatunga
97f6564c1e
adding documetnation for smartctl exit codes and addl test.
2022-05-02 10:26:25 -07:00
Jason Kulatunga
2fc24d0e76
fix error log.
2021-04-25 20:14:58 -07:00
Jason Kulatunga
da890d95b6
Fixing forced logging of smartctl output irrespective of log level (now available at DEBUG level only)
...
TODO: add a table summary at INFO level.
fixes #123
2021-04-25 11:34:26 -07:00
Jason Kulatunga
e5713e3a81
added ability to configure collector variables using config file (api endpoint, log level, log file).
...
fixes #124
2021-04-25 11:24:03 -07:00
Jason Kulatunga
58eaa29e4d
check for "unknown" wwn value.
...
fix #113
2020-10-27 08:25:44 -07:00
Ricardo Gonzalez
048bf237e2
Use StringFlag
2020-10-18 00:44:11 +01:00
Jason Kulatunga
b44ef5cb9c
adding support for a collecto config file.
...
/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.
2020-10-07 21:54:29 -06:00
Jason Kulatunga
1c7ca35ea7
build freebsd binaries for CI (not included in releases yet)
2020-10-03 14:38:19 -06:00
Jason Kulatunga
7742f4c6c3
fixing windows binary build during CI. Update config missing error message.
2020-09-29 16:16:15 -06:00
Jason Kulatunga
cb0aa9823e
retrieve all device data. SAS devices do not return power on hours when using -a flag (unlike other device types).
...
fixes #43
fixes #9
2020-09-26 15:18:55 -06:00
Jason Kulatunga
e44864e64b
fixes.
2020-09-23 11:01:53 -06:00
Jason Kulatunga
8a336bf5c6
wwn should always be lowercase for consistency. It's used in the URL for pushing smart data.
2020-09-23 10:37:59 -06:00
Jason Kulatunga
2fee2bf906
fix tests.
2020-09-21 21:22:07 -06:00
Jason Kulatunga
a57120d600
adding new environmental variables for added debugging: COLLECTOR_LOG_FILE, COLLECTOR_DEBUG, DEBUG, SCRUTINY_LOG_FILE, SCRUTINY_DEBUG
2020-09-21 18:41:52 -06:00
Jason Kulatunga
f2dd87cf82
dont use a go-routine -- disable concurrency.
2020-09-21 09:59:52 -06:00
Jason Kulatunga
8b139ad157
remove concurrency for collector, it causes issues on systems with lots of devices. Just retrieve the data in order for now (eventually we may do it in batches).
2020-09-21 08:44:50 -06:00
Jason Kulatunga
fd82e9a4da
print error message if publish does not finish successfully.
2020-09-20 17:37:43 -06:00
Jason Kulatunga
297f0a51c5
adding ability to write a log file with all output from collector. Executing commands will now log be logged (and when debug is enabled, their output's are also logged).
2020-09-20 17:37:43 -06:00
Jason Kulatunga
24262f7c8c
pass deviceType when running smartctl data collection (for megaraid type disks).
...
Make DevicePrefix a public function available outside the detect module.
if device type is detected as "ata" or "scsi", dont pass in via -d parameter, can cause issues with missing data.
2020-09-20 17:37:43 -06:00
Jason Kulatunga
3deca46851
fix.
2020-09-20 17:37:43 -06:00
Jason Kulatunga
23d5b86b1b
new device detection engine (OS aware). Uses smartctl --scan to detect drives (and conditionally uses jaypipes/ghw). WWN is calculated from smartctl data, then retrieved from GHW, and fallsback to serial number. WWN calcuation code is based on IEEE spec, for "Registered" IEEE format - NAA5. TODO: support NAA6 and other formats?
2020-09-20 17:37:43 -06:00
Jason Kulatunga
853b1a7249
Merge pull request #28 from AnalogJ/notify_failures
...
Adding UI for settings (and eventually notifications).
2020-09-18 14:44:24 -06:00
Jason Kulatunga
a7cd912318
dont ignore NVME storage controllers.
2020-09-18 10:43:14 -06:00