-
-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #352 from AnalogJ/beta
- Loading branch information
Showing
57 changed files
with
1,587 additions
and
506 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Operating systems without udev | ||
|
||
Some operating systems do not come with `udev` out of the box, for example Alpine Linux. In these instances you will not be able to bind `/run/udev` to the container for sharing device metadata. Some operating systems offer `udev` as a package that can be installed separately, or an alternative (such as `eudev` in the case of Alpine Linux) that provides the same functionality. | ||
|
||
To install `eudev` in Alpine Linux (run as root): | ||
|
||
``` | ||
apk add eudev | ||
setup-udev | ||
``` | ||
|
||
Once your `udev` implementation is installed, create `/run/udev` with the following command: | ||
|
||
``` | ||
udevadm trigger | ||
``` | ||
|
||
On Alpine Linux, this also has the benefit of creating symlinks to device serial numbers in `/dev/disk/by-id`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,88 @@ | ||
|
||
// SQLite Table(s) | ||
Table device { | ||
created_at timestamp | ||
|
||
wwn varchar [pk] | ||
|
||
//user provided | ||
label varchar | ||
host_id varchar | ||
|
||
// smartctl provided | ||
device_name varchar | ||
manufacturer varchar | ||
model_name varchar | ||
interface_type varchar | ||
interface_speed varchar | ||
serial_number varchar | ||
firmware varchar | ||
rotational_speed varchar | ||
capacity varchar | ||
form_factor varchar | ||
smart_support varchar | ||
device_protocol varchar | ||
device_type varchar | ||
|
||
Table Device { | ||
//GORM attributes, see: http://gorm.io/docs/conventions.html | ||
CreatedAt time | ||
UpdatedAt time | ||
DeletedAt time | ||
|
||
WWN string | ||
|
||
DeviceName string | ||
DeviceUUID string | ||
DeviceSerialID string | ||
DeviceLabel string | ||
|
||
Manufacturer string | ||
ModelName string | ||
InterfaceType string | ||
InterfaceSpeed string | ||
SerialNumber string | ||
Firmware string | ||
RotationSpeed int | ||
Capacity int64 | ||
FormFactor string | ||
SmartSupport bool | ||
DeviceProtocol string//protocol determines which smart attribute types are available (ATA, NVMe, SCSI) | ||
DeviceType string//device type is used for querying with -d/t flag, should only be used by collector. | ||
|
||
// User provided metadata | ||
Label string | ||
HostId string | ||
|
||
// Data set by Scrutiny | ||
DeviceStatus enum | ||
} | ||
|
||
Table Setting { | ||
//GORM attributes, see: http://gorm.io/docs/conventions.html | ||
|
||
// InfluxDB Tables | ||
Table device_temperature { | ||
//timestamp | ||
created_at timestamp | ||
|
||
//tags (indexed & queryable) | ||
device_wwn varchar [pk] | ||
|
||
//fields | ||
temp bigint | ||
} | ||
|
||
SettingKeyName string | ||
SettingKeyDescription string | ||
SettingDataType string | ||
|
||
Table smart_ata_results { | ||
//timestamp | ||
created_at timestamp | ||
|
||
//tags (indexed & queryable) | ||
device_wwn varchar [pk] | ||
smart_status varchar | ||
scrutiny_status varchar | ||
SettingValueNumeric int64 | ||
SettingValueString string | ||
} | ||
|
||
|
||
// InfluxDB Tables | ||
Table SmartTemperature { | ||
Date time | ||
DeviceWWN string //(tag) | ||
Temp int64 | ||
} | ||
|
||
//fields | ||
temp bigint | ||
power_on_hours bigint | ||
power_cycle_count bigint | ||
|
||
Table Smart { | ||
Date time | ||
DeviceWWN string //(tag) | ||
DeviceProtocol string | ||
|
||
//Metrics (fields) | ||
Temp int64 | ||
PowerOnHours int64 | ||
PowerCycleCount int64 | ||
|
||
//Smart Status | ||
Status enum | ||
|
||
//SMART Attributes (fields) | ||
Attr_ID_AttributeId int | ||
Attr_ID_Value int64 | ||
Attr_ID_Threshold int64 | ||
Attr_ID_Worst int64 | ||
Attr_ID_RawValue int64 | ||
Attr_ID_RawString string | ||
Attr_ID_WhenFailed string | ||
//Generated data | ||
Attr_ID_TransformedValue int64 | ||
Attr_ID_Status enum | ||
Attr_ID_StatusReason string | ||
Attr_ID_FailureRate float64 | ||
|
||
} | ||
|
||
Ref: device.wwn < smart_ata_results.device_wwn | ||
Ref: Device.WWN < Smart.DeviceWWN | ||
Ref: Device.WWN < SmartTemperature.DeviceWWN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.