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
e7801619cd
added additional tests from #187 .
...
Detected that the frontend was incorrectly classifying Scrutiny Failures as Warnings.
Fixed.
2022-05-12 10:04:06 -07:00
Jason Kulatunga
5ed69d7fc4
adding tests for Smart and parser.
2022-05-06 22:15:19 -07:00
Jason Kulatunga
1ced2198c7
cleanup log messages.
2022-05-04 21:04:58 -07:00
Jason Kulatunga
8fe0dbed6b
partially working. Some datapoints are failing with panic and are silently ignored.
...
TODO must fix.
2022-05-03 22:40:31 -07:00
Jason Kulatunga
f569ab6474
[BROKEN COMMIT]
...
This code leverages the new `types.isType` functionality introduced in the flux language (https://github.com/influxdata/flux/issues/2159 )
This code will fix https://github.com/AnalogJ/scrutiny/issues/22 and all related issues.
Unfortunately this code is broken because the influxdb go client library does not correctly handle import statments in the task defintion.
blocked by
https://github.com/influxdata/influxdb-client-go/issues/322
2022-04-27 22:41:56 -07:00
Jason Kulatunga
0872da57d7
fixes for tests.
2021-11-17 21:08:56 -08:00
Jason Kulatunga
772063a843
find the temp history for the last week (by default). Smooth out data using aggregate window for hourly numbers. Better temp casting during influx data inflating.
2021-11-16 19:07:37 -08:00
Jason Kulatunga
b776fb8886
tweaking retention policy code so we can test downsampling scripts.
2021-11-16 18:32:29 -08:00
Jason Kulatunga
ce032c5609
fixes for Scrutiny end-to-end testing.
2021-10-28 07:35:25 -07:00
Jason Kulatunga
5789c836db
make sure the status is always exposed in the json data. make sure display_name for metadata is included. Update mocked test data for frontend.
2021-10-24 17:09:44 -07:00
Jason Kulatunga
deba21fe19
update timestamps for testing.
2021-10-24 16:26:41 -07:00
Jason Kulatunga
31b5dfa038
ensure that all buckets are created during init. Remove all references to "name" field for attributes (shoudl come from metadata instead). Status is now an int64 (0 is passing).
2021-10-24 16:01:53 -07:00
Jason Kulatunga
9878985fa3
adding aggregation code
2021-10-24 13:07:12 -07:00
Jason Kulatunga
bd19230cbf
make sure data is persisted to DB.
2021-07-25 22:32:13 -07:00
Jason Kulatunga
80f4660130
validate thresholds whenever SMART data is recieved.
2021-07-25 22:11:07 -07:00
Jason Kulatunga
8a46931399
!!!!WIP!!!!
...
adding InfluxDB
- influxdb added to dockerfile
- influxdb s6 service
- influxdb config
- adding defaults to config
- creating a DeviceRepo interface (multiple db backends)
- implemented DeviceRepo interface as ScruitnyRepository
2021-06-27 10:55:18 -07:00
Jason Kulatunga
9fac3c6308
fix gorm dependency.
2020-10-07 22:07:51 -06: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
1246f5bba9
started working on notifications.
2020-09-30 08:50:10 -06:00
Jason Kulatunga
ad3f8480d9
added some anonymized nvme test data to ensure that NVMe drives are correctly processed by new device detection. thanks @Roxedus.
...
All db testing is done with files created in a temp directory.
2020-09-20 17:37:43 -06:00
Jason Kulatunga
66122778a3
only the firmware can really change between scans. Lets slim down the metadata update.
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
5101a37964
adding device protocl and type to the. Adding class for parsing smartctl --scan json output, for device detection. added an example/test file for smartctl -x -j added a placeholder settings panel. moved dashboard & details compoonent out of "Admin" directory.
2020-09-18 10:14:19 -06:00
Jason Kulatunga
86fc10b7b9
added ideal and thresholds for NVMe and SCSI drives.
...
Added functions (PopulateAttributeStatus) to ensure that NVME and SCSI drives set the status for SMART attributes.
Moved Status populating fucntion into the *Attribute files, so they are closer to the code they actually interact with.
Fix frontend to correctly display status, thresh and Ideal for NVMe and SCSI ddrives.
2020-09-08 22:24:24 -07:00
Jason Kulatunga
5dd3aed1fe
adding threshold for percentage Used.
...
Adding release pipeline.
2020-09-06 16:06:52 -07:00
Jason Kulatunga
e283d43654
rename metadata class names.
...
adding metadata for NVME and SCSI drives.
send back protocol specific metadata for displaying data in the UI for attributes.
UI - moved all metadata lookups into named functions (for better if/else logic)
show different columns if nvme or scsi.
2020-08-28 00:41:08 -07:00
Jason Kulatunga
2ad120c87b
added debug logging message for detected devices.
...
adding a mocked class for Config.
Adding device type to Device struct. Will eventually be needed for raid drives.
adding End-to-end testing capabilties.
Added testdata json files for webserver requests.
Seperated Start code and Setup code in webapp so we can test.
renamed "smart_attributes" to "ata_attributes" - Backwards incomatible change.
Added front end device sorting (red, yellow, green)
show unknown icon/status if drive has no smart data yet.
Moved all attribute "getters" into the controller.
created a device-sort pipe.
2020-08-26 21:35:13 -07:00
Jason Kulatunga
5a80ae3e74
WIP - start supporting NVME and SCSI drive smart data.
...
Added addiitonal log message data for Smartctl exit ccode.
2020-08-24 23:01:03 -07:00
Jason Kulatunga
92d54df022
adding test files.
2020-08-21 21:14:25 -07:00
Jason Kulatunga
d636709aa1
Moved version file into webapp source tree. Replacing fmt with logger calls. moved Jobber config file into /scrutiny/jobber directory. Added scsi json file. Moved API rooute handlers into their own files in a module. Added not yet implemnented tooltips.
2020-08-21 18:06:00 -07:00
Jason Kulatunga
a78e4eb001
fix failing test.
2020-08-20 23:27:07 -07:00
Jason Kulatunga
40f5cbef6c
moved hard drive device detection to collector (So we can run multiple in parallel).
2020-08-19 22:34:27 -07:00
Jason Kulatunga
8482272d45
init
2020-08-19 16:04:21 -07:00