Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
108 lines (75 sloc) 3.2 KB
PortSystem 1.0
PortGroup github 1.0
github.setup prometheus node_exporter 0.18.1 v
github.tarball_from archive
description Machine-metric exporter for the Prometheus monitoring \
long_description The Prometheus Node Exporter can expose metrics that \
Prometheus can scrape, including a wide variety of \
system, hardware- and kernel-related metrics.
platforms darwin
categories net
license apache
maintainers { @herbygillot} openmaintainer
depends_build port:curl \
build.env GOPATH=${workpath} \
PATH=$env(PATH):${workpath}/bin build
use_configure no
installs_libs no
use_parallel_build no
checksums \
rmd160 e4043a6345c4650cd99d0cabdceea333bf3bc596 \
sha256 9ddf187c462f2681ab4516410ada0e6f0f03097db6986686795559ea71a07694 \
size 2110072
set svc_name prometheus-node-exporter
set prom_user prometheus
set ne_doc_dir ${prefix}/share/doc/${svc_name}
set ne_share_dir ${prefix}/share/${svc_name}
set ne_log_dir ${prefix}/var/log/${svc_name}
set ne_log_file ${ne_log_dir}/${name}.log
add_users ${prom_user} \
group=${prom_user} \
post-extract {
copy ${filespath}/org.macports.${name}.plist \
reinplace "s|@NAME@|${name}|g" \
reinplace "s|@USER@|${prom_user}|g" \
reinplace "s|@GROUP@|${prom_user}|g" \
reinplace "s|@PREFIX@|${prefix}|g" \
reinplace "s|@LOGFILE@|${ne_log_file}|g" \
destroot {
xinstall -m 755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/${name}
xinstall -d -m 755 ${destroot}${ne_doc_dir}
xinstall -d -m 755 ${destroot}${ne_share_dir}
xinstall -d -m 755 -o ${prom_user} -g ${prom_user} ${destroot}${ne_log_dir}
touch ${destroot}${ne_log_file}
file attributes ${destroot}${ne_log_file} \
-owner ${prom_user} -group ${prom_user}
foreach _dir {examples text_collector_examples} {
copy ${worksrcpath}/${_dir} ${destroot}${ne_share_dir}/
copy {*}[glob ${worksrcpath}/docs/*] ${destroot}${ne_doc_dir}/
xinstall -d -m 755 \
xinstall -m 0644 -o root -W ${workpath} org.macports.${name}.plist \
xinstall -d -m 755 ${destroot}/Library/LaunchDaemons
ln -s ${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist \
notes "
To enable the Prometheus Node Exporter service, use `port load`, as follows:
\$ sudo port load ${name}
When enabled, the service will log to:
You can’t perform that action at this time.