-
Documentation task
-
Resolution: Fixed
-
Trivial
-
5.2.6rc1
-
Sprint 74 (Mar 2021)
-
0.125
Quoting documentation:
Field Type Description value number (for numeric items) or
string (for text items)Collected item value. type number Collected value type:
0 - numeric float, 1 - character, 2 - log, 3 - numeric unsigned, 4 -text
(Not related to the issue, but note that there is a lack of space in "-text".)
And then there example follows:
Numeric (float) value:
{"host":{"host":"Host B","name":"Host B visible"},"groups":["Group X","Group Y","Group Z"],"applications":["CPU","Performance"],"itemid":4,"name":"CPU Load","clock":1519304285,"ns":123456789,"value":"0.1","type":0}
So the protocol description says that value must be "number (for numeric items)", but the example for "Numeric (float) value" has value as string ("value":"0.1") despite type saying that it should be numeric ("type":0 i.e. "0 - numeric float").
P.S. I have not checked the actual behaviour. Maybe it's just a wrong example, maybe something worse.