summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmeta-oe/recipes-dbs/influxdb/influxdb/influxdb235
-rw-r--r--meta-oe/recipes-dbs/influxdb/influxdb/influxdb.conf586
-rw-r--r--meta-oe/recipes-dbs/influxdb/influxdb_1.7.10.bb63
3 files changed, 884 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/influxdb/influxdb/influxdb b/meta-oe/recipes-dbs/influxdb/influxdb/influxdb
new file mode 100755
index 0000000000..ffb29c3ae6
--- /dev/null
+++ b/meta-oe/recipes-dbs/influxdb/influxdb/influxdb
@@ -0,0 +1,235 @@
1#!/bin/bash
2### BEGIN INIT INFO
3# Provides: influxd
4# Required-Start: $all
5# Required-Stop: $remote_fs $syslog
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Start the InfluxDB process
9### END INIT INFO
10set -x
11# If you modify this, please make sure to also edit influxdb.service
12
13# Command-line options that can be set in /etc/default/influxdb. These will override
14# any config file values.
15DEFAULT=/etc/default/influxdb
16
17# Daemon options
18INFLUXD_OPTS=
19
20# Process name ( For display )
21NAME=influxdb
22
23# User and group
24USER=influxdb
25GROUP=influxdb
26
27# Check for sudo or root privileges before continuing
28if [ "$UID" != "0" ]; then
29 echo "You must be root to run this script"
30 exit 1
31fi
32
33# Daemon name, where is the actual executable If the daemon is not
34# there, then exit.
35DAEMON=/usr/bin/influxd
36if [ ! -x $DAEMON ]; then
37 echo "Executable $DAEMON does not exist!"
38 exit 5
39fi
40
41# Configuration file
42CONFIG=/etc/influxdb/influxdb.conf
43
44# PID file for the daemon
45PIDFILE=/var/run/influxdb/influxd.pid
46PIDDIR=`dirname $PIDFILE`
47if [ ! -d "$PIDDIR" ]; then
48 mkdir -p $PIDDIR
49 chown $USER:$GROUP $PIDDIR
50fi
51
52# Max open files
53OPEN_FILE_LIMIT=65536
54
55if [ -r /lib/lsb/init-functions ]; then
56 source /lib/lsb/init-functions
57fi
58
59# Logging
60if [ -z "$STDOUT" ]; then
61 STDOUT=/var/log/influxdb/influxd.log
62fi
63
64if [ ! -f "$STDOUT" ]; then
65 mkdir -p $(dirname $STDOUT)
66fi
67
68if [ -z "$STDERR" ]; then
69 STDERR=/var/log/influxdb/influxd.log
70fi
71
72if [ ! -f "$STDERR" ]; then
73 mkdir -p $(dirname $STDERR)
74fi
75
76# Override init script variables with DEFAULT values
77if [ -r $DEFAULT ]; then
78 source $DEFAULT
79fi
80
81function log_failure_msg() {
82 echo "$@" "[ FAILED ]"
83}
84
85function log_success_msg() {
86 echo "$@" "[ OK ]"
87}
88
89function start() {
90 # Check if config file exist
91 if [ ! -r $CONFIG ]; then
92 log_failure_msg "config file $CONFIG doesn't exist (or you don't have permission to view)"
93 exit 4
94 fi
95
96 # Check that the PID file exists, and check the actual status of process
97 if [ -f $PIDFILE ]; then
98 PID="$(cat $PIDFILE)"
99 if kill -0 "$PID" &>/dev/null; then
100 # Process is already up
101 log_success_msg "$NAME process is already running"
102 return 0
103 fi
104 else
105 su -s /bin/sh -c "touch $PIDFILE" $USER &>/dev/null
106 if [ $? -ne 0 ]; then
107 log_failure_msg "$PIDFILE not writable, check permissions"
108 exit 5
109 fi
110 fi
111
112 # Bump the file limits, before launching the daemon. These will
113 # carry over to launched processes.
114 ulimit -n $OPEN_FILE_LIMIT
115 if [ $? -ne 0 ]; then
116 log_failure_msg "Unable to set ulimit to $OPEN_FILE_LIMIT"
117 exit 1
118 fi
119
120 # Launch process
121 echo "Starting $NAME..."
122 if command -v start-stop-daemon &>/dev/null; then
123 start-stop-daemon \
124 --background \
125 --chuid $USER:$GROUP \
126 --start \
127 --quiet \
128 --pidfile $PIDFILE \
129 --exec $DAEMON \
130 -- \
131 -config $CONFIG \
132 $INFLUXD_OPTS >>$STDOUT 2>>$STDERR
133 else
134 local CMD="$DAEMON -config $CONFIG $INFLUXD_OPTS >>$STDOUT 2>>$STDERR &"
135 su -s /bin/sh -c "$CMD" $USER
136 fi
137
138 # Sleep to verify process is still up
139 sleep 1
140 echo $(pidof influxd) > $PIDFILE
141 if [ -f $PIDFILE ]; then
142 # PIDFILE exists
143 PID="$(cat $PIDFILE)"
144 if kill -0 "$PID" &>/dev/null; then
145 # PID up, service running
146 log_success_msg "$NAME process was started"
147 return 0
148 fi
149 fi
150 log_failure_msg "$NAME process was unable to start"
151 exit 1
152}
153
154function stop() {
155 # Stop the daemon.
156 if [ -f $PIDFILE ]; then
157 local PID="$(cat $PIDFILE)"
158 if kill -0 $PID &>/dev/null; then
159 echo "Stopping $NAME..."
160 # Process still up, send SIGTERM and remove PIDFILE
161 kill -s TERM $PID &>/dev/null && rm -f "$PIDFILE" &>/dev/null
162 n=0
163 while true; do
164 # Enter loop to ensure process is stopped
165 kill -0 $PID &>/dev/null
166 if [ "$?" != "0" ]; then
167 # Process stopped, break from loop
168 log_success_msg "$NAME process was stopped"
169 return 0
170 fi
171
172 # Process still up after signal, sleep and wait
173 sleep 1
174 n=$(expr $n + 1)
175 if [ $n -eq 30 ]; then
176 # After 30 seconds, send SIGKILL
177 echo "Timeout exceeded, sending SIGKILL..."
178 kill -s KILL $PID &>/dev/null
179 elif [ $? -eq 40 ]; then
180 # After 40 seconds, error out
181 log_failure_msg "could not stop $NAME process"
182 exit 1
183 fi
184 done
185 fi
186 fi
187 log_success_msg "$NAME process already stopped"
188}
189
190function restart() {
191 # Restart the daemon.
192 stop
193 start
194}
195
196function status() {
197 # Check the status of the process.
198 if [ -f $PIDFILE ]; then
199 PID="$(cat $PIDFILE)"
200 if kill -0 $PID &>/dev/null; then
201 log_success_msg "$NAME process is running"
202 exit 0
203 fi
204 fi
205 log_failure_msg "$NAME process is not running"
206 exit 1
207}
208
209case $1 in
210 start)
211 start
212 ;;
213
214 stop)
215 stop
216 ;;
217
218 restart)
219 restart
220 ;;
221
222 status)
223 status
224 ;;
225
226 version)
227 $DAEMON version
228 ;;
229
230 *)
231 # For invalid arguments, print the usage message.
232 echo "Usage: $0 {start|stop|restart|status|version}"
233 exit 2
234 ;;
235esac
diff --git a/meta-oe/recipes-dbs/influxdb/influxdb/influxdb.conf b/meta-oe/recipes-dbs/influxdb/influxdb/influxdb.conf
new file mode 100644
index 0000000000..21c0926f2d
--- /dev/null
+++ b/meta-oe/recipes-dbs/influxdb/influxdb/influxdb.conf
@@ -0,0 +1,586 @@
1### Welcome to the InfluxDB configuration file.
2
3# The values in this file override the default values used by the system if
4# a config option is not specified. The commented out lines are the configuration
5# field and the default value used. Uncommenting a line and changing the value
6# will change the value used at runtime when the process is restarted.
7
8# Once every 24 hours InfluxDB will report usage data to usage.influxdata.com
9# The data includes a random ID, os, arch, version, the number of series and other
10# usage data. No data from user databases is ever transmitted.
11# Change this option to true to disable reporting.
12# reporting-disabled = false
13
14# Bind address to use for the RPC service for backup and restore.
15# bind-address = "127.0.0.1:8088"
16
17###
18### [meta]
19###
20### Controls the parameters for the Raft consensus group that stores metadata
21### about the InfluxDB cluster.
22###
23
24[meta]
25 # Where the metadata/raft database is stored
26 dir = "/var/lib/influxdb/meta"
27
28 # Automatically create a default retention policy when creating a database.
29 # retention-autocreate = true
30
31 # If log messages are printed for the meta service
32 # logging-enabled = true
33
34###
35### [data]
36###
37### Controls where the actual shard data for InfluxDB lives and how it is
38### flushed from the WAL. "dir" may need to be changed to a suitable place
39### for your system, but the WAL settings are an advanced configuration. The
40### defaults should work for most systems.
41###
42
43[data]
44 # The directory where the TSM storage engine stores TSM files.
45 dir = "/var/lib/influxdb/data"
46
47 # The directory where the TSM storage engine stores WAL files.
48 wal-dir = "/var/lib/influxdb/wal"
49
50 # The amount of time that a write will wait before fsyncing. A duration
51 # greater than 0 can be used to batch up multiple fsync calls. This is useful for slower
52 # disks or when WAL write contention is seen. A value of 0s fsyncs every write to the WAL.
53 # Values in the range of 0-100ms are recommended for non-SSD disks.
54 # wal-fsync-delay = "0s"
55
56
57 # The type of shard index to use for new shards. The default is an in-memory index that is
58 # recreated at startup. A value of "tsi1" will use a disk based index that supports higher
59 # cardinality datasets.
60 # index-version = "inmem"
61
62 # Trace logging provides more verbose output around the tsm engine. Turning
63 # this on can provide more useful output for debugging tsm engine issues.
64 # trace-logging-enabled = false
65
66 # Whether queries should be logged before execution. Very useful for troubleshooting, but will
67 # log any sensitive data contained within a query.
68 # query-log-enabled = true
69
70 # Validates incoming writes to ensure keys only have valid unicode characters.
71 # This setting will incur a small overhead because every key must be checked.
72 # validate-keys = false
73
74 # Settings for the TSM engine
75
76 # CacheMaxMemorySize is the maximum size a shard's cache can
77 # reach before it starts rejecting writes.
78 # Valid size suffixes are k, m, or g (case insensitive, 1024 = 1k).
79 # Values without a size suffix are in bytes.
80 # cache-max-memory-size = "1g"
81
82 # CacheSnapshotMemorySize is the size at which the engine will
83 # snapshot the cache and write it to a TSM file, freeing up memory
84 # Valid size suffixes are k, m, or g (case insensitive, 1024 = 1k).
85 # Values without a size suffix are in bytes.
86 # cache-snapshot-memory-size = "25m"
87
88 # CacheSnapshotWriteColdDuration is the length of time at
89 # which the engine will snapshot the cache and write it to
90 # a new TSM file if the shard hasn't received writes or deletes
91 # cache-snapshot-write-cold-duration = "10m"
92
93 # CompactFullWriteColdDuration is the duration at which the engine
94 # will compact all TSM files in a shard if it hasn't received a
95 # write or delete
96 # compact-full-write-cold-duration = "4h"
97
98 # The maximum number of concurrent full and level compactions that can run at one time. A
99 # value of 0 results in 50% of runtime.GOMAXPROCS(0) used at runtime. Any number greater
100 # than 0 limits compactions to that value. This setting does not apply
101 # to cache snapshotting.
102 # max-concurrent-compactions = 0
103
104 # CompactThroughput is the rate limit in bytes per second that we
105 # will allow TSM compactions to write to disk. Note that short bursts are allowed
106 # to happen at a possibly larger value, set by CompactThroughputBurst
107 # compact-throughput = "48m"
108
109 # CompactThroughputBurst is the rate limit in bytes per second that we
110 # will allow TSM compactions to write to disk.
111 # compact-throughput-burst = "48m"
112
113 # If true, then the mmap advise value MADV_WILLNEED will be provided to the kernel with respect to
114 # TSM files. This setting has been found to be problematic on some kernels, and defaults to off.
115 # It might help users who have slow disks in some cases.
116 # tsm-use-madv-willneed = false
117
118 # Settings for the inmem index
119
120 # The maximum series allowed per database before writes are dropped. This limit can prevent
121 # high cardinality issues at the database level. This limit can be disabled by setting it to
122 # 0.
123 # max-series-per-database = 1000000
124
125 # The maximum number of tag values per tag that are allowed before writes are dropped. This limit
126 # can prevent high cardinality tag values from being written to a measurement. This limit can be
127 # disabled by setting it to 0.
128 # max-values-per-tag = 100000
129
130 # Settings for the tsi1 index
131
132 # The threshold, in bytes, when an index write-ahead log file will compact
133 # into an index file. Lower sizes will cause log files to be compacted more
134 # quickly and result in lower heap usage at the expense of write throughput.
135 # Higher sizes will be compacted less frequently, store more series in-memory,
136 # and provide higher write throughput.
137 # Valid size suffixes are k, m, or g (case insensitive, 1024 = 1k).
138 # Values without a size suffix are in bytes.
139 # max-index-log-file-size = "1m"
140
141 # The size of the internal cache used in the TSI index to store previously
142 # calculated series results. Cached results will be returned quickly from the cache rather
143 # than needing to be recalculated when a subsequent query with a matching tag key/value
144 # predicate is executed. Setting this value to 0 will disable the cache, which may
145 # lead to query performance issues.
146 # This value should only be increased if it is known that the set of regularly used
147 # tag key/value predicates across all measurements for a database is larger than 100. An
148 # increase in cache size may lead to an increase in heap usage.
149 series-id-set-cache-size = 100
150
151###
152### [coordinator]
153###
154### Controls the clustering service configuration.
155###
156
157[coordinator]
158 # The default time a write request will wait until a "timeout" error is returned to the caller.
159 # write-timeout = "10s"
160
161 # The maximum number of concurrent queries allowed to be executing at one time. If a query is
162 # executed and exceeds this limit, an error is returned to the caller. This limit can be disabled
163 # by setting it to 0.
164 # max-concurrent-queries = 0
165
166 # The maximum time a query will is allowed to execute before being killed by the system. This limit
167 # can help prevent run away queries. Setting the value to 0 disables the limit.
168 # query-timeout = "0s"
169
170 # The time threshold when a query will be logged as a slow query. This limit can be set to help
171 # discover slow or resource intensive queries. Setting the value to 0 disables the slow query logging.
172 # log-queries-after = "0s"
173
174 # The maximum number of points a SELECT can process. A value of 0 will make
175 # the maximum point count unlimited. This will only be checked every second so queries will not
176 # be aborted immediately when hitting the limit.
177 # max-select-point = 0
178
179 # The maximum number of series a SELECT can run. A value of 0 will make the maximum series
180 # count unlimited.
181 # max-select-series = 0
182
183 # The maximum number of group by time bucket a SELECT can create. A value of zero will max the maximum
184 # number of buckets unlimited.
185 # max-select-buckets = 0
186
187###
188### [retention]
189###
190### Controls the enforcement of retention policies for evicting old data.
191###
192
193[retention]
194 # Determines whether retention policy enforcement enabled.
195 # enabled = true
196
197 # The interval of time when retention policy enforcement checks run.
198 # check-interval = "30m"
199
200###
201### [shard-precreation]
202###
203### Controls the precreation of shards, so they are available before data arrives.
204### Only shards that, after creation, will have both a start- and end-time in the
205### future, will ever be created. Shards are never precreated that would be wholly
206### or partially in the past.
207
208[shard-precreation]
209 # Determines whether shard pre-creation service is enabled.
210 # enabled = true
211
212 # The interval of time when the check to pre-create new shards runs.
213 # check-interval = "10m"
214
215 # The default period ahead of the endtime of a shard group that its successor
216 # group is created.
217 # advance-period = "30m"
218
219###
220### Controls the system self-monitoring, statistics and diagnostics.
221###
222### The internal database for monitoring data is created automatically if
223### if it does not already exist. The target retention within this database
224### is called 'monitor' and is also created with a retention period of 7 days
225### and a replication factor of 1, if it does not exist. In all cases the
226### this retention policy is configured as the default for the database.
227
228[monitor]
229 # Whether to record statistics internally.
230 # store-enabled = true
231
232 # The destination database for recorded statistics
233 # store-database = "_internal"
234
235 # The interval at which to record statistics
236 # store-interval = "10s"
237
238###
239### [http]
240###
241### Controls how the HTTP endpoints are configured. These are the primary
242### mechanism for getting data into and out of InfluxDB.
243###
244
245[http]
246 # Determines whether HTTP endpoint is enabled.
247 # enabled = true
248
249 # Determines whether the Flux query endpoint is enabled.
250 # flux-enabled = false
251
252 # Determines whether the Flux query logging is enabled.
253 # flux-log-enabled = false
254
255 # The bind address used by the HTTP service.
256 # bind-address = ":8086"
257
258 # Determines whether user authentication is enabled over HTTP/HTTPS.
259 # auth-enabled = false
260
261 # The default realm sent back when issuing a basic auth challenge.
262 # realm = "InfluxDB"
263
264 # Determines whether HTTP request logging is enabled.
265 # log-enabled = true
266
267 # Determines whether the HTTP write request logs should be suppressed when the log is enabled.
268 # suppress-write-log = false
269
270 # When HTTP request logging is enabled, this option specifies the path where
271 # log entries should be written. If unspecified, the default is to write to stderr, which
272 # intermingles HTTP logs with internal InfluxDB logging.
273 #
274 # If influxd is unable to access the specified path, it will log an error and fall back to writing
275 # the request log to stderr.
276 # access-log-path = ""
277
278 # Filters which requests should be logged. Each filter is of the pattern NNN, NNX, or NXX where N is
279 # a number and X is a wildcard for any number. To filter all 5xx responses, use the string 5xx.
280 # If multiple filters are used, then only one has to match. The default is to have no filters which
281 # will cause every request to be printed.
282 # access-log-status-filters = []
283
284 # Determines whether detailed write logging is enabled.
285 # write-tracing = false
286
287 # Determines whether the pprof endpoint is enabled. This endpoint is used for
288 # troubleshooting and monitoring.
289 # pprof-enabled = true
290
291 # Enables authentication on pprof endpoints. Users will need admin permissions
292 # to access the pprof endpoints when this setting is enabled. This setting has
293 # no effect if either auth-enabled or pprof-enabled are set to false.
294 # pprof-auth-enabled = false
295
296 # Enables a pprof endpoint that binds to localhost:6060 immediately on startup.
297 # This is only needed to debug startup issues.
298 # debug-pprof-enabled = false
299
300 # Enables authentication on the /ping, /metrics, and deprecated /status
301 # endpoints. This setting has no effect if auth-enabled is set to false.
302 # ping-auth-enabled = false
303
304 # Determines whether HTTPS is enabled.
305 # https-enabled = false
306
307 # The SSL certificate to use when HTTPS is enabled.
308 # https-certificate = "/etc/ssl/influxdb.pem"
309
310 # Use a separate private key location.
311 # https-private-key = ""
312
313 # The JWT auth shared secret to validate requests using JSON web tokens.
314 # shared-secret = ""
315
316 # The default chunk size for result sets that should be chunked.
317 # max-row-limit = 0
318
319 # The maximum number of HTTP connections that may be open at once. New connections that
320 # would exceed this limit are dropped. Setting this value to 0 disables the limit.
321 # max-connection-limit = 0
322
323 # Enable http service over unix domain socket
324 # unix-socket-enabled = false
325
326 # The path of the unix domain socket.
327 # bind-socket = "/var/run/influxdb.sock"
328
329 # The maximum size of a client request body, in bytes. Setting this value to 0 disables the limit.
330 # max-body-size = 25000000
331
332 # The maximum number of writes processed concurrently.
333 # Setting this to 0 disables the limit.
334 # max-concurrent-write-limit = 0
335
336 # The maximum number of writes queued for processing.
337 # Setting this to 0 disables the limit.
338 # max-enqueued-write-limit = 0
339
340 # The maximum duration for a write to wait in the queue to be processed.
341 # Setting this to 0 or setting max-concurrent-write-limit to 0 disables the limit.
342 # enqueued-write-timeout = 0
343
344###
345### [logging]
346###
347### Controls how the logger emits logs to the output.
348###
349
350[logging]
351 # Determines which log encoder to use for logs. Available options
352 # are auto, logfmt, and json. auto will use a more a more user-friendly
353 # output format if the output terminal is a TTY, but the format is not as
354 # easily machine-readable. When the output is a non-TTY, auto will use
355 # logfmt.
356 # format = "auto"
357
358 # Determines which level of logs will be emitted. The available levels
359 # are error, warn, info, and debug. Logs that are equal to or above the
360 # specified level will be emitted.
361 # level = "info"
362
363 # Suppresses the logo output that is printed when the program is started.
364 # The logo is always suppressed if STDOUT is not a TTY.
365 # suppress-logo = false
366
367###
368### [subscriber]
369###
370### Controls the subscriptions, which can be used to fork a copy of all data
371### received by the InfluxDB host.
372###
373
374[subscriber]
375 # Determines whether the subscriber service is enabled.
376 # enabled = true
377
378 # The default timeout for HTTP writes to subscribers.
379 # http-timeout = "30s"
380
381 # Allows insecure HTTPS connections to subscribers. This is useful when testing with self-
382 # signed certificates.
383 # insecure-skip-verify = false
384
385 # The path to the PEM encoded CA certs file. If the empty string, the default system certs will be used
386 # ca-certs = ""
387
388 # The number of writer goroutines processing the write channel.
389 # write-concurrency = 40
390
391 # The number of in-flight writes buffered in the write channel.
392 # write-buffer-size = 1000
393
394
395###
396### [[graphite]]
397###
398### Controls one or many listeners for Graphite data.
399###
400
401[[graphite]]
402 # Determines whether the graphite endpoint is enabled.
403 # enabled = false
404 # database = "graphite"
405 # retention-policy = ""
406 # bind-address = ":2003"
407 # protocol = "tcp"
408 # consistency-level = "one"
409
410 # These next lines control how batching works. You should have this enabled
411 # otherwise you could get dropped metrics or poor performance. Batching
412 # will buffer points in memory if you have many coming in.
413
414 # Flush if this many points get buffered
415 # batch-size = 5000
416
417 # number of batches that may be pending in memory
418 # batch-pending = 10
419
420 # Flush at least this often even if we haven't hit buffer limit
421 # batch-timeout = "1s"
422
423 # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.
424 # udp-read-buffer = 0
425
426 ### This string joins multiple matching 'measurement' values providing more control over the final measurement name.
427 # separator = "."
428
429 ### Default tags that will be added to all metrics. These can be overridden at the template level
430 ### or by tags extracted from metric
431 # tags = ["region=us-east", "zone=1c"]
432
433 ### Each template line requires a template pattern. It can have an optional
434 ### filter before the template and separated by spaces. It can also have optional extra
435 ### tags following the template. Multiple tags should be separated by commas and no spaces
436 ### similar to the line protocol format. There can be only one default template.
437 # templates = [
438 # "*.app env.service.resource.measurement",
439 # # Default template
440 # "server.*",
441 # ]
442
443###
444### [collectd]
445###
446### Controls one or many listeners for collectd data.
447###
448
449[[collectd]]
450 # enabled = false
451 # bind-address = ":25826"
452 # database = "collectd"
453 # retention-policy = ""
454 #
455 # The collectd service supports either scanning a directory for multiple types
456 # db files, or specifying a single db file.
457 # typesdb = "/usr/local/share/collectd"
458 #
459 # security-level = "none"
460 # auth-file = "/etc/collectd/auth_file"
461
462 # These next lines control how batching works. You should have this enabled
463 # otherwise you could get dropped metrics or poor performance. Batching
464 # will buffer points in memory if you have many coming in.
465
466 # Flush if this many points get buffered
467 # batch-size = 5000
468
469 # Number of batches that may be pending in memory
470 # batch-pending = 10
471
472 # Flush at least this often even if we haven't hit buffer limit
473 # batch-timeout = "10s"
474
475 # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.
476 # read-buffer = 0
477
478 # Multi-value plugins can be handled two ways.
479 # "split" will parse and store the multi-value plugin data into separate measurements
480 # "join" will parse and store the multi-value plugin as a single multi-value measurement.
481 # "split" is the default behavior for backward compatibility with previous versions of influxdb.
482 # parse-multivalue-plugin = "split"
483###
484### [opentsdb]
485###
486### Controls one or many listeners for OpenTSDB data.
487###
488
489[[opentsdb]]
490 # enabled = false
491 # bind-address = ":4242"
492 # database = "opentsdb"
493 # retention-policy = ""
494 # consistency-level = "one"
495 # tls-enabled = false
496 # certificate= "/etc/ssl/influxdb.pem"
497
498 # Log an error for every malformed point.
499 # log-point-errors = true
500
501 # These next lines control how batching works. You should have this enabled
502 # otherwise you could get dropped metrics or poor performance. Only points
503 # metrics received over the telnet protocol undergo batching.
504
505 # Flush if this many points get buffered
506 # batch-size = 1000
507
508 # Number of batches that may be pending in memory
509 # batch-pending = 5
510
511 # Flush at least this often even if we haven't hit buffer limit
512 # batch-timeout = "1s"
513
514###
515### [[udp]]
516###
517### Controls the listeners for InfluxDB line protocol data via UDP.
518###
519
520[[udp]]
521 # enabled = false
522 # bind-address = ":8089"
523 # database = "udp"
524 # retention-policy = ""
525
526 # InfluxDB precision for timestamps on received points ("" or "n", "u", "ms", "s", "m", "h")
527 # precision = ""
528
529 # These next lines control how batching works. You should have this enabled
530 # otherwise you could get dropped metrics or poor performance. Batching
531 # will buffer points in memory if you have many coming in.
532
533 # Flush if this many points get buffered
534 # batch-size = 5000
535
536 # Number of batches that may be pending in memory
537 # batch-pending = 10
538
539 # Will flush at least this often even if we haven't hit buffer limit
540 # batch-timeout = "1s"
541
542 # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.
543 # read-buffer = 0
544
545###
546### [continuous_queries]
547###
548### Controls how continuous queries are run within InfluxDB.
549###
550
551[continuous_queries]
552 # Determines whether the continuous query service is enabled.
553 # enabled = true
554
555 # Controls whether queries are logged when executed by the CQ service.
556 # log-enabled = true
557
558 # Controls whether queries are logged to the self-monitoring data store.
559 # query-stats-enabled = false
560
561 # interval for how often continuous queries will be checked if they need to run
562 # run-interval = "1s"
563
564###
565### [tls]
566###
567### Global configuration settings for TLS in InfluxDB.
568###
569
570[tls]
571 # Determines the available set of cipher suites. See https://golang.org/pkg/crypto/tls/#pkg-constants
572 # for a list of available ciphers, which depends on the version of Go (use the query
573 # SHOW DIAGNOSTICS to see the version of Go used to build InfluxDB). If not specified, uses
574 # the default settings from Go's crypto/tls package.
575 # ciphers = [
576 # "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305",
577 # "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305",
578 # ]
579
580 # Minimum version of the tls protocol that will be negotiated. If not specified, uses the
581 # default settings from Go's crypto/tls package.
582 # min-version = "tls1.2"
583
584 # Maximum version of the tls protocol that will be negotiated. If not specified, uses the
585 # default settings from Go's crypto/tls package.
586 # max-version = "tls1.3"
diff --git a/meta-oe/recipes-dbs/influxdb/influxdb_1.7.10.bb b/meta-oe/recipes-dbs/influxdb/influxdb_1.7.10.bb
new file mode 100644
index 0000000000..4f2bb78b23
--- /dev/null
+++ b/meta-oe/recipes-dbs/influxdb/influxdb_1.7.10.bb
@@ -0,0 +1,63 @@
1DESCRIPTION = "InfluxDB is a time series database designed to handle high write and query loads."
2HOMEPAGE = "https://www.influxdata.com/products/influxdb-overview/"
3
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=ba8146ad9cc2a128209983265136e06a"
6
7FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
8
9RDEPENDS_${PN} = "bash"
10RDEPENDS_${PN}-dev = "bash"
11
12GO_IMPORT = "github.com/influxdata/influxdb"
13
14GO_INSTALL = "\
15 ${GO_IMPORT}/cmd/influx \
16 ${GO_IMPORT}/cmd/influxd \
17"
18
19SRC_URI = "\
20 git://${GO_IMPORT};protocol=https;branch=1.7;destsuffix=${BPN}-${PV}/src/${GO_IMPORT} \
21 file://influxdb \
22 file://influxdb.conf \
23"
24
25SRCREV = "c958f436b2e538a88a7815aad721c7774a0b8f63"
26
27inherit go-mod systemd update-rc.d useradd
28
29USERADD_PACKAGES = "${PN}"
30USERADD_PARAM_${PN} = "--system -d /var/lib/influxdb -m -s /bin/nologin influxdb"
31
32do_install_prepend() {
33 rm ${B}/src/${GO_IMPORT}/build.py
34 rm ${B}/src/${GO_IMPORT}/build.sh
35 rm ${B}/src/${GO_IMPORT}/Dockerfile*
36}
37
38do_install_append() {
39 install -d ${D}${sysconfdir}/influxdb
40 install -m 0644 ${WORKDIR}/influxdb.conf ${D}${sysconfdir}/influxdb
41 chown -R root.influxdb ${D}${sysconfdir}/influxdb
42
43 install -d ${D}${sysconfdir}/init.d
44 install -m 0755 ${WORKDIR}/influxdb ${D}${sysconfdir}/init.d/influxdb
45
46 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ] ; then
47 install -d ${D}${sysconfdir}/logrotate.d
48 install -m 0644 ${S}/src/${GO_IMPORT}/scripts/logrotate ${D}${sysconfdir}/logrotate.d/influxdb
49 fi
50
51 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ] ; then
52 install -d ${D}${systemd_unitdir}/system
53 install -m 0644 ${S}/src/${GO_IMPORT}/scripts/influxdb.service ${D}${systemd_system_unitdir}/influxdb.service
54 fi
55
56 # TODO chown
57}
58
59INITSCRIPT_PACKAGES = "${PN}"
60INITSCRIPT_NAME = "influxdb"
61INITSCRIPT_PARAMS = "defaults"
62
63SYSTEMD_SERVICE_${PN} = "influxdb.service"