mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-11-16 01:33:07 +01:00
Gentoo ebuild
This commit is contained in:
parent
f780aab075
commit
dc7bc26392
4 changed files with 41 additions and 3 deletions
5
Makefile
5
Makefile
|
@ -2,14 +2,13 @@ GOPATH=$(shell pwd)/vendor:$(shell pwd)
|
|||
GOBIN=$(shell pwd)/bin
|
||||
GOFILES=$(wildcard *.go)
|
||||
GONAME=$(shell basename "$(PWD)")
|
||||
PID=/tmp/go-$(GONAME).pid
|
||||
|
||||
build: get
|
||||
@echo "Building $(GOFILES) to ./bin"
|
||||
@GOPATH=$(GOPATH) GOBIN=$(GOBIN) go build -o bin/$(GONAME) $(GOFILES)
|
||||
@GOPATH=$(GOPATH) GOBIN=$(GOBIN) go build -v -o bin/$(GONAME) $(GOFILES)
|
||||
|
||||
get:
|
||||
@GOPATH=$(GOPATH) GOBIN=$(GOBIN) go get .
|
||||
@GOPATH=$(GOPATH) GOBIN=$(GOBIN) go get -v .
|
||||
|
||||
install:
|
||||
@GOPATH=$(GOPATH) GOBIN=$(GOBIN) go install $(GOFILES)
|
||||
|
|
2
gentoo/app-metrics/smartctl_exporter/Manifest
Normal file
2
gentoo/app-metrics/smartctl_exporter/Manifest
Normal file
|
@ -0,0 +1,2 @@
|
|||
AUX smartctl_exporter.yaml 171 BLAKE2B 1dd34d14dba0469b1fc2d8132d0885d4b573b6adb5a77d9d608c05628568dd15c1b1f4be35461ddc0a2706c9407f30c439bbb5cd8e86ce226c1b0a088344aaf0 SHA512 bdc825328f9286dd841cd030d180412305b0da3ef52974237ab9f79ee47d6eeade98d2829ba3a1b26042c54a241b40c2f2e4842af68d28066c969a04b385a407
|
||||
EBUILD smartctl_exporter-9999.ebuild 607 BLAKE2B 8e6148a6ea756e49d8f5d77ab2294fc42e24265e36c358386ecb4c1597a34f24ed50ee025485d05250c0d899219b94e000623ffbb1040fbab7cbe53e32e2f5b1 SHA512 ad2c54dd281fe306f889e2c20469eece19acf139bbc8b717e5a81353c6f6b68d5f9313bd53e1299f8e7c711fd64d7ec64236633d57428a02d87780bc537838f1
|
|
@ -0,0 +1,7 @@
|
|||
smartctl_exporter:
|
||||
bind_to: "localhost:9633"
|
||||
url_path: "/metrics"
|
||||
smartctl_location: /usr/sbin/smartctl
|
||||
collect_not_more_than_period: 120s
|
||||
devices:
|
||||
- /dev/sda
|
|
@ -0,0 +1,30 @@
|
|||
# Copyright 2019+ Maxim "Sheridan" Gorlov
|
||||
# Distributed under the terms of the GNU General Public License v3
|
||||
|
||||
EAPI=6
|
||||
EGIT_REPO_URI="https://github.com/Sheridan/${PN}"
|
||||
inherit git-r3
|
||||
|
||||
DESCRIPTION="Exporting S.M.A.R.T. metrics"
|
||||
HOMEPAGE="https://github.com/Sheridan/smartctl_exporter"
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
RDEPEND=""
|
||||
DEPEND="dev-lang/go"
|
||||
|
||||
src_unpack() {
|
||||
git-r3_src_unpack
|
||||
cd "${S}"
|
||||
make get
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
make build
|
||||
}
|
||||
|
||||
src_install() {
|
||||
newbin bin/${PN}-${PV} ${PN}
|
||||
dodoc "README.md"
|
||||
insinto /etc
|
||||
newins "${FILESDIR}/smartctl_exporter.yaml" smartctl_exporter.yaml
|
||||
}
|
Loading…
Reference in a new issue