From 4a61784c630ee322a8d911b8bf756fae79e00279 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sat, 20 Sep 2025 18:33:40 +0200 Subject: [PATCH 1/5] collectd: Index page and two tutorials --- docs/ingest/telemetry/index.md | 6 + docs/integrate/collectd/Dockerfile | 11 ++ docs/integrate/collectd/collectd-cratedb.conf | 18 ++ .../integrate/collectd/collectd-telegraf.conf | 6 + docs/integrate/collectd/index.md | 65 +++++++ docs/integrate/collectd/telegraf.conf | 54 ++++++ docs/integrate/collectd/tutorial-collectd.md | 155 +++++++++++++++ docs/integrate/collectd/tutorial-telegraf.md | 179 ++++++++++++++++++ 8 files changed, 494 insertions(+) create mode 100644 docs/integrate/collectd/Dockerfile create mode 100644 docs/integrate/collectd/collectd-cratedb.conf create mode 100644 docs/integrate/collectd/collectd-telegraf.conf create mode 100644 docs/integrate/collectd/index.md create mode 100644 docs/integrate/collectd/telegraf.conf create mode 100644 docs/integrate/collectd/tutorial-collectd.md create mode 100644 docs/integrate/collectd/tutorial-telegraf.md diff --git a/docs/ingest/telemetry/index.md b/docs/ingest/telemetry/index.md index b9967b85..408d1f78 100644 --- a/docs/ingest/telemetry/index.md +++ b/docs/ingest/telemetry/index.md @@ -54,6 +54,12 @@ scenarios. CrateDB offers corresponding integration adapters. :padding: 0 :gutter: 2 +::::{grid-item-card} collectd +:link: collectd +:link-type: ref +Send metrics with collectd, a system and application metrics collection daemon. +:::: + ::::{grid-item-card} Prometheus :link: prometheus :link-type: ref diff --git a/docs/integrate/collectd/Dockerfile b/docs/integrate/collectd/Dockerfile new file mode 100644 index 00000000..2bf37762 --- /dev/null +++ b/docs/integrate/collectd/Dockerfile @@ -0,0 +1,11 @@ +FROM docker.io/debian:13-slim + +# Configure system environment. +ENV DEBIAN_FRONTEND=noninteractive + +# Install collectd. +RUN apt update --yes +RUN apt install --yes collectd + +# Run collectd in foreground. +ENTRYPOINT ["collectd", "-f"] diff --git a/docs/integrate/collectd/collectd-cratedb.conf b/docs/integrate/collectd/collectd-cratedb.conf new file mode 100644 index 00000000..c45ce8fd --- /dev/null +++ b/docs/integrate/collectd/collectd-cratedb.conf @@ -0,0 +1,18 @@ +# collectd configuration for storing metrics into CrateDB. +# https://collectd.org/documentation/manpages/collectd.conf.html#plugin-postgresql + +LoadPlugin postgresql + + + + Statement "INSERT INTO doc.collectd_data (p_time, p_host, p_plugin, p_plugin_instance, p_type, p_type_instance, p_value_names, p_type_names, p_values) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9);" + StoreRates true + + + Writer sqlstore + CommitInterval 30 + Host cratedb + User crate + Password crate + + diff --git a/docs/integrate/collectd/collectd-telegraf.conf b/docs/integrate/collectd/collectd-telegraf.conf new file mode 100644 index 00000000..db474a41 --- /dev/null +++ b/docs/integrate/collectd/collectd-telegraf.conf @@ -0,0 +1,6 @@ +# collectd configuration for sending metrics to Telegraf. +# https://collectd.org/documentation/manpages/collectd.conf.html#plugin-network + + + Server "telegraf" + diff --git a/docs/integrate/collectd/index.md b/docs/integrate/collectd/index.md new file mode 100644 index 00000000..e48c4a67 --- /dev/null +++ b/docs/integrate/collectd/index.md @@ -0,0 +1,65 @@ +(collectd)= +# collectd + +```{div} .float-right +[![collectd example graph](https://collectd.org/images/graph-cpu.png){width=180px loading=lazy}][collectd] +``` +```{div} .clearfix +``` + +:::{rubric} About +::: + +[collectd] is a system statistics collection daemon suitable for application +performance metrics periodically and provides mechanisms to store the values +in a variety of ways. + +collectd gathers metrics from various sources, e.g. the operating system, +applications, logfiles and external devices, and stores this information or +makes it available over the network. Those statistics can be used to monitor +systems, find performance bottlenecks (i.e. performance analysis) and predict +future system load (i.e. capacity planning). + +:::{rubric} Synopsis +::: + +Either use the `postgresql` plugin to store metrics into CrateDB, + +:::{literalinclude} collectd-cratedb.conf +::: + +or use the `network` plugin to forward metrics to Telegraf. + +:::{literalinclude} collectd-telegraf.conf +::: + + +:::{rubric} Learn +::: + +::::{grid} + +:::{grid-item-card} Tutorial: Use collectd with CrateDB +:link: collectd-tutorial-base +:link-type: ref +How to configure collectd to submit metrics to CrateDB. +::: + +:::{grid-item-card} Tutorial: Use collectd with Telegraf and CrateDB +:link: collectd-tutorial-telegraf +:link-type: ref +How to configure collectd and Telegraf to submit metrics to CrateDB. +::: + +:::: + + +:::{toctree} +:maxdepth: 1 +:hidden: +Tutorial with collectd +Tutorial with Telegraf +::: + + +[collectd]: https://collectd.org/ diff --git a/docs/integrate/collectd/telegraf.conf b/docs/integrate/collectd/telegraf.conf new file mode 100644 index 00000000..fbc742b5 --- /dev/null +++ b/docs/integrate/collectd/telegraf.conf @@ -0,0 +1,54 @@ +[[inputs.socket_listener]] + service_address = "udp://:25826" + + ## Data format to consume. + ## Each data format has its own unique set of configuration options, read + ## more about them here: + ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md + data_format = "collectd" + + ## Authentication file for cryptographic security levels + # collectd_auth_file = "/etc/collectd/auth_file" + ## One of none (default), sign, or encrypt + # collectd_security_level = "encrypt" + ## Path of to TypesDB specifications + # collectd_typesdb = ["/usr/share/collectd/types.db"] + + ## Multi-value plugins can be handled two ways. + ## "split" will parse and store the multi-value plugin data into separate measurements + ## "join" will parse and store the multi-value plugin as a single multi-value measurement. + ## "split" is the default behavior for backward compatibility with previous versions of InfluxDB. + collectd_parse_multivalue = "split" + +# Configuration for CrateDB to send metrics to. +[[outputs.cratedb]] + ## Connection parameters for accessing the database see + ## https://pkg.go.dev/github.com/jackc/pgx/v4#ParseConfig + ## for available options + url = "postgres://crate:crate@cratedb/doc?sslmode=disable" + + ## Timeout for all CrateDB queries. + # timeout = "5s" + + ## Name of the table to store metrics in. + # table = "metrics" + + ## If true, and the metrics table does not exist, create it automatically. + table_create = true + + ## The character(s) to replace any '.' in an object key with + # key_separator = "_" + +# Read metrics about cpu usage +[[inputs.cpu]] + ## Whether to report per-cpu stats or not + percpu = true + ## Whether to report total system cpu stats or not + totalcpu = true + ## If true, collect raw CPU time metrics + collect_cpu_time = false + ## If true, compute and report the sum of all non-idle CPU states + ## NOTE: The resulting 'time_active' field INCLUDES 'iowait'! + report_active = false + ## If true and the info is available then add core_id and physical_id tags + core_tags = false diff --git a/docs/integrate/collectd/tutorial-collectd.md b/docs/integrate/collectd/tutorial-collectd.md new file mode 100644 index 00000000..c7eb253f --- /dev/null +++ b/docs/integrate/collectd/tutorial-collectd.md @@ -0,0 +1,155 @@ +(collectd-tutorial-base)= +# Load data into CrateDB using collectd + +This tutorial walks you through configuring and starting the [collectd] +agent and daemon, and CrateDB, to submit and store system metrics into +CrateDB. + +## Prerequisites + +Docker is used for running all components. This approach works consistently +across Linux, macOS, and Windows. Alternatively, you can use Podman. + +### CLI + +Prepare shortcut for the psql command. + +::::{tab-set} +:sync-group: os + +:::{tab-item} Linux and macOS +:sync: unix +To make the settings persistent, add them to your shell profile (`~/.profile`). +```shell +alias psql="docker run --rm -i --network=cratedb-demo docker.io/postgres psql" +``` +::: +:::{tab-item} Windows PowerShell +:sync: powershell +To make the settings persistent, add them to your PowerShell profile (`$PROFILE`). +```powershell +function psql { docker run --rm -i --network=cratedb-demo docker.io/postgres psql @args } +``` +::: +:::{tab-item} Windows Command +:sync: dos +```shell +doskey psql=docker run --rm -i --network=cratedb-demo docker.io/postgres psql $* +``` +::: + +:::: + +### CrateDB + +Create a shared network. +```shell +docker network create cratedb-demo +``` + +Start CrateDB. +```shell +docker run --name=cratedb --rm -it --network=cratedb-demo \ + --publish=4200:4200 --publish=5432:5432 \ + --env=CRATE_HEAP_SIZE=2g docker.io/crate -Cdiscovery.type=single-node +``` + +## Configure + +### Provision database + +Create a database table that stores collected metrics. +```shell +psql "postgresql://crate:crate@cratedb:5432/" < Date: Sat, 20 Sep 2025 18:51:37 +0200 Subject: [PATCH 2/5] collectd: Implement suggestions by CodeRabbit --- docs/integrate/collectd/Dockerfile | 3 +-- docs/integrate/collectd/collectd-cratedb.conf | 1 + docs/integrate/collectd/collectd-telegraf.conf | 2 ++ docs/integrate/collectd/tutorial-telegraf.md | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/integrate/collectd/Dockerfile b/docs/integrate/collectd/Dockerfile index 2bf37762..4001a460 100644 --- a/docs/integrate/collectd/Dockerfile +++ b/docs/integrate/collectd/Dockerfile @@ -4,8 +4,7 @@ FROM docker.io/debian:13-slim ENV DEBIAN_FRONTEND=noninteractive # Install collectd. -RUN apt update --yes -RUN apt install --yes collectd +RUN apt update --yes && apt install --yes collectd # Run collectd in foreground. ENTRYPOINT ["collectd", "-f"] diff --git a/docs/integrate/collectd/collectd-cratedb.conf b/docs/integrate/collectd/collectd-cratedb.conf index c45ce8fd..ecc314f0 100644 --- a/docs/integrate/collectd/collectd-cratedb.conf +++ b/docs/integrate/collectd/collectd-cratedb.conf @@ -10,6 +10,7 @@ LoadPlugin postgresql Writer sqlstore + # Commit every 30 seconds (adjust based on write volume) CommitInterval 30 Host cratedb User crate diff --git a/docs/integrate/collectd/collectd-telegraf.conf b/docs/integrate/collectd/collectd-telegraf.conf index db474a41..fe1334ba 100644 --- a/docs/integrate/collectd/collectd-telegraf.conf +++ b/docs/integrate/collectd/collectd-telegraf.conf @@ -3,4 +3,6 @@ Server "telegraf" + # Optional: ServerPort 25826 + # Optional: SecurityLevel "sign" or "encrypt" diff --git a/docs/integrate/collectd/tutorial-telegraf.md b/docs/integrate/collectd/tutorial-telegraf.md index 339ddb9c..f76ad880 100644 --- a/docs/integrate/collectd/tutorial-telegraf.md +++ b/docs/integrate/collectd/tutorial-telegraf.md @@ -58,7 +58,7 @@ docker run --name=cratedb --rm -it --network=cratedb-demo \ collectd is not available per OCI image, so either install standalone, or use these instructions for building an OCI to invoke on Docker or Podman. -Store this file under the name `Dockername`, then invoke the command +Store this file under the name `Dockerfile`, then invoke the command displayed below. :::{literalinclude} Dockerfile From ad0f0daf6418e47611f4171e5c55eedd56cebaf0 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sat, 20 Sep 2025 20:42:44 +0200 Subject: [PATCH 3/5] collectd: Refinements. Cross links. Wording. --- .../integrate/collectd/collectd-telegraf.conf | 2 ++ docs/integrate/collectd/index.md | 4 +++- docs/integrate/collectd/telegraf.conf | 14 ----------- docs/integrate/collectd/tutorial-collectd.md | 13 ++++------ docs/integrate/collectd/tutorial-telegraf.md | 24 +++++++++---------- 5 files changed, 22 insertions(+), 35 deletions(-) diff --git a/docs/integrate/collectd/collectd-telegraf.conf b/docs/integrate/collectd/collectd-telegraf.conf index fe1334ba..edabe539 100644 --- a/docs/integrate/collectd/collectd-telegraf.conf +++ b/docs/integrate/collectd/collectd-telegraf.conf @@ -1,6 +1,8 @@ # collectd configuration for sending metrics to Telegraf. # https://collectd.org/documentation/manpages/collectd.conf.html#plugin-network +LoadPlugin network + Server "telegraf" # Optional: ServerPort 25826 diff --git a/docs/integrate/collectd/index.md b/docs/integrate/collectd/index.md index e48c4a67..61306588 100644 --- a/docs/integrate/collectd/index.md +++ b/docs/integrate/collectd/index.md @@ -28,7 +28,8 @@ Either use the `postgresql` plugin to store metrics into CrateDB, :::{literalinclude} collectd-cratedb.conf ::: -or use the `network` plugin to forward metrics to Telegraf. +or use the `network` plugin to forward metrics to Telegraf, then +using its built-in [CrateDB Output Plugin for Telegraf]. :::{literalinclude} collectd-telegraf.conf ::: @@ -63,3 +64,4 @@ Tutorial with Telegraf [collectd]: https://collectd.org/ +[CrateDB Output Plugin for Telegraf]: https://github.com/influxdata/telegraf/tree/master/plugins/outputs/cratedb diff --git a/docs/integrate/collectd/telegraf.conf b/docs/integrate/collectd/telegraf.conf index fbc742b5..08cddb27 100644 --- a/docs/integrate/collectd/telegraf.conf +++ b/docs/integrate/collectd/telegraf.conf @@ -38,17 +38,3 @@ ## The character(s) to replace any '.' in an object key with # key_separator = "_" - -# Read metrics about cpu usage -[[inputs.cpu]] - ## Whether to report per-cpu stats or not - percpu = true - ## Whether to report total system cpu stats or not - totalcpu = true - ## If true, collect raw CPU time metrics - collect_cpu_time = false - ## If true, compute and report the sum of all non-idle CPU states - ## NOTE: The resulting 'time_active' field INCLUDES 'iowait'! - report_active = false - ## If true and the info is available then add core_id and physical_id tags - core_tags = false diff --git a/docs/integrate/collectd/tutorial-collectd.md b/docs/integrate/collectd/tutorial-collectd.md index c7eb253f..13517299 100644 --- a/docs/integrate/collectd/tutorial-collectd.md +++ b/docs/integrate/collectd/tutorial-collectd.md @@ -10,7 +10,7 @@ CrateDB. Docker is used for running all components. This approach works consistently across Linux, macOS, and Windows. Alternatively, you can use Podman. -### CLI +### Commands Prepare shortcut for the psql command. @@ -76,7 +76,7 @@ CREATE TABLE doc.collectd_data ( SQL ``` -### Build collectd OCI +### Build collectd collectd is not available per OCI image, so either install standalone, or use these instructions for building an OCI to invoke on Docker or Podman. @@ -98,11 +98,8 @@ the name `collectd-cratedb.conf`. :::{literalinclude} collectd-cratedb.conf ::: -## Start services +## Start collectd -### collectd - -Start collectd. ::::{tab-set} :sync-group: os @@ -134,8 +131,8 @@ docker run --name=collectd --rm -it --network=cratedb-demo ^ ## Explore data -After starting the daemon, the first metrics will appear in the designated table in -CrateDB, ready to be inspected. +After the first scraping interval, metrics will show up in the +designated table in CrateDB, ready to be inspected. ```shell psql "postgresql://crate:crate@cratedb:5432/" -c "SELECT * FROM doc.collectd_data LIMIT 5;" ``` diff --git a/docs/integrate/collectd/tutorial-telegraf.md b/docs/integrate/collectd/tutorial-telegraf.md index f76ad880..8f9e82c0 100644 --- a/docs/integrate/collectd/tutorial-telegraf.md +++ b/docs/integrate/collectd/tutorial-telegraf.md @@ -3,14 +3,15 @@ This tutorial walks you through configuring and starting the [collectd] and [Telegraf] agents and daemons, and CrateDB, to submit and store -system metrics into CrateDB. +system metrics into CrateDB, +using the built-in [CrateDB Output Plugin for Telegraf]. ## Prerequisites Docker is used for running all components. This approach works consistently across Linux, macOS, and Windows. Alternatively, you can use Podman. -### CLI +### Commands Prepare shortcut for the psql command. @@ -40,7 +41,7 @@ doskey psql=docker run --rm -i --network=cratedb-demo docker.io/postgres psql $* :::: -### CrateDB +### Start CrateDB Create a shared network. ```shell @@ -54,7 +55,7 @@ docker run --name=cratedb --rm -it --network=cratedb-demo \ --env=CRATE_HEAP_SIZE=2g docker.io/crate -Cdiscovery.type=single-node ``` -### collectd +### Build collectd collectd is not available per OCI image, so either install standalone, or use these instructions for building an OCI to invoke on Docker or Podman. @@ -69,7 +70,7 @@ docker build -t local/collectd -f Dockerfile . ## Configure -### Telegraf +### Configure Telegraf Configure Telegraf to receive metrics from collectd agents and to store them in CrateDB, by using the configuration blueprint outlined below, possibly @@ -79,7 +80,7 @@ adjusting it to match your environment. Store this file under the name :::{literalinclude} telegraf.conf ::: -### collectd +### Configure collectd To send the collected data to Telegraf, configure collectd by loading its [`network` plugin] and supplying settings. Store this file under @@ -91,9 +92,8 @@ the name `collectd-telegraf.conf`. ## Start services -### Telegraf +### Start Telegraf -Start Telegraf. ::::{tab-set} :sync-group: os @@ -123,9 +123,8 @@ docker run --name=telegraf --rm -it --network=cratedb-demo ^ ::: :::: -### collectd +### Start collectd -Start collectd. ::::{tab-set} :sync-group: os @@ -157,8 +156,8 @@ docker run --name=collectd --rm -it --network=cratedb-demo ^ ## Explore data -After starting the daemon, the first metrics will appear in the designated table in -CrateDB, ready to be inspected. +After the first scraping interval, metrics will show up in the +designated table in CrateDB, ready to be inspected. ```shell psql "postgresql://crate:crate@cratedb:5432/" -c "SELECT * FROM doc.metrics LIMIT 5;" ``` @@ -175,5 +174,6 @@ psql "postgresql://crate:crate@cratedb:5432/" -c "SELECT * FROM doc.metrics LIMI [collectd]: https://collectd.org/ +[CrateDB Output Plugin for Telegraf]: https://github.com/influxdata/telegraf/tree/master/plugins/outputs/cratedb [`network` plugin]: https://collectd.org/documentation/manpages/collectd.conf.html#plugin-network [Telegraf]: https://www.influxdata.com/time-series-platform/telegraf/ From 642493a2541bd70a108e15779c78780c0cdbfbf2 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sat, 20 Sep 2025 22:02:28 +0200 Subject: [PATCH 4/5] collectd: Implement suggestions by CodeRabbit --- docs/integrate/collectd/tutorial-collectd.md | 21 ++++++++++---------- docs/integrate/collectd/tutorial-telegraf.md | 21 ++++++++++---------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/docs/integrate/collectd/tutorial-collectd.md b/docs/integrate/collectd/tutorial-collectd.md index 13517299..eecfbf44 100644 --- a/docs/integrate/collectd/tutorial-collectd.md +++ b/docs/integrate/collectd/tutorial-collectd.md @@ -1,14 +1,13 @@ (collectd-tutorial-base)= # Load data into CrateDB using collectd -This tutorial walks you through configuring and starting the [collectd] -agent and daemon, and CrateDB, to submit and store system metrics into -CrateDB. +This tutorial shows how to configure and start [collectd] and CrateDB +so that collectd sends system metrics and CrateDB stores them. ## Prerequisites -Docker is used for running all components. This approach works consistently -across Linux, macOS, and Windows. Alternatively, you can use Podman. +Docker runs all components consistently across Linux, macOS, and Windows. +If you use Podman, substitute podman for docker in the commands. ### Commands @@ -21,20 +20,20 @@ Prepare shortcut for the psql command. :sync: unix To make the settings persistent, add them to your shell profile (`~/.profile`). ```shell -alias psql="docker run --rm -i --network=cratedb-demo docker.io/postgres psql" +alias psql="docker run --rm -i --network=cratedb-demo docker.io/postgres:16 psql" ``` ::: :::{tab-item} Windows PowerShell :sync: powershell To make the settings persistent, add them to your PowerShell profile (`$PROFILE`). ```powershell -function psql { docker run --rm -i --network=cratedb-demo docker.io/postgres psql @args } +function psql { docker run --rm -i --network=cratedb-demo docker.io/postgres:16 psql @args } ``` ::: :::{tab-item} Windows Command :sync: dos ```shell -doskey psql=docker run --rm -i --network=cratedb-demo docker.io/postgres psql $* +doskey psql=docker run --rm -i --network=cratedb-demo docker.io/postgres:16 psql $* ``` ::: @@ -78,8 +77,8 @@ SQL ### Build collectd -collectd is not available per OCI image, so either install standalone, -or use these instructions for building an OCI to invoke on Docker or Podman. +collectd is not available as an OCI image, so either install it standalone, +or use these instructions to build an OCI image to run on Docker or Podman. Store this file under the name `Dockerfile`, then invoke the command displayed below. @@ -134,7 +133,7 @@ docker run --name=collectd --rm -it --network=cratedb-demo ^ After the first scraping interval, metrics will show up in the designated table in CrateDB, ready to be inspected. ```shell -psql "postgresql://crate:crate@cratedb:5432/" -c "SELECT * FROM doc.collectd_data LIMIT 5;" +psql "postgresql://crate:crate@cratedb:5432/" -c "SELECT * FROM doc.collectd_data ORDER BY p_time LIMIT 5;" ``` ```psql p_time | p_host | p_plugin | p_plugin_instance | p_type | p_type_instance | p_value_names | p_type_names | p_values | month diff --git a/docs/integrate/collectd/tutorial-telegraf.md b/docs/integrate/collectd/tutorial-telegraf.md index 8f9e82c0..35861f5d 100644 --- a/docs/integrate/collectd/tutorial-telegraf.md +++ b/docs/integrate/collectd/tutorial-telegraf.md @@ -1,15 +1,14 @@ (collectd-tutorial-telegraf)= # Load data into CrateDB using collectd and Telegraf -This tutorial walks you through configuring and starting the [collectd] -and [Telegraf] agents and daemons, and CrateDB, to submit and store -system metrics into CrateDB, -using the built-in [CrateDB Output Plugin for Telegraf]. +This tutorial shows how to configure and start [collectd], [Telegraf] +and CrateDB so that collectd sends system metrics to Telegraf, which +stores it into CrateDB using the built-in [CrateDB Output Plugin for Telegraf]. ## Prerequisites -Docker is used for running all components. This approach works consistently -across Linux, macOS, and Windows. Alternatively, you can use Podman. +Docker runs all components consistently across Linux, macOS, and Windows. +If you use Podman, substitute podman for docker in the commands. ### Commands @@ -22,20 +21,20 @@ Prepare shortcut for the psql command. :sync: unix To make the settings persistent, add them to your shell profile (`~/.profile`). ```shell -alias psql="docker run --rm -i --network=cratedb-demo docker.io/postgres psql" +alias psql="docker run --rm -i --network=cratedb-demo docker.io/postgres:16 psql" ``` ::: :::{tab-item} Windows PowerShell :sync: powershell To make the settings persistent, add them to your PowerShell profile (`$PROFILE`). ```powershell -function psql { docker run --rm -i --network=cratedb-demo docker.io/postgres psql @args } +function psql { docker run --rm -i --network=cratedb-demo docker.io/postgres:16 psql @args } ``` ::: :::{tab-item} Windows Command :sync: dos ```shell -doskey psql=docker run --rm -i --network=cratedb-demo docker.io/postgres psql $* +doskey psql=docker run --rm -i --network=cratedb-demo docker.io/postgres:16 psql $* ``` ::: @@ -57,8 +56,8 @@ docker run --name=cratedb --rm -it --network=cratedb-demo \ ### Build collectd -collectd is not available per OCI image, so either install standalone, -or use these instructions for building an OCI to invoke on Docker or Podman. +collectd is not available as an OCI image, so either install it standalone, +or use these instructions to build an OCI image to run on Docker or Podman. Store this file under the name `Dockerfile`, then invoke the command displayed below. From ea5e730017e629882b0395e59e1053eb0ed9495d Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Tue, 23 Sep 2025 20:53:46 +0200 Subject: [PATCH 5/5] collectd: s/tutorial/usage guide/ --- docs/integrate/collectd/index.md | 12 ++++++------ .../{tutorial-collectd.md => usage-collectd.md} | 4 ++-- .../{tutorial-telegraf.md => usage-telegraf.md} | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) rename docs/integrate/collectd/{tutorial-collectd.md => usage-collectd.md} (98%) rename docs/integrate/collectd/{tutorial-telegraf.md => usage-telegraf.md} (98%) diff --git a/docs/integrate/collectd/index.md b/docs/integrate/collectd/index.md index 61306588..7b423264 100644 --- a/docs/integrate/collectd/index.md +++ b/docs/integrate/collectd/index.md @@ -40,14 +40,14 @@ using its built-in [CrateDB Output Plugin for Telegraf]. ::::{grid} -:::{grid-item-card} Tutorial: Use collectd with CrateDB -:link: collectd-tutorial-base +:::{grid-item-card} Use collectd with CrateDB +:link: collectd-usage-base :link-type: ref How to configure collectd to submit metrics to CrateDB. ::: -:::{grid-item-card} Tutorial: Use collectd with Telegraf and CrateDB -:link: collectd-tutorial-telegraf +:::{grid-item-card} Use collectd with Telegraf and CrateDB +:link: collectd-usage-telegraf :link-type: ref How to configure collectd and Telegraf to submit metrics to CrateDB. ::: @@ -58,8 +58,8 @@ How to configure collectd and Telegraf to submit metrics to CrateDB. :::{toctree} :maxdepth: 1 :hidden: -Tutorial with collectd -Tutorial with Telegraf +Usage with collectd +Usage with Telegraf ::: diff --git a/docs/integrate/collectd/tutorial-collectd.md b/docs/integrate/collectd/usage-collectd.md similarity index 98% rename from docs/integrate/collectd/tutorial-collectd.md rename to docs/integrate/collectd/usage-collectd.md index eecfbf44..2ed7a512 100644 --- a/docs/integrate/collectd/tutorial-collectd.md +++ b/docs/integrate/collectd/usage-collectd.md @@ -1,7 +1,7 @@ -(collectd-tutorial-base)= +(collectd-usage-base)= # Load data into CrateDB using collectd -This tutorial shows how to configure and start [collectd] and CrateDB +This usage guide shows how to configure and start [collectd] and CrateDB so that collectd sends system metrics and CrateDB stores them. ## Prerequisites diff --git a/docs/integrate/collectd/tutorial-telegraf.md b/docs/integrate/collectd/usage-telegraf.md similarity index 98% rename from docs/integrate/collectd/tutorial-telegraf.md rename to docs/integrate/collectd/usage-telegraf.md index 35861f5d..f868e386 100644 --- a/docs/integrate/collectd/tutorial-telegraf.md +++ b/docs/integrate/collectd/usage-telegraf.md @@ -1,7 +1,7 @@ -(collectd-tutorial-telegraf)= +(collectd-usage-telegraf)= # Load data into CrateDB using collectd and Telegraf -This tutorial shows how to configure and start [collectd], [Telegraf] +This usage guide shows how to configure and start [collectd], [Telegraf] and CrateDB so that collectd sends system metrics to Telegraf, which stores it into CrateDB using the built-in [CrateDB Output Plugin for Telegraf].