pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Update beats to 5.1.1. Add SMF manifest.



Module Name:	pkgsrc-wip
Committed By:	Filip Hajny <filip%joyent.com@localhost>
Pushed By:	fhajny
Date:		Thu Jan 5 10:19:06 2017 +0000
Changeset:	cf94e9b1571286028a75a6a8b199150f60bd56f6

Modified Files:
	beats/Makefile
	beats/PLIST
	beats/distinfo
Added Files:
	beats/files/smf/manifest.xml

Log Message:
Update beats to 5.1.1. Add SMF manifest.

Beats 5.1.1
===========

Affecting all Beats

- Fix empty benign errors logged by processor actions.
- Add add_cloud_metadata processor for collecting cloud provider
  metadata.
- Added decode_json_fields processor for decoding fields containing JSON
  strings.

Metricbeat

- Change data structure of experimental haproxy module.
- Calculate the fsstat values per mounting point, and not filesystem.
- Add experimental Docker module. Provided by Ingensi and @douaejeouit
  based on dockbeat.
- Add a sample Redis Kibana dashboard.
- Add support for MongoDB 3.4 and WiredTiger metrics.
- Add experimental kafka module with partition metricset.
- Add raw config option for mysql/status metricset.

Filebeat

- If a file is falling under ignore_older during startup, offset is now
  set to end of file instead of 0. With the previous logic the whole
  file was sent in case a line was added and it was inconsistent with
  files which were harvested previously.
- tail_files is now only applied on the first scan and not for all new
  files.
- Add command line option -once to run Filebeat only once and then
  close.
- Only load matching states into prospector to improve state handling
- Reset all states ttl on startup to make sure it is overwritten by new
  config
- Persist all states for files which fall under ignore_older to have
  consistent behaviour
- Improve shutdown behaviour with large number of files.

Winlogbeat

- Add event_logs.batch_read_size configuration option.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=cf94e9b1571286028a75a6a8b199150f60bd56f6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 beats/Makefile               | 44 +++++++++++++++--------
 beats/PLIST                  |  9 ++++-
 beats/distinfo               |  8 ++---
 beats/files/smf/manifest.xml | 83 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 125 insertions(+), 19 deletions(-)

diffs:
diff --git a/beats/Makefile b/beats/Makefile
index c9c1bff..653d421 100644
--- a/beats/Makefile
+++ b/beats/Makefile
@@ -1,7 +1,7 @@
 # $NetBSD$
 #
 
-DISTNAME=		beats-5.0.2
+DISTNAME=		beats-5.1.1
 CATEGORIES=		sysutils
 MASTER_SITES=		${MASTER_SITE_GITHUB:=elastic/}
 GITHUB_PROJECT=		beats
@@ -19,19 +19,32 @@ USE_TOOLS+=		gmake
 
 WRKSRC=			${WRKDIR}/src/github.com/elastic/beats
 
-EGFILES=		filebeat.template-es2x.json filebeat.template.json filebeat.yml
-EGFILES+=		metricbeat.template-es2x.json metricbeat.template.json metricbeat.yml
-EGFILES+=		packetbeat.template-es2x.json packetbeat.template.json packetbeat.yml
+# Components to build/install
+BEATS=			filebeat heartbeat metricbeat packetbeat
 
-.for file in ${EGFILES}
-CONF_FILES+=		share/examples/beats/${file} ${PKG_SYSCONFDIR}/${file}
+.for beat in ${BEATS}
+CONF_FILES+=		share/examples/beats/${beat}.yml			\
+				${PKG_SYSCONFDIR}/${beat}.yml
+CONF_FILES+=		share/examples/beats/${beat}.template.json		\
+				${PKG_SYSCONFDIR}/${beat}.template.json
+CONF_FILES+=		share/examples/beats/${beat}.template-es2x.json		\
+				${PKG_SYSCONFDIR}/${beat}.template-es2x.json
 .endfor
 
+BEATS_DIR?=		${VARBASE}/db/beats
+BEATS_LOGDIR?=		${VARBASE}/log/beats
+
+FILES_SUBST+=		BEATS_DIR=${BEATS_DIR}
+FILES_SUBST+=		BEATS_LOGDIR=${BEATS_LOGDIR}
+
 PKG_SYSCONFSUBDIR=	beats
 
-MAKE_ENV+=		GOPATH=${WRKDIR}:${PREFIX}/gopkg
-BUILD_DIRS=		libbeat filebeat metricbeat packetbeat
+SMF_INSTANCES+=		${BEATS}
+
+OWN_DIRS+=		${BEATS_DIR} ${BEATS_LOGDIR}
 
+MAKE_ENV+=		GOPATH=${WRKDIR}:${PREFIX}/gopkg
+BUILD_DIRS=		${BEATS}
 BUILD_TARGET=		#
 
 INSTALLATION_DIRS+=	bin share/examples/beats
@@ -41,12 +54,15 @@ post-extract:
 	${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}/metricbeat/metricbeat ${DESTDIR}${PREFIX}/bin
-	${INSTALL_PROGRAM} ${WRKSRC}/packetbeat/packetbeat ${DESTDIR}${PREFIX}/bin
-.for file in ${EGFILES}
-	${INSTALL_DATA} ${WRKSRC}/*/${file} \
+.for beat in ${BEATS}
+	${INSTALL_PROGRAM} ${WRKSRC}/${beat}/${beat} ${DESTDIR}${PREFIX}/bin
+	${INSTALL_DATA} ${WRKSRC}/${beat}/${beat}.full.yml			\
+		${DESTDIR}${PREFIX}/share/examples/beats
+	${INSTALL_DATA} ${WRKSRC}/${beat}/${beat}.template-es2x.json		\
+		${DESTDIR}${PREFIX}/share/examples/beats
+	${INSTALL_DATA} ${WRKSRC}/${beat}/${beat}.template.json			\
+		${DESTDIR}${PREFIX}/share/examples/beats
+	${INSTALL_DATA} ${WRKSRC}/${beat}/${beat}.yml				\
 		${DESTDIR}${PREFIX}/share/examples/beats
 .endfor
 
diff --git a/beats/PLIST b/beats/PLIST
index bf32af3..400daee 100644
--- a/beats/PLIST
+++ b/beats/PLIST
@@ -1,14 +1,21 @@
 @comment $NetBSD$
 bin/filebeat
-bin/libbeat
+bin/heartbeat
 bin/metricbeat
 bin/packetbeat
+share/examples/beats/filebeat.full.yml
 share/examples/beats/filebeat.template-es2x.json
 share/examples/beats/filebeat.template.json
 share/examples/beats/filebeat.yml
+share/examples/beats/heartbeat.full.yml
+share/examples/beats/heartbeat.template-es2x.json
+share/examples/beats/heartbeat.template.json
+share/examples/beats/heartbeat.yml
+share/examples/beats/metricbeat.full.yml
 share/examples/beats/metricbeat.template-es2x.json
 share/examples/beats/metricbeat.template.json
 share/examples/beats/metricbeat.yml
+share/examples/beats/packetbeat.full.yml
 share/examples/beats/packetbeat.template-es2x.json
 share/examples/beats/packetbeat.template.json
 share/examples/beats/packetbeat.yml
diff --git a/beats/distinfo b/beats/distinfo
index 8ecb2f1..755d612 100644
--- a/beats/distinfo
+++ b/beats/distinfo
@@ -1,6 +1,6 @@
 $NetBSD$
 
-SHA1 (beats-5.0.2.tar.gz) = aa815924cf212aa080eb984e1d7bd660a4d09eef
-RMD160 (beats-5.0.2.tar.gz) = b7f77ac0a8b71fa154a1180a88c04af6a33aafbe
-SHA512 (beats-5.0.2.tar.gz) = 2481ed584efda67051e59a27b45ba52039d960d6dc335d9225e2370bc71e5167f5e4e9e7cc0cb7e689c9a73d5edf27655c4764b0acb6f1422f18bfc10fc44fe9
-Size (beats-5.0.2.tar.gz) = 15774694 bytes
+SHA1 (beats-5.1.1.tar.gz) = 6847fc4b96adcf38b3b46a2c31a6109797bfd07b
+RMD160 (beats-5.1.1.tar.gz) = 9cc18d886df86e4cead9c9ab546a127a8f643893
+SHA512 (beats-5.1.1.tar.gz) = 0eb646faa7ff8fb310f97507c105b1dac5ee1ed114c858f92905ae8a1e7a3a2a2a095e52a5155194df9b699e93dd93f00e9da9b1d71b22fbcc539feaa705b984
+Size (beats-5.1.1.tar.gz) = 16500866 bytes
diff --git a/beats/files/smf/manifest.xml b/beats/files/smf/manifest.xml
new file mode 100644
index 0000000..f811747
--- /dev/null
+++ b/beats/files/smf/manifest.xml
@@ -0,0 +1,83 @@
+<?xml version='1.0'?>
+<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
+<service_bundle type='manifest' name='export'>
+  <service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
+    <dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
+      <service_fmri value='svc:/system/filesystem/local'/>
+    </dependency>
+    <dependency name='network-service' grouping='require_all' restart_on='none' type='service'>
+      <service_fmri value='svc:/network/service'/>
+    </dependency>
+    <dependency name='name-services' grouping='require_all' restart_on='refresh' type='service'>
+      <service_fmri value='svc:/milestone/name-services'/>
+    </dependency>
+    <dependency name='system-log' grouping='optional_all' restart_on='none' type='service'>
+      <service_fmri value='svc:/system/system-log'/>
+    </dependency>
+    <method_context working_directory='@BEATS_DIR@' />
+    <property_group name='startd' type='framework'>
+      <propval name='ignore_error' type='astring' value='core,signal'/>
+      <propval name='duration' type='astring' value='child' />
+    </property_group>
+    <instance name='filebeat' enabled='false'>
+      <dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
+        <service_fmri value='file://localhost@PKG_SYSCONFDIR@/filebeat.yml'/>
+      </dependency>
+      <exec_method name='start' type='method' exec='@PREFIX@/bin/filebeat -path.config @PKG_SYSCONFDIR@ -path.data @BEATS_DIR@ -path.logs @BEATS_LOGDIR@' timeout_seconds='60'/>
+      <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'/>
+      <template>
+        <common_name>
+          <loctext xml:lang='C'>Beats: filebeat data shipper</loctext>
+        </common_name>
+        <documentation>
+          <doc_link name='elastic.co' uri='https://www.elastic.co/guide/en/beats/filebeat/current/index.html' />
+        </documentation>
+      </template>
+    </instance>
+    <instance name='heartbeat' enabled='false'>
+      <dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
+        <service_fmri value='file://localhost@PKG_SYSCONFDIR@/heartbeat.yml'/>
+      </dependency>
+      <exec_method name='start' type='method' exec='@PREFIX@/bin/heartbeat -path.config @PKG_SYSCONFDIR@ -path.data @BEATS_DIR@ -path.logs @BEATS_LOGDIR@' timeout_seconds='60'/>
+      <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'/>
+      <template>
+        <common_name>
+          <loctext xml:lang='C'>Beats: heartbeat data shipper</loctext>
+        </common_name>
+        <documentation>
+          <doc_link name='elastic.co' uri='https://www.elastic.co/guide/en/beats/heartbeat/current/index.html' />
+        </documentation>
+      </template>
+    </instance>
+    <instance name='metricbeat' enabled='false'>
+      <dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
+        <service_fmri value='file://localhost@PKG_SYSCONFDIR@/metricbeat.yml'/>
+      </dependency>
+      <exec_method name='start' type='method' exec='@PREFIX@/bin/metricbeat -path.config @PKG_SYSCONFDIR@ -path.data @BEATS_DIR@ -path.logs @BEATS_LOGDIR@' timeout_seconds='60'/>
+      <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'/>
+      <template>
+        <common_name>
+          <loctext xml:lang='C'>Beats: metricbeat data shipper</loctext>
+        </common_name>
+        <documentation>
+          <doc_link name='elastic.co' uri='https://www.elastic.co/guide/en/beats/metricbeat/current/index.html' />
+        </documentation>
+      </template>
+    </instance>
+    <instance name='packetbeat' enabled='false'>
+      <dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
+        <service_fmri value='file://localhost@PKG_SYSCONFDIR@/packetbeat.yml'/>
+      </dependency>
+      <exec_method name='start' type='method' exec='@PREFIX@/bin/packetbeat -path.config @PKG_SYSCONFDIR@ -path.data @BEATS_DIR@ -path.logs @BEATS_LOGDIR@' timeout_seconds='60'/>
+      <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'/>
+      <template>
+        <common_name>
+          <loctext xml:lang='C'>Beats: packetbeat data shipper</loctext>
+        </common_name>
+        <documentation>
+          <doc_link name='elastic.co' uri='https://www.elastic.co/guide/en/beats/packetbeat/current/index.html' />
+        </documentation>
+      </template>
+    </instance>
+  </service>
+</service_bundle>


Home | Main Index | Thread Index | Old Index