pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Import beats 1.0.1 as wip/beats.
Module Name: pkgsrc-wip
Committed By: Filip Hajny <filip%joyent.com@localhost>
Pushed By: fhajny
Date: Tue Jan 26 15:35:51 2016 +0000
Changeset: c297113fb8d46bfc300ccff6718f43ab26b6b3af
Added Files:
beats/.filebeat
beats/DESCR
beats/Makefile
beats/PLIST
beats/TODO
beats/distinfo
beats/patches/patch-libbeat_cfgfile_cfgfile.go
beats/patches/patch-vendor_github.com_tsg_gopacket_pcap_pcap.go
Log Message:
Import beats 1.0.1 as wip/beats.
The Beats are lightweight processes, written in Go, that you install
on your servers to capture all sorts of operational data like logs,
operating system metrics or network packet data, and to send it to
Elasticsearch, either directly or via Logstash, so it can be
visualized with Kibana.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c297113fb8d46bfc300ccff6718f43ab26b6b3af
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
beats/.filebeat | 1 +
beats/DESCR | 5 ++
beats/Makefile | 60 ++++++++++++++++++++++
beats/PLIST | 8 +++
beats/TODO | 3 ++
beats/distinfo | 8 +++
beats/patches/patch-libbeat_cfgfile_cfgfile.go | 24 +++++++++
...tch-vendor_github.com_tsg_gopacket_pcap_pcap.go | 14 +++++
8 files changed, 123 insertions(+)
diffs:
diff --git a/beats/.filebeat b/beats/.filebeat
new file mode 100644
index 0000000..0b1bfd8
--- /dev/null
+++ b/beats/.filebeat
@@ -0,0 +1 @@
+{"/var/log/authlog":{"source":"/var/log/authlog","offset":20982718,"FileStateOS":{"inode":711,"device":386547132338}}}
diff --git a/beats/DESCR b/beats/DESCR
new file mode 100644
index 0000000..3add6f1
--- /dev/null
+++ b/beats/DESCR
@@ -0,0 +1,5 @@
+The Beats are lightweight processes, written in Go, that you install
+on your servers to capture all sorts of operational data like logs,
+operating system metrics or network packet data, and to send it to
+Elasticsearch, either directly or via Logstash, so it can be
+visualized with Kibana.
diff --git a/beats/Makefile b/beats/Makefile
new file mode 100644
index 0000000..275b2ff
--- /dev/null
+++ b/beats/Makefile
@@ -0,0 +1,60 @@
+# $NetBSD$
+#
+
+DISTNAME= beats-1.0.1
+CATEGORIES= sysutils
+MASTER_SITES= ${MASTER_SITE_GITHUB:=elastic/}
+GITHUB_PROJECT= beats
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= filip%joyent.com@localhost
+HOMEPAGE= https://www.elastic.co/products/beats
+COMMENT= Data Shippers for Elasticsearch
+LICENSE= apache-2.0
+
+.include "../../lang/go/version.mk"
+BUILD_DEPENDS+= go-${GO_VERSION}*:../../lang/go
+
+USE_TOOLS+= gmake
+
+WRKSRC= ${WRKDIR}/src/github.com/elastic/beats
+
+EGFILES= filebeat.template.json filebeat.yml
+EGFILES+= packetbeat.template.json packetbeat.yml
+#EGFILES+= topbeat/topbeat.template.json topbeat/topbeat.yml
+
+.for file in ${EGFILES}
+CONF_FILES+= share/examples/beats/${file} ${PKG_SYSCONFDIR}/${file}
+.endfor
+
+PKG_SYSCONFSUBDIR= beats
+
+SUBST_CLASSES+= path
+SUBST_STAGE.path= pre-configure
+SUBST_MESSAGE.path= Fix default paths
+SUBST_FILES.path= libbeat/cfgfile/cfgfile.go
+SUBST_VARS.path= PKG_SYSCONFDIR
+
+MAKE_ENV+= GOPATH=${WRKDIR}:${PREFIX}/gopkg
+BUILD_DIRS= libbeat packetbeat filebeat # topbeat
+
+BUILD_TARGET= build
+
+INSTALLATION_DIRS+= bin share/examples/beats
+
+post-extract:
+ ${MKDIR} ${WRKSRC}
+ ${MV} ${WRKDIR}/${DISTNAME}/* ${WRKSRC}
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/filebeat/filebeat ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/libbeat/libbeat ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/packetbeat/packetbeat ${DESTDIR}${PREFIX}/bin
+# ${INSTALL_PROGRAM} ${WRKSRC}/topbeat ${DESTDIR}${PREFIX}/bin
+.for file in ${EGFILES}
+ ${INSTALL_DATA} ${WRKSRC}/*/etc/${file} \
+ ${DESTDIR}${PREFIX}/share/examples/beats
+.endfor
+
+.include "../../net/libpcap/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/beats/PLIST b/beats/PLIST
new file mode 100644
index 0000000..98f84e1
--- /dev/null
+++ b/beats/PLIST
@@ -0,0 +1,8 @@
+@comment $NetBSD$
+bin/filebeat
+bin/libbeat
+bin/packetbeat
+share/examples/beats/filebeat.template.json
+share/examples/beats/filebeat.yml
+share/examples/beats/packetbeat.template.json
+share/examples/beats/packetbeat.yml
diff --git a/beats/TODO b/beats/TODO
new file mode 100644
index 0000000..c22e99d
--- /dev/null
+++ b/beats/TODO
@@ -0,0 +1,3 @@
+- topbeat needs some patching, disabled for now
+- doesn't seem to find syslog on SunOS properly
+- not much testing done so far
diff --git a/beats/distinfo b/beats/distinfo
new file mode 100644
index 0000000..7692b1b
--- /dev/null
+++ b/beats/distinfo
@@ -0,0 +1,8 @@
+$NetBSD$
+
+SHA1 (beats-1.0.1.tar.gz) = fb9857a33b096f4731e7060dbe4f473ae06ee654
+RMD160 (beats-1.0.1.tar.gz) = 12dfc140a1a96ca3a03830f41add1f8099ff2439
+SHA512 (beats-1.0.1.tar.gz) = 0a1dc825f24f48b70e462518c5663a141d3c3592e8565bbd9d8b0e183314095ab3b6db5b593d1a39e49bdb88b58001833848fc40836dcc20de627860ccdb2cad
+Size (beats-1.0.1.tar.gz) = 9737036 bytes
+SHA1 (patch-libbeat_cfgfile_cfgfile.go) = 94aa2ee0130f97dd437858668c83b18547ebfd72
+SHA1 (patch-vendor_github.com_tsg_gopacket_pcap_pcap.go) = 557dbe82cb83d94df96946a5e03108e6cae4cd15
diff --git a/beats/patches/patch-libbeat_cfgfile_cfgfile.go b/beats/patches/patch-libbeat_cfgfile_cfgfile.go
new file mode 100644
index 0000000..6805ff2
--- /dev/null
+++ b/beats/patches/patch-libbeat_cfgfile_cfgfile.go
@@ -0,0 +1,24 @@
+$NetBSD$
+
+Use PKG_SYSCONFDIR.
+
+--- libbeat/cfgfile/cfgfile.go.orig 2015-12-17 14:53:41.000000000 +0000
++++ libbeat/cfgfile/cfgfile.go
+@@ -15,7 +15,7 @@ var testConfig *bool
+ func init() {
+ // The default config cannot include the beat name as it is not initialised when this
+ // function is called, but see ChangeDefaultCfgfileFlag
+- configfile = flag.String("c", "/etc/beat/beat.yml", "Configuration file")
++ configfile = flag.String("c", "@PKG_SYSCONFDIR@/beat.yml", "Configuration file")
+ testConfig = flag.Bool("configtest", false, "Test configuration and exit.")
+ }
+
+@@ -26,7 +26,7 @@ func ChangeDefaultCfgfileFlag(beatName s
+ if cliflag == nil {
+ return fmt.Errorf("Flag -c not found")
+ }
+- cliflag.DefValue = fmt.Sprintf("/etc/%s/%s.yml", beatName, beatName)
++ cliflag.DefValue = fmt.Sprintf("@PKG_SYSCONFDIR@/%s.yml", beatName)
+ return cliflag.Value.Set(cliflag.DefValue)
+ }
+
diff --git a/beats/patches/patch-vendor_github.com_tsg_gopacket_pcap_pcap.go b/beats/patches/patch-vendor_github.com_tsg_gopacket_pcap_pcap.go
new file mode 100644
index 0000000..f6f0515
--- /dev/null
+++ b/beats/patches/patch-vendor_github.com_tsg_gopacket_pcap_pcap.go
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Add support for SunOS.
+
+--- vendor/github.com/tsg/gopacket/pcap/pcap.go.orig 2015-12-17 14:53:41.000000000 +0000
++++ vendor/github.com/tsg/gopacket/pcap/pcap.go
+@@ -11,6 +11,7 @@ package pcap
+ #cgo linux LDFLAGS: -lpcap
+ #cgo freebsd LDFLAGS: -lpcap
+ #cgo darwin LDFLAGS: -lpcap
++#cgo solaris LDFLAGS: -lpcap
+ #cgo windows CFLAGS: -I C:/WpdPack/Include
+ #cgo windows,386 LDFLAGS: -L C:/WpdPack/Lib -lwpcap
+ #cgo windows,amd64 LDFLAGS: -L C:/WpdPack/Lib/x64 -lwpcap
Home |
Main Index |
Thread Index |
Old Index