From 9f8e6e5190c217b74b8ba1cde1cd24b149aadc58 Mon Sep 17 00:00:00 2001 From: Josh B <421772+HT154@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:02:26 -0700 Subject: [PATCH] [com.influxdata.telegraf] Add CollectdInputDataFormat (#78) --- packages/com.influxdata.telegraf/PklProject | 2 +- .../parsers/CollectdInputDataFormat.pkl | 42 +++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 packages/com.influxdata.telegraf/plugins/parsers/CollectdInputDataFormat.pkl diff --git a/packages/com.influxdata.telegraf/PklProject b/packages/com.influxdata.telegraf/PklProject index efd705e..65edf27 100644 --- a/packages/com.influxdata.telegraf/PklProject +++ b/packages/com.influxdata.telegraf/PklProject @@ -22,5 +22,5 @@ dependencies { } package { - version = "1.2.1" + version = "1.3.0" } diff --git a/packages/com.influxdata.telegraf/plugins/parsers/CollectdInputDataFormat.pkl b/packages/com.influxdata.telegraf/plugins/parsers/CollectdInputDataFormat.pkl new file mode 100644 index 0000000..301b520 --- /dev/null +++ b/packages/com.influxdata.telegraf/plugins/parsers/CollectdInputDataFormat.pkl @@ -0,0 +1,42 @@ +//===----------------------------------------------------------------------===// +// Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//===----------------------------------------------------------------------===// +/// The Collectd data format parses Collectd data into metric fields. +@ModuleInfo { minPklVersion = "0.25.0" } +module com.influxdata.telegraf.plugins.parsers.CollectdInputDataFormat + +extends "InputDataFormat.pkl" + +data_format: "collectd" + +/// Authentication file for cryptographic security levels. +collectd_auth_file: String? + +/// Collectd security level to enfore. +/// +/// Default: `"none"` +collectd_security_level: ("none"|"sign"|"encrypt")? + +/// Paths of to TypesDB specifications. +collectd_typesdb: Listing? + +/// The method for handling multi-value plugins. +/// +/// 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. +/// +/// Default: `"split"`, for backward compatibility with previous versions of influxdb. +collectd_parse_multivalue: ("split"|"join")?