pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/node_exporter node_exporter: Import version 0...
details: https://anonhg.NetBSD.org/pkgsrc/rev/b826d41573d3
branches: trunk
changeset: 334273:b826d41573d3
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Wed May 22 11:54:06 2019 +0000
description:
node_exporter: Import version 0.18.0.
Prometheus exporter for hardware and OS metrics exposed by *NIX kernels,
written in Go with pluggable metric collectors.
diffstat:
sysutils/node_exporter/DESCR | 2 +
sysutils/node_exporter/Makefile | 33 +++++++++
sysutils/node_exporter/PLIST | 2 +
sysutils/node_exporter/distinfo | 8 ++
sysutils/node_exporter/files/smf/manifest.xml | 35 ++++++++++
sysutils/node_exporter/patches/patch-collector_cpufreq__solaris.go | 24 ++++++
sysutils/node_exporter/patches/patch-vendor_github.com_sirupsen_logrus_terminal__check__unix.go | 12 +++
7 files changed, 116 insertions(+), 0 deletions(-)
diffs (144 lines):
diff -r e1e15b7f4ff5 -r b826d41573d3 sysutils/node_exporter/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/node_exporter/DESCR Wed May 22 11:54:06 2019 +0000
@@ -0,0 +1,2 @@
+Prometheus exporter for hardware and OS metrics exposed by *NIX kernels,
+written in Go with pluggable metric collectors.
diff -r e1e15b7f4ff5 -r b826d41573d3 sysutils/node_exporter/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/node_exporter/Makefile Wed May 22 11:54:06 2019 +0000
@@ -0,0 +1,33 @@
+# $NetBSD: Makefile,v 1.1 2019/05/22 11:54:06 jperkin Exp $
+
+DISTNAME= node_exporter-0.18.0
+MASTER_SITES= ${MASTER_SITE_GITHUB:=prometheus/}
+CATEGORIES= sysutils
+GITHUB_PROJECT= node_exporter
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= pkgsrc-users%pkgsrc.org@localhost
+HOMEPAGE= https://github.com/prometheus/node_exporter/
+COMMENT= Prometheus exporter for hardware and OS metrics
+LICENSE= apache-2.0
+
+GO_DIST_BASE= ${DISTNAME}
+GO_SRCPATH= github.com/prometheus/node_exporter
+
+NEXP_GO_FLAG_PREFIX= -X ${GO_SRCPATH}/vendor/${GO_SRCPATH:H}/common/version
+NEXP_GO_FLAGS+= -s
+NEXP_GO_FLAGS+= ${NEXP_GO_FLAG_PREFIX}.Version=${PKGVERSION_NOREV}
+NEXP_GO_FLAGS+= ${NEXP_GO_FLAG_PREFIX}.Revision=${PKGREVISION}
+NEXP_GO_FLAGS+= ${NEXP_GO_FLAG_PREFIX}.Branch=${GITHUB_TAG}
+
+do-build:
+ ${RUN} ${PKGSRC_SETENV} ${MAKE_ENV} \
+ ${GO} build -ldflags "${NEXP_GO_FLAGS}" ${GO_BUILD_PATTERN}
+ ${RUN} ${PKGSRC_SETENV} ${MAKE_ENV} \
+ ${GO} install -ldflags "${NEXP_GO_FLAGS}" ${GO_BUILD_PATTERN}
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKDIR}/bin/node_exporter ${DESTDIR}${PREFIX}/bin
+
+.include "../../lang/go/go-package.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r e1e15b7f4ff5 -r b826d41573d3 sysutils/node_exporter/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/node_exporter/PLIST Wed May 22 11:54:06 2019 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2019/05/22 11:54:06 jperkin Exp $
+bin/node_exporter
diff -r e1e15b7f4ff5 -r b826d41573d3 sysutils/node_exporter/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/node_exporter/distinfo Wed May 22 11:54:06 2019 +0000
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2019/05/22 11:54:06 jperkin Exp $
+
+SHA1 (node_exporter-0.18.0.tar.gz) = 6abea3dff9e1dd4f7e88985355fb87097cc36b62
+RMD160 (node_exporter-0.18.0.tar.gz) = 329f461588f42e450d085be02393ff7613baa71a
+SHA512 (node_exporter-0.18.0.tar.gz) = 9c6f9f82b0d3f5147cef8cc933ab9d7854065782f83b9821d4ae394a5101c45de6c8e8fcdc53d076af0c8683c47030557ec8e2bd27386a81a815d714e0f88987
+Size (node_exporter-0.18.0.tar.gz) = 2104908 bytes
+SHA1 (patch-collector_cpufreq__solaris.go) = d8acca33c0f2a0d861a16b4ceaa63ede3999ac40
+SHA1 (patch-vendor_github.com_sirupsen_logrus_terminal__check__unix.go) = 3f91368fe7c8cde518fea17dc1cd513602b7135d
diff -r e1e15b7f4ff5 -r b826d41573d3 sysutils/node_exporter/files/smf/manifest.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/node_exporter/files/smf/manifest.xml Wed May 22 11:54:06 2019 +0000
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="export">
+ <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+ <create_default_instance enabled="false"/>
+ <single_instance/>
+ <dependency name="network" grouping="require_all" restart_on="error" type="service">
+ <service_fmri value="svc:/milestone/network:default"/>
+ </dependency>
+ <dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
+ <service_fmri value="svc:/system/filesystem/local"/>
+ </dependency>
+ <method_context>
+ <method_environment>
+ <envvar name="PATH" value="@PREFIX@/sbin:@PREFIX@/bin:/sbin:/usr/sbin:/usr/bin"/>
+ </method_environment>
+ </method_context>
+ <exec_method type="method" name="start" exec="@PREFIX@/bin/node_exporter --web.listen-address=%{listen} --collector.textfile.directory=%{textfile_dir}" timeout_seconds="60"/>
+ <exec_method type="method" name="refresh" exec=":kill -HUP" timeout_seconds="60"/>
+ <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60"/>
+ <property_group name="startd" type="framework">
+ <propval name="duration" type="astring" value="child"/>
+ <propval name="ignore_error" type="astring" value="core,signal"/>
+ </property_group>
+ <property_group name="application" type="application">
+ <propval name="listen" type="astring" value=":9100"/>
+ <propval name="textfile_dir" type="astring" value=""/>
+ </property_group>
+ <template>
+ <common_name>
+ <loctext xml:lang="C">Prometheus exporter for hardware and OS metrics</loctext>
+ </common_name>
+ </template>
+ </service>
+</service_bundle>
diff -r e1e15b7f4ff5 -r b826d41573d3 sysutils/node_exporter/patches/patch-collector_cpufreq__solaris.go
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/node_exporter/patches/patch-collector_cpufreq__solaris.go Wed May 22 11:54:06 2019 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-collector_cpufreq__solaris.go,v 1.1 2019/05/22 11:54:06 jperkin Exp $
+
+Fix SunOS build.
+
+--- collector/cpufreq_solaris.go.orig 2019-05-09 18:19:12.000000000 +0000
++++ collector/cpufreq_solaris.go
+@@ -36,7 +36,7 @@ func init() {
+ registerCollector("cpufreq", defaultEnabled, NewCpuFreqCollector)
+ }
+
+-func NewFreqCpuCollector() (Collector, error) {
++func NewCpuFreqCollector() (Collector, error) {
+ return &cpuFreqCollector{
+ cpuFreq: prometheus.NewDesc(
+ prometheus.BuildFQName(namespace, cpuCollectorSubsystem, "frequency_hertz"),
+@@ -51,7 +51,7 @@ func NewFreqCpuCollector() (Collector, e
+ }, nil
+ }
+
+-func (c *cpuCollector) Update(ch chan<- prometheus.Metric) error {
++func (c *cpuFreqCollector) Update(ch chan<- prometheus.Metric) error {
+ ncpus := C.sysconf(C._SC_NPROCESSORS_ONLN)
+
+ tok, err := kstat.Open()
diff -r e1e15b7f4ff5 -r b826d41573d3 sysutils/node_exporter/patches/patch-vendor_github.com_sirupsen_logrus_terminal__check__unix.go
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/node_exporter/patches/patch-vendor_github.com_sirupsen_logrus_terminal__check__unix.go Wed May 22 11:54:06 2019 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-vendor_github.com_sirupsen_logrus_terminal__check__unix.go,v 1.1 2019/05/22 11:54:06 jperkin Exp $
+
+Fix SunOS build.
+
+--- vendor/github.com/sirupsen/logrus/terminal_check_unix.go.orig 2019-05-09 18:19:12.000000000 +0000
++++ vendor/github.com/sirupsen/logrus/terminal_check_unix.go
+@@ -1,4 +1,4 @@
+-// +build linux aix
++// +build linux aix solaris
+
+ package logrus
+
Home |
Main Index |
Thread Index |
Old Index