Skip to content

CritIfNotMatch tries to convert strings to decimal if the string contains a colon #816

@moreamazingnick

Description

@moreamazingnick

I came across an unusual behavior updating the framework from 1.9 to 1.13.*

The Check engine tries to convert a threshold string into a decimal if the string contains a colon even if a match function is used and the perf data generation is disabled.

$Check = New-IcingaCheck -Name "Check" -Value "testa" -NoPerfData;
$Check.CritIfNotMatch("testb:testc") | Out-Null;
New-IcingaCheckresult -Check $Check  -Compile

return:

[UNKNOWN] Check: Der Wert "testb" kann nicht in den Typ "System.Decimal" konvertiert werden. Fehler: "Die Eingabezeichenfolge hat das falsche Format."
3

Best Regards
Nicolas

Metadata

Metadata

Assignees

Labels

BugThere is an issue present

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions