mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 17:32:05 +01:00
OpenBSD packaging files (#853)
This commit is contained in:
parent
50d44d5932
commit
f477cbe861
11
ports/OpenBSD/README.md
Normal file
11
ports/OpenBSD/README.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# OpenBSD ports
|
||||||
|
|
||||||
|
Tested with Release 6.7
|
||||||
|
|
||||||
|
The VictoriaMetrics DB must be place in `/usr/ports/sysutils` directory
|
||||||
|
and the file `/usr/ports/infrastructure/db/user.list`
|
||||||
|
should be modified with a new line
|
||||||
|
```
|
||||||
|
855 _vmetrics _vmetrics sysutils/VictoriaMetrics
|
||||||
|
```
|
||||||
|
|
38
ports/OpenBSD/VictoriaMetrics/Makefile
Normal file
38
ports/OpenBSD/VictoriaMetrics/Makefile
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# $OpenBSD$
|
||||||
|
|
||||||
|
COMMENT = fast, cost-effective and scalable time series database
|
||||||
|
|
||||||
|
GH_ACCOUNT = VictoriaMetrics
|
||||||
|
GH_PROJECT = VictoriaMetrics
|
||||||
|
GH_TAGNAME = v1.44.0
|
||||||
|
|
||||||
|
CATEGORIES = sysutils
|
||||||
|
|
||||||
|
HOMEPAGE = https://victoriametrics.com/
|
||||||
|
|
||||||
|
MAINTAINER = VictoriaMetrics <info@victoriametrics.com>
|
||||||
|
|
||||||
|
# Apache License 2.0
|
||||||
|
PERMIT_PACKAGE = Yes
|
||||||
|
|
||||||
|
WANTLIB = c pthread
|
||||||
|
|
||||||
|
USE_GMAKE = Yes
|
||||||
|
|
||||||
|
MODULES= lang/go
|
||||||
|
MODGO_GOPATH= ${MODGO_WORKSPACE}
|
||||||
|
|
||||||
|
do-build:
|
||||||
|
cd ${WRKSRC} && GOOS=openbsd ${MAKE_ENV} ${MAKE_PROGRAM} victoria-metrics-pure
|
||||||
|
cd ${WRKSRC} && GOOS=openbsd ${MAKE_ENV} ${MAKE_PROGRAM} vmbackup
|
||||||
|
|
||||||
|
do-install:
|
||||||
|
${INSTALL_PROGRAM} ./pkg/vmlogger.pl ${PREFIX}/bin/vmetricslogger.pl
|
||||||
|
${INSTALL_PROGRAM} ${WRKSRC}/bin/victoria-metrics-pure ${PREFIX}/bin/vmetrics
|
||||||
|
${INSTALL_PROGRAM} ${WRKSRC}/bin/vmbackup ${PREFIX}/bin/vmetricsbackup
|
||||||
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/vmetrics/
|
||||||
|
${INSTALL_DATA} ${WRKSRC}/README.md ${PREFIX}/share/doc/vmetrics/
|
||||||
|
${INSTALL_DATA} ${WRKSRC}/LICENSE ${PREFIX}/share/doc/vmetrics/
|
||||||
|
${INSTALL_DATA} ${WRKSRC}/docs/* ${PREFIX}/share/doc/vmetrics/
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
2
ports/OpenBSD/VictoriaMetrics/distinfo
Normal file
2
ports/OpenBSD/VictoriaMetrics/distinfo
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
SHA256 (VictoriaMetrics-1.44.0.tar.gz) = OIXIyqiijWvAPDgq5wMoDpv1rENcIOWIcXmz4T5v1lU=
|
||||||
|
SIZE (VictoriaMetrics-1.44.0.tar.gz) = 8898365
|
3
ports/OpenBSD/VictoriaMetrics/pkg/DESCR
Normal file
3
ports/OpenBSD/VictoriaMetrics/pkg/DESCR
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
VictoriaMetrics is fast,
|
||||||
|
cost-effective and scalable time-series database.
|
||||||
|
|
34
ports/OpenBSD/VictoriaMetrics/pkg/PLIST
Normal file
34
ports/OpenBSD/VictoriaMetrics/pkg/PLIST
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
@comment $OpenBSD$
|
||||||
|
@newgroup _vmetrics:855
|
||||||
|
@newuser _vmetrics:855:_vmetrics:daemon:VictoriaMetrics:${VARBASE}/db/vmetrics:/sbin/nologin
|
||||||
|
@sample ${SYSCONFDIR}/prometheus/
|
||||||
|
@rcscript ${RCDIR}/vmetrics
|
||||||
|
@bin bin/vmetricslogger.pl
|
||||||
|
@bin bin/vmetrics
|
||||||
|
@bin bin/vmetricsbackup
|
||||||
|
share/doc/vmetrics/
|
||||||
|
share/doc/vmetrics/Articles.md
|
||||||
|
share/doc/vmetrics/CaseStudies.md
|
||||||
|
share/doc/vmetrics/Cluster-VictoriaMetrics.md
|
||||||
|
share/doc/vmetrics/ExtendedPromQL.md
|
||||||
|
share/doc/vmetrics/FAQ.md
|
||||||
|
share/doc/vmetrics/Home.md
|
||||||
|
share/doc/vmetrics/LICENSE
|
||||||
|
share/doc/vmetrics/MetricsQL.md
|
||||||
|
share/doc/vmetrics/Quick-Start.md
|
||||||
|
share/doc/vmetrics/README.md
|
||||||
|
share/doc/vmetrics/Release-Guide.md
|
||||||
|
share/doc/vmetrics/SampleSizeCalculations.md
|
||||||
|
share/doc/vmetrics/Single-server-VictoriaMetrics.md
|
||||||
|
share/doc/vmetrics/logo.png
|
||||||
|
share/doc/vmetrics/robots.txt
|
||||||
|
share/doc/vmetrics/vmagent.md
|
||||||
|
share/doc/vmetrics/vmagent.png
|
||||||
|
share/doc/vmetrics/vmalert.md
|
||||||
|
share/doc/vmetrics/vmauth.md
|
||||||
|
share/doc/vmetrics/vmbackup.md
|
||||||
|
share/doc/vmetrics/vmrestore.md
|
||||||
|
@mode 0755
|
||||||
|
@owner _vmetrics
|
||||||
|
@group _vmetrics
|
||||||
|
@sample ${VARBASE}/db/vmetrics
|
19
ports/OpenBSD/VictoriaMetrics/pkg/vmetrics.rc
Normal file
19
ports/OpenBSD/VictoriaMetrics/pkg/vmetrics.rc
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# $OpenBSD$
|
||||||
|
|
||||||
|
daemon="${TRUEPREFIX}/bin/vmetrics"
|
||||||
|
daemon_flags="-storageDataPath=/var/db/vmetrics/ ${daemon_flags}"
|
||||||
|
daemon_user=_vmetrics
|
||||||
|
|
||||||
|
. /etc/rc.d/rc.subr
|
||||||
|
|
||||||
|
pexp="${daemon}.*"
|
||||||
|
rc_bg=YES
|
||||||
|
rc_reload=NO
|
||||||
|
|
||||||
|
rc_start() {
|
||||||
|
${rcexec} "${daemon} -loggerDisableTimestamps ${daemon_flags} < /dev/null 2>&1 | ${TRUEPREFIX}/bin/vmetricslogger.pl"
|
||||||
|
}
|
||||||
|
|
||||||
|
rc_cmd $1
|
18
ports/OpenBSD/VictoriaMetrics/pkg/vmlogger.pl
Normal file
18
ports/OpenBSD/VictoriaMetrics/pkg/vmlogger.pl
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
use Sys::Syslog qw(:standard :macros);
|
||||||
|
|
||||||
|
openlog("victoria-metrics", "pid", "daemon");
|
||||||
|
|
||||||
|
while (my $l = <>) {
|
||||||
|
my @d = split /\t/, $l;
|
||||||
|
# go level : "INFO", "WARN", "ERROR", "FATAL", "PANIC":
|
||||||
|
my $lvl = $d[0];
|
||||||
|
$lvl = LOG_EMERG if ($lvl eq 'panic');
|
||||||
|
$lvl = 'crit' if ($lvl eq 'fatal');
|
||||||
|
$lvl = 'err' if ($lvl eq 'error');
|
||||||
|
$lvl = 'warning' if ($lvl eq 'warn');
|
||||||
|
chomp $d[2];
|
||||||
|
syslog( $lvl, $d[2] );
|
||||||
|
}
|
||||||
|
|
||||||
|
closelog();
|
Loading…
Reference in New Issue
Block a user