commit 8667e6df0ee29b6a63c7a3193681aed2f8322d5d Author: Daniel Ankers Date: Wed Jan 3 13:40:55 2024 +0000 Initial commit diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4af037c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM memes/rrdtool:1.5.6 +COPY defaults.cfg /defaults.cfg +COPY rrdsrv /rrdsrv +ENTRYPOINT ["/rrdsrv","-c","/defaults.cfg"] diff --git a/defaults.cfg b/defaults.cfg new file mode 100644 index 0000000..5754c5c --- /dev/null +++ b/defaults.cfg @@ -0,0 +1,46 @@ +# This file contains the default values of all rrdsrv configuration. +# All of these options can be left out of your configuration +# but are included for completeness. + +# Address:Port pair to listen on for api requests. +listen_address = "localhost:9191" + +# To mandate HTTP basic auth username/passwords set this +# to an htpasswd file - See example/basic-auth.cfg. +# If set then unauthenticated api access is disabled. +basic_auth_htpasswd_file = "" + +# Set a signed query secret to enable signed query authentication. +# If set then unauthenticated api access is disabled. +signed_query_secret = "" +signed_query_secret_file = "" + +# Instances of `rrdtool` are started via: +# $cfg.shell -c "$rrdtool_command $escaped_args" +rrdtool_command = "exec rrdtool" + +# Timeout for any `rrdtool_command` command invocations. +rrdtool_timeout = "60s" + +# `rrdsrv` maintains a dynamically sized pool of `rrdtool` 'remote control' processes, +# this is the maximum number will be kept alive to answer requests. +# if set to 0, remote control pooling is not used at all. +rrdtool_pool_max_size = 8 + +# If this time period elapses without an api query, +# rrdsrv will stop a single rrdtool instance. +rrdtool_pool_attrition_delay = "5m" + +# If set, enables the list_metrics endpoint. +# When a user requests the list_metrics endpoint +# the command: +# $cfg.shell -c "$list_rrds_command" +# +# The output lines should be one rrd per line. +list_rrds_command = "" + +# Timeout for any `list_rrds_command` invocations. +list_rrds_timeout = "60s" + +# Shell that is used to launch rrdtool instances. +shell_path = "/bin/sh" \ No newline at end of file diff --git a/rrdsrv b/rrdsrv new file mode 100755 index 0000000..e9733ec Binary files /dev/null and b/rrdsrv differ