pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/node_exporter



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Wed May 22 11:54:06 UTC 2019

Added Files:
        pkgsrc/sysutils/node_exporter: DESCR Makefile PLIST distinfo
        pkgsrc/sysutils/node_exporter/files/smf: manifest.xml
        pkgsrc/sysutils/node_exporter/patches:
            patch-collector_cpufreq__solaris.go
            patch-vendor_github.com_sirupsen_logrus_terminal__check__unix.go

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/node_exporter/DESCR \
    pkgsrc/sysutils/node_exporter/Makefile \
    pkgsrc/sysutils/node_exporter/PLIST \
    pkgsrc/sysutils/node_exporter/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/node_exporter/files/smf/manifest.xml
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/sysutils/node_exporter/patches/patch-collector_cpufreq__solaris.go \
    pkgsrc/sysutils/node_exporter/patches/patch-vendor_github.com_sirupsen_logrus_terminal__check__unix.go

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/sysutils/node_exporter/DESCR
diff -u /dev/null pkgsrc/sysutils/node_exporter/DESCR:1.1
--- /dev/null   Wed May 22 11:54:06 2019
+++ pkgsrc/sysutils/node_exporter/DESCR Wed May 22 11:54:06 2019
@@ -0,0 +1,2 @@
+Prometheus exporter for hardware and OS metrics exposed by *NIX kernels,
+written in Go with pluggable metric collectors.
Index: pkgsrc/sysutils/node_exporter/Makefile
diff -u /dev/null pkgsrc/sysutils/node_exporter/Makefile:1.1
--- /dev/null   Wed May 22 11:54:06 2019
+++ pkgsrc/sysutils/node_exporter/Makefile      Wed May 22 11:54:06 2019
@@ -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"
Index: pkgsrc/sysutils/node_exporter/PLIST
diff -u /dev/null pkgsrc/sysutils/node_exporter/PLIST:1.1
--- /dev/null   Wed May 22 11:54:06 2019
+++ pkgsrc/sysutils/node_exporter/PLIST Wed May 22 11:54:06 2019
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2019/05/22 11:54:06 jperkin Exp $
+bin/node_exporter
Index: pkgsrc/sysutils/node_exporter/distinfo
diff -u /dev/null pkgsrc/sysutils/node_exporter/distinfo:1.1
--- /dev/null   Wed May 22 11:54:06 2019
+++ pkgsrc/sysutils/node_exporter/distinfo      Wed May 22 11:54:06 2019
@@ -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

Index: pkgsrc/sysutils/node_exporter/files/smf/manifest.xml
diff -u /dev/null pkgsrc/sysutils/node_exporter/files/smf/manifest.xml:1.1
--- /dev/null   Wed May 22 11:54:06 2019
+++ pkgsrc/sysutils/node_exporter/files/smf/manifest.xml        Wed May 22 11:54:06 2019
@@ -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>

Index: pkgsrc/sysutils/node_exporter/patches/patch-collector_cpufreq__solaris.go
diff -u /dev/null pkgsrc/sysutils/node_exporter/patches/patch-collector_cpufreq__solaris.go:1.1
--- /dev/null   Wed May 22 11:54:06 2019
+++ pkgsrc/sysutils/node_exporter/patches/patch-collector_cpufreq__solaris.go   Wed May 22 11:54:06 2019
@@ -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()
Index: pkgsrc/sysutils/node_exporter/patches/patch-vendor_github.com_sirupsen_logrus_terminal__check__unix.go
diff -u /dev/null pkgsrc/sysutils/node_exporter/patches/patch-vendor_github.com_sirupsen_logrus_terminal__check__unix.go:1.1
--- /dev/null   Wed May 22 11:54:06 2019
+++ pkgsrc/sysutils/node_exporter/patches/patch-vendor_github.com_sirupsen_logrus_terminal__check__unix.go      Wed May 22 11:54:06 2019
@@ -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