I am using xpath protobuf as input plugin for telegraf. The proto buff format are correct and well defined and i am able to read the data as well, but only for proto files not having repeated for single fields. In case of repeated, i am not able to read correctly. Following is section of xml when xml_print_document option is set to true.
<?xml version="1.0" encoding="UTF-8"?>
<report>
<sampleduration>900</sampleduration>
<gateway>
<red><element>103</element></red>
<blue><element>105</element></blue>
<black><element>120</element></black>
</gateway>
</report>
The protobuff format is:
message gateway{
repeated uint32 red = 1;
repeated uint32 blue = 2;
repeated uint32 black = 3;
}
message report{
string sampleduration = 1;
repeated gateway = 10;
}
It is confirmed that node is not coming from source side, it Telegraf which is adding . The issue is happening only for fields with repeated option like here red/blue/black, otherwise its working fine.
PS - this is dummy xml and proto which i have written by using original one, i can provide the original xml and proto if required on personal address.
Thanks