sysutils/ipmi_exporter: New Port

Changelog:	https://github.com/prometheus-community/ipmi_exporter

PR:		267578
This commit is contained in:
Goran Mekić 2022-11-07 13:05:15 -05:00 committed by Guangyuan Yang
parent 3d77056dad
commit 237cbc1222
5 changed files with 74 additions and 0 deletions

View file

@ -567,6 +567,7 @@
SUBDIR += ipfs-go-fs-repo-migrations
SUBDIR += ipget
SUBDIR += ipmitool
SUBDIR += ipmi_exporter
SUBDIR += ipsc
SUBDIR += isc-cron
SUBDIR += isomaster

View file

@ -0,0 +1,29 @@
PORTNAME= ipmi_exporter
DISTVERSIONPREFIX= v
DISTVERSION= 1.6.1
CATEGORIES= sysutils
MAINTAINER= meka@tilda.center
COMMENT= IPMI exporter for Prometheus
WWW= https://github.com/prometheus-community/ipmi_exporter
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libfreeipmi.so:sysutils/freeipmi
USES= go:modules
USE_RC_SUBR= ${PORTNAME}
GO_MODULE= github.com/prometheus-community/${PORTNAME}
PLIST_FILES= bin/${PORTNAME} \
etc/${PORTNAME}/ipmi_local.yml.sample \
etc/${PORTNAME}/ipmi_remote.yml.sample
post-install:
@${MKDIR} ${STAGEDIR}${ETCDIR}
${INSTALL_DATA} ${WRKSRC}/ipmi_local.yml ${STAGEDIR}${ETCDIR}/ipmi_local.yml.sample
${INSTALL_DATA} ${WRKSRC}/ipmi_remote.yml ${STAGEDIR}${ETCDIR}/ipmi_remote.yml.sample
.include <bsd.port.mk>

View file

@ -0,0 +1,5 @@
TIMESTAMP = 1661430489
SHA256 (go/sysutils_ipmi_exporter/ipmi_exporter-v1.6.1/v1.6.1.mod) = fb908a34735a343073c6dfd6b58660577da1d42b6dc662a23dfa133e22c6a349
SIZE (go/sysutils_ipmi_exporter/ipmi_exporter-v1.6.1/v1.6.1.mod) = 1398
SHA256 (go/sysutils_ipmi_exporter/ipmi_exporter-v1.6.1/v1.6.1.zip) = 79cc9c0a435d3f2aa124ee85b6bfa0aa95a1fd2843dfc8a995880773b8529016
SIZE (go/sysutils_ipmi_exporter/ipmi_exporter-v1.6.1/v1.6.1.zip) = 57539

View file

@ -0,0 +1,34 @@
#!/bin/sh
# PROVIDE: ipmi_exporter
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# ipmi_exporter_enable (bool): Set to YES to enable the IPMI exporter.
# Default: NO
# ipmi_exporter_config (str): Set to the path of configuration file.
# Default: ""
. /etc/rc.subr
name=ipmi_exporter
rcvar=${name}_enable
load_rc_config $name
: ${impi_exporter_enable:="NO"}
: ${impi_exporter_config:=""}
pidfile="/var/run/${name}.pid"
command="/usr/sbin/daemon"
procname="%%PREFIX%%/bin/${name}"
command_args="-S -p ${pidfile} ${procname} --config.file=\"${impi_exporter_config}\""
start_precmd="${name}_precmd"
ipmi_exporter_precmd()
{
export PATH=${PATH}:/usr/local/sbin
}
run_rc_command "$1"

View file

@ -0,0 +1,5 @@
IPMI exporter for Prometheus.
It supports both the regular /metrics endpoint, exposing metrics from the host
that the exporter is running on, as well as an /ipmi endpoint that supports
IPMI over RMCP - one exporter running on one host can be used to monitor a
large number of IPMI interfaces by passing the target parameter to a scrape.