Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 54DA2178BE for ; Tue, 21 Apr 2015 21:57:42 +0000 (UTC) Received: (qmail 13033 invoked by uid 500); 21 Apr 2015 21:57:37 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 12985 invoked by uid 500); 21 Apr 2015 21:57:37 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 12971 invoked by uid 99); 21 Apr 2015 21:57:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Apr 2015 21:57:36 +0000 X-ASF-Spam-Status: No, hits=3.9 required=5.0 tests=FORGED_YAHOO_RCVD,HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: encountered temporary error during SPF processing of domain of sameerbkk@yahoo.com) Received: from [54.76.25.247] (HELO mx1-eu-west.apache.org) (54.76.25.247) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Apr 2015 21:57:07 +0000 Received: from nm47-vm8.bullet.mail.bf1.yahoo.com (nm47-vm8.bullet.mail.bf1.yahoo.com [216.109.115.143]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id DE28820A94 for ; Tue, 21 Apr 2015 21:56:45 +0000 (UTC) Received: from [66.196.81.170] by nm47.bullet.mail.bf1.yahoo.com with NNFMP; 21 Apr 2015 21:55:35 -0000 Received: from [98.139.212.236] by tm16.bullet.mail.bf1.yahoo.com with NNFMP; 21 Apr 2015 21:55:35 -0000 Received: from [127.0.0.1] by omp1045.mail.bf1.yahoo.com with NNFMP; 21 Apr 2015 21:55:35 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 809343.26763.bm@omp1045.mail.bf1.yahoo.com X-YMail-OSG: OBJpoK0VM1m4K0oos5lx9VDZWdMv.fRiyflvPJcqOo5VXtOEi_3gHN1eowJurcd vTHaDRLjB5cPeuvEfvR04cfjmEgLulSepcvHnB7.XdeX9bpSDCLBiykOdADOXUnZ10jx0jsCIC30 5XAWToteUGdxVs6VjQd7biLKpvn6nQrCY2Hktytoto_owHDAAoHNZUV4rE_tXqf6V11kSza2pi6t oCJYd6lDPCnbDU5IJpU8ZGUrGpfpoSY3cp2mxu4.3WnlZUVkyvrMdqVEsMrza1PGfRPuTBdBphKB CLvZ4zcVYEXhVW1ZlBsWqw2ll0Rzg9z0RrqxP_kK.topBaCZMycQDf.7F0X131ZGi7uC0rgjdW2F 9iqKWLXKmU34j83cA.wgUEJDX.hL2f9PDigtBNitEPcL8a5PhUmexwB6Fz6o4FHsdxE8EZdfd5zB 3_qtgbzPas3w37a53CI._3fBUP7A28BxCwUbQeGTt2Q1HxzVKlweq9uErMmY5YspSxqydvyRzSqT lJjKI Received: by 76.13.27.35; Tue, 21 Apr 2015 21:55:35 +0000 Date: Tue, 21 Apr 2015 21:55:35 +0000 (UTC) From: Sameer Babu K K Reply-To: Sameer Babu K K To: "users@camel.apache.org" Message-ID: <20627978.1845262.1429653335021.JavaMail.yahoo@mail.yahoo.com> Subject: Syslog data format incorrect parsing of structured data MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1845261_677043310.1429653335015" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_1845261_677043310.1429653335015 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable According to RFC 5424 syslog structured data can be like the below examples= : =C2=A0=C2=A0 All examples in this section show only the structured data par= t of =C2=A0=C2=A0 the message.=C2=A0 Examples should be considered to be on one = line.=C2=A0 They =C2=A0=C2=A0 are wrapped on multiple lines in this document for readability =C2=A0=C2=A0 purposes.=C2=A0 A description is given after each example. =C2=A0=C2=A0 Example 1 - Valid =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [exampleSDID@3= 2473 iut=3D"3" eventSource=3D"Application" =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 eventID=3D"101= 1"] =C2=A0=C2=A0 This example is a structured data element with a non-IANA cont= rolled =C2=A0=C2=A0 SD-ID of type "exampleSDID@32473", which has three parameters. =C2=A0=C2=A0 Example 2 - Valid =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [exampleSDID@3= 2473 iut=3D"3" eventSource=3D"Application" =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 eventID=3D"101= 1"][examplePriority@32473 class=3D"high"] But the syslog data format (org.apache.camel.component.syslog.SyslogConvert= er) just considers the value till next space as the structured message. =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 StringBu= ilder msgId =3D new StringBuilder(); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 while ((= charFound =3D (char) (byteBuffer.get() & 0xff)) !=3D ' ') { =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 msgId.append(charFound); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 rfc5424S= yslogMessage.setMsgId(msgId.toString()); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 StringBu= ilder structuredData =3D new StringBuilder(); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 while ((= charFound =3D (char) (byteBuffer.get() & 0xff)) !=3D ' ') { =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 structuredData.append(charFound); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 rfc5424S= yslogMessage.setStructuredData(structuredData.toString()); This seems to be a bug to me. Is there a fix or latest version available fo= r this parsing? Best Regards,Sameer =C2=A0 ------=_Part_1845261_677043310.1429653335015--