From 9463c937e697345255aab690472e4716aeb49b1d Mon Sep 17 00:00:00 2001 From: Julian Brost Date: Mon, 22 May 2023 16:56:43 +0200 Subject: [PATCH] Fix documentation for parse_performance_data DSL function The function does not support parsing multiple values at once but instead generates labels like "foo=1 bar": Icinga 2 (version: v2.13.0-729-g8fe957bc2) Type $help to view available commands. <1> => parse_performance_data("foo=1 bar=2") { counter = false crit = null label = "foo=1 bar" max = null min = null type = "PerfdataValue" unit = "" value = 2.000000 warn = null } While a function with the documented behavior would probably be more useful, that change can't be made in a compatible way as this would have to change the return type from PerfdataValue to Array. --- doc/18-library-reference.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/18-library-reference.md b/doc/18-library-reference.md index b3d021683..feb5d5d43 100644 --- a/doc/18-library-reference.md +++ b/doc/18-library-reference.md @@ -446,7 +446,8 @@ Signature: function parse_performance_data(pd) ``` -Parses a performance data string and returns an array describing the values. +Parses a single performance data value from a string and returns a +[PerfdataValue](08-advanced-topics.md#advanced-value-types-perfdatavalue) object. Example: