Skip to content

Commit a799295

Browse files
author
Simona Bennarova
committed
JSON output: fixed wrong field for templateId and odid field added
1 parent 90414bd commit a799295

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/plugins/output/json/src/Storage.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,15 @@ Storage::convert(struct fds_drec &rec, const fds_iemgr_t *iemgr, fds_ipfix_msg_h
228228
snprintf(field, 64, ",\"ipfix:seqNumber\":\"%" PRIu32 "\"", ntohl(hdr->seq_num));
229229
buffer_append(field);
230230

231-
snprintf(field, 64, ",\"ipfix:templateId\":\"%" PRIu32 "\"", ntohl(hdr->odid));
231+
snprintf(field, 64, ",\"ipfix:odid\":\"%" PRIu32 "\"", ntohl(hdr->odid));
232232
buffer_append(field);
233233

234234
snprintf(field, 32, ",\"ipfix:msgLength\":\"%" PRIu16 "\"", ntohs(hdr->length));
235235
buffer_append(field);
236236

237+
snprintf(field, 32, ",\"ipfix:templateId\":\"%" PRIu16 "\"", rec.tmplt->id);
238+
buffer_append(field);
239+
237240
// Append the record with '}' parenthesis removed before
238241
buffer_append("}");
239242
}

0 commit comments

Comments
 (0)