diff options
author | Joseph Mingrone <jrm@FreeBSD.org> | 2018-03-30 18:25:14 +0000 |
---|---|---|
committer | Joseph Mingrone <jrm@FreeBSD.org> | 2018-03-30 18:25:14 +0000 |
commit | 5c2ec256c9a7e96dc2a8b1fc5edfc8441a85c098 (patch) | |
tree | 4af24312e8299546b61ff83cf2a1fba19aeed499 | |
parent | ce4a243d234076086e854dcaba249c9ccb1c160a (diff) | |
download | ports-5c2ec256c9a7e96dc2a8b1fc5edfc8441a85c098.tar.gz ports-5c2ec256c9a7e96dc2a8b1fc5edfc8441a85c098.zip |
Notes
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/log-courier/Makefile | 27 | ||||
-rw-r--r-- | sysutils/log-courier/distinfo | 3 | ||||
-rw-r--r-- | sysutils/log-courier/files/log-courier.in | 33 | ||||
-rw-r--r-- | sysutils/log-courier/files/patch-docs__examples__example-json.conf | 20 | ||||
-rw-r--r-- | sysutils/log-courier/files/pkg-message.in | 9 | ||||
-rw-r--r-- | sysutils/log-courier/pkg-descr | 6 | ||||
-rw-r--r-- | sysutils/log-courier/pkg-plist | 2 |
8 files changed, 101 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index 5dcca4e53750..3a7f21d40e71 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -588,6 +588,7 @@ SUBDIR += lmon SUBDIR += lnav SUBDIR += lockfile-progs + SUBDIR += log-courier SUBDIR += log_analysis SUBDIR += logrotate SUBDIR += logstalgia diff --git a/sysutils/log-courier/Makefile b/sysutils/log-courier/Makefile new file mode 100644 index 000000000000..aad6ff4145f4 --- /dev/null +++ b/sysutils/log-courier/Makefile @@ -0,0 +1,27 @@ +# $FreeBSD$ + +PORTNAME= log-courier +DISTVERSIONPREFIX= v +DISTVERSION= 2.0.5 +CATEGORIES= sysutils + +MAINTAINER= vikashb@where-ever.za.net +COMMENT= Lightweight log shipper with Logstash integration + +LICENSE= APACHE20 + +BUILD_DEPENDS= go:lang/go + +USES= go gmake +USE_GITHUB= yes +GH_ACCOUNT= driskell +GO_PKGNAME= github.com/driskell/log-courier + +USE_RC_SUBR= log-courier +SUB_FILES= pkg-message + +post-install: + ${INSTALL_DATA} ${WRKSRC}/docs/examples/example-json.conf \ + ${STAGEDIR}${PREFIX}/etc/log-courier.conf.example + +.include <bsd.port.mk> diff --git a/sysutils/log-courier/distinfo b/sysutils/log-courier/distinfo new file mode 100644 index 000000000000..3ea3d2ede348 --- /dev/null +++ b/sysutils/log-courier/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1522433109 +SHA256 (driskell-log-courier-v2.0.5_GH0.tar.gz) = fbe380c8c65e5c866cd89a081c2bdd716383c0cdac53c5c3f0b1a69f2d5fe14b +SIZE (driskell-log-courier-v2.0.5_GH0.tar.gz) = 228280 diff --git a/sysutils/log-courier/files/log-courier.in b/sysutils/log-courier/files/log-courier.in new file mode 100644 index 000000000000..6ad812be849c --- /dev/null +++ b/sysutils/log-courier/files/log-courier.in @@ -0,0 +1,33 @@ +#!/bin/sh +# $FreeBSD$ + +# PROVIDE: log_courier +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable logstash-forwarder: +# log_courier_enable (bool): Set to YES to logstash-forwarder +# Default: NO +# log_courier_flags (str): Extra flags passed to log-courier +# log_courier_conf (str): log-courier configuration file +# Default: ${PREFIX}/etc/log-courier.conf + +. /etc/rc.subr + +name="log_courier" +rcvar=log_courier_enable + +load_rc_config ${name} + +logdir="/var/log" + +: ${log_courier_enable="NO"} +: ${log_courier_flags=""} +: ${log_courier_conf="%%PREFIX%%/etc/log-courier.conf"} + +log_courier_cmd="%%PREFIX%%/bin/log-courier" +command="/usr/sbin/daemon" +command_args="${log_courier_cmd} -config ${log_courier_conf}" + +run_rc_command "$1" diff --git a/sysutils/log-courier/files/patch-docs__examples__example-json.conf b/sysutils/log-courier/files/patch-docs__examples__example-json.conf new file mode 100644 index 000000000000..8e758a999cfd --- /dev/null +++ b/sysutils/log-courier/files/patch-docs__examples__example-json.conf @@ -0,0 +1,20 @@ +--- docs/examples/example-json.conf.orig 2016-06-11 14:02:51 UTC ++++ docs/examples/example-json.conf +@@ -2,12 +2,15 @@ + "admin": { + "enabled": true + }, ++ "general": { ++ "persist directory": "/var/lib/log-courier" ++ }, + "network": { + "servers": [ "localhost:5043" ], +- "ssl ca": "./logstash.cer" ++ "ssl ca": "/usr/local/etc/logstash-forwarder.crt" + }, + "files": [ { +- "paths": [ "/var/log/httpd/*/*.log" ], ++ "paths": [ "/var/log/httpd*.log" ], + "fields": { + "type": "apache" + } diff --git a/sysutils/log-courier/files/pkg-message.in b/sysutils/log-courier/files/pkg-message.in new file mode 100644 index 000000000000..4cf27894e619 --- /dev/null +++ b/sysutils/log-courier/files/pkg-message.in @@ -0,0 +1,9 @@ +========================================================================= +If you want to run log-courier, add to /etc/rc.conf + + log_courier_enable="YES" + +Do not forget to edit your configuration file: + + Default: ${PREFIX}/etc/log-courier.conf +========================================================================= diff --git a/sysutils/log-courier/pkg-descr b/sysutils/log-courier/pkg-descr new file mode 100644 index 000000000000..4872ffd828cf --- /dev/null +++ b/sysutils/log-courier/pkg-descr @@ -0,0 +1,6 @@ +Log Courier is a lightweight tool created to ship log files speedily and +securely, with low resource usage, to remote Logstash instances. + +It is developed to be efficient, reliable, scalable, and easy to use. + +WWW: https://github.com/driskell/log-courier diff --git a/sysutils/log-courier/pkg-plist b/sysutils/log-courier/pkg-plist new file mode 100644 index 000000000000..c4dcbfea44d5 --- /dev/null +++ b/sysutils/log-courier/pkg-plist @@ -0,0 +1,2 @@ +bin/log-courier +@sample etc/log-courier.conf.example etc/log-courier.conf |