https://nagios-plugins.org/doc/guidelines.html#AEN200
Note # 1: space separated list of label/value pairs
Remove the , so it's only a space separating each data source, not a comma and and space:
Code: Select all
$PowerStruct.Outputstring += " | 'Total Power'=$($PowerStruct.PsuTotalCons)kW 'PSU1'=$($PowerStruct.Psu1CurCons)W 'PSU2'=$($PowerStruct.Psu2CurCons)W 'PSU3'=$($PowerStruct.Psu3CurCons)W 'PSU4'=$($PowerStruct.Psu4CurCons)W 'PSU5'=$($PowerStruct.Psu5CurCons)W 'PSU6'=$($PowerStruct.Psu6CurCons)W"I haven’t had any experience with this, but is the , in the number a decimal point ... but in your country a comma is used instead of a decimal point? As part of your Operating System language thingy-ma-bob.'Total Power'=2,516kW
'Total Power'=0,800kW
'Total Power'=1,228kW
I ask this because on the article we have looked at, this example was given:
You can see it has , to separate the thousands and a decimal place followed by three 0's.Suppose we wanted to display three decimal places? No problem; this command takes care of that: "{0:N3}" -f $a. Run that command and you’ll end up with output that looks like this: 19,385,790,464.000.
So if you're using the same formatting code, then you numbers should be:
'Total Power'=2.516kW
'Total Power'=0.800kW
'Total Power'=1.228kW