net-mgmt/p5-OSLV-Monitor: Add new port
This is an OS level virtualization monitoring extend for LibreNMS It can also monitor individual FreeBSD jails. The next release of LibreNMS should support this.
This commit is contained in:
parent
45c5b4d48e
commit
c9d3ef9898
@ -270,6 +270,7 @@
|
||||
SUBDIR += p5-NetAddr-IP
|
||||
SUBDIR += p5-NetAddr-IP-Lite
|
||||
SUBDIR += p5-NetApp
|
||||
SUBDIR += p5-OSLV-Monitor
|
||||
SUBDIR += p5-POE-Component-SNMP
|
||||
SUBDIR += p5-Prometheus-Tiny
|
||||
SUBDIR += p5-Prometheus-Tiny-Shared
|
||||
|
||||
27
net-mgmt/p5-OSLV-Monitor/Makefile
Normal file
27
net-mgmt/p5-OSLV-Monitor/Makefile
Normal file
@ -0,0 +1,27 @@
|
||||
PORTNAME= OSLV-Monitor
|
||||
PORTVERSION= 0.0.1
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= #
|
||||
PKGNAMEPREFIX= p5-
|
||||
|
||||
MAINTAINER= dan@langille.org
|
||||
COMMENT= OS level virtualization monitoring extend
|
||||
WWW= https://github.com/VVelox/OSLV-Monitor
|
||||
|
||||
LICENSE= GPLv3
|
||||
|
||||
RUN_DEPENDS= p5-Clone>0:devel/p5-Clone \
|
||||
p5-ExtUtils-MakeMaker>0:devel/p5-ExtUtils-MakeMaker \
|
||||
p5-File-Slurp>0:devel/p5-File-Slurp \
|
||||
p5-JSON>0:converters/p5-JSON \
|
||||
p5-MIME-Base64>0:converters/p5-MIME-Base64
|
||||
|
||||
USES= perl5
|
||||
USE_PERL5= configure
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= VVelox
|
||||
NO_BUILD= YES
|
||||
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
.include <bsd.port.mk>
|
||||
3
net-mgmt/p5-OSLV-Monitor/distinfo
Normal file
3
net-mgmt/p5-OSLV-Monitor/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1726013918
|
||||
SHA256 (VVelox-OSLV-Monitor-0.0.1_GH0.tar.gz) = 49bde2f580f57477e9acbac81a95e66787d75067103ce96b1f7a4c92fb2f2ecd
|
||||
SIZE (VVelox-OSLV-Monitor-0.0.1_GH0.tar.gz) = 25507
|
||||
35
net-mgmt/p5-OSLV-Monitor/files/pkg-message.in
Normal file
35
net-mgmt/p5-OSLV-Monitor/files/pkg-message.in
Normal file
@ -0,0 +1,35 @@
|
||||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
Assuming you are running net-mgmt/net-snmp as non-root (i.e. snmpd):
|
||||
|
||||
1 - Create %%LOCALBASE%%/etc/cron.d/oslv with this (adjust the meil address)
|
||||
|
||||
# use /bin/sh to run commands, overriding the default set by cron
|
||||
SHELL=/bin/sh
|
||||
# mail any output to here, no matter whose crontab this is
|
||||
MAILTO=me@example.org
|
||||
|
||||
#minute hour mday month wday who command
|
||||
4/5 * * * * snmpd sudo %%LOCALBASE%%/bin/oslv_monitor -q
|
||||
|
||||
2 - Create this directory:
|
||||
|
||||
mkdir /var/cache/oslv_monitor
|
||||
chown snmpd:snmpd /var/cache/oslv_monitor
|
||||
|
||||
3 - Create these sudo permissions:
|
||||
|
||||
% cat %%LOCALBASE%%/etc/sudoers.d/snmpd
|
||||
snmpd ALL=(ALL) NOPASSWD:%%LOCALBASE%%/bin/oslv_monitor -q
|
||||
|
||||
4 - add this line to %%LOCALBASE%%/etc/snmpd.conf:
|
||||
|
||||
extend oslv_monitor /bin/cat /var/cache/oslv_monitor/snmp
|
||||
|
||||
5 - restart snmpd
|
||||
|
||||
|
||||
EOM
|
||||
}
|
||||
]
|
||||
13
net-mgmt/p5-OSLV-Monitor/pkg-descr
Normal file
13
net-mgmt/p5-OSLV-Monitor/pkg-descr
Normal file
@ -0,0 +1,13 @@
|
||||
OS level virtualization monitoring extend
|
||||
|
||||
Designed for snmpd with LibreNMS
|
||||
|
||||
Works with FreeBSD jails to provide jail-level metrics.
|
||||
|
||||
Create a cronjob:
|
||||
|
||||
*/5 * * * * /usr/local/bin/oslv_monitor -q
|
||||
|
||||
The snmpd.conf extends:
|
||||
|
||||
extend oslv_monitor /bin/cat /var/cache/oslv_monitor/snmp
|
||||
8
net-mgmt/p5-OSLV-Monitor/pkg-plist
Normal file
8
net-mgmt/p5-OSLV-Monitor/pkg-plist
Normal file
@ -0,0 +1,8 @@
|
||||
bin/oslv_monitor
|
||||
%%SITE_PERL%%/OSLV/Monitor.pm
|
||||
%%SITE_PERL%%/OSLV/Monitor/Backends/FreeBSD.pm
|
||||
%%SITE_PERL%%/OSLV/Monitor/Backends/cgroups.pm
|
||||
%%PERL5_MAN1%%/oslv_monitor.1.gz
|
||||
%%PERL5_MAN3%%/OSLV::Monitor.3.gz
|
||||
%%PERL5_MAN3%%/OSLV::Monitor::Backends::FreeBSD.3.gz
|
||||
%%PERL5_MAN3%%/OSLV::Monitor::Backends::cgroups.3.gz
|
||||
Loading…
x
Reference in New Issue
Block a user