mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-11-16 01:33:07 +01:00
systemd service
This commit is contained in:
parent
cc03403fe9
commit
de13d91241
2 changed files with 20 additions and 1 deletions
|
@ -23,7 +23,7 @@ type SMARTctl struct {
|
|||
device SMARTDevice
|
||||
}
|
||||
|
||||
// NewSMARTctl is NFTables constructor
|
||||
// NewSMARTctl is smartctl constructor
|
||||
func NewSMARTctl(json gjson.Result, ch chan<- prometheus.Metric) SMARTctl {
|
||||
smart := SMARTctl{}
|
||||
smart.ch = ch
|
||||
|
|
19
systemd/smartctl_exporter.service
Normal file
19
systemd/smartctl_exporter.service
Normal file
|
@ -0,0 +1,19 @@
|
|||
[Unit]
|
||||
Description=smartctl exporter service
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
PIDFile=/run/smartctl_exporter.pid
|
||||
ExecStart=/usr/bin/smartctl_exporter
|
||||
User=root
|
||||
Group=root
|
||||
SyslogIdentifier=smartctl_exporter
|
||||
Restart=on-failure
|
||||
RemainAfterExit=no
|
||||
RestartSec=100ms
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in a new issue