Documentation
¶
Index ¶
- Constants
- type Notify
- func (n *Notify) GenShoutrrrNotificationParams(shoutrrrUrl string) (string, *shoutrrrTypes.Params, error)
- func (n *Notify) Send() error
- func (n *Notify) SendScriptNotification(scriptUrl string) error
- func (n *Notify) SendShoutrrrNotification(shoutrrrUrl string) error
- func (n *Notify) SendWebhookNotification(webhookUrl string) error
- type Payload
Constants ¶
View Source
const NotifyFailureTypeEmailTest = "EmailTest"
View Source
const NotifyFailureTypeSmartErrorLog = "SmartErrorLog"
View Source
const NotifyFailureTypeSmartFailure = "SmartFailure"
View Source
const NotifyFailureTypeSmartPrefail = "SmartPreFailure"
View Source
const NotifyFailureTypeSmartSelfTest = "SmartSelfTestLog"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notify ¶
type Notify struct { Logger logrus.FieldLogger Config config.Interface Payload Payload }
func (*Notify) GenShoutrrrNotificationParams ¶
func (*Notify) SendScriptNotification ¶
func (*Notify) SendShoutrrrNotification ¶
func (*Notify) SendWebhookNotification ¶
type Payload ¶
type Payload struct { Date string `json:"date"` //populated by Send function. FailureType string `json:"failure_type"` //EmailTest, SmartFail, ScrutinyFail DeviceType string `json:"device_type"` //ATA/SCSI/NVMe DeviceName string `json:"device_name"` //dev/sda DeviceSerial string `json:"device_serial"` //WDDJ324KSO Test bool `json:"test"` // false //should not be populated Subject string `json:"subject"` Message string `json:"message"` }
TODO: include host and/or user label for device.
func (*Payload) GenerateMessage ¶
func (*Payload) GenerateSubject ¶
Click to show internal directories.
Click to hide internal directories.