Hi Fabien, Could you please give me some documentation to use date-parser() and any other function to use within Syslog-ng. Thanks for your help. Regards, Mukesh On Mon, Feb 8, 2021 at 12:32 PM Fabien Wernli <wernli@in2p3.fr> wrote:
Hi Mukesh,
On Sun, Feb 07, 2021 at 06:12:00PM +0530, mukesh kumar wrote:
<value name="requesttime">${tmp.year}-$(if ("${tmp.month}" == "Jan") 01 $(if ("${tmp.month}" == "jan") 01 $(if ("${tmp.month}" == "Feb") 02 $(if ("${tmp.month}" == "feb") 02 $(if ("${tmp.month}" == "Mar") 03 $(if ("${tmp.month}" == "mar") 03 $(if ("${tmp.month}" == "Apr") 04 $(if ("${tmp.month}" == "apr") 04 $(if ("${tmp.month}" == "May") 05 $(if ("${tmp.month}" == "may") 05 $(if ("${tmp.month}" == "Jun") 06 $(if ("${tmp.month}" == "jun") 06 $(if ("${tmp.month}" == "Jul") 07 $(if ("${tmp.month}" == "jul") 07 $(if ("${tmp.month}" == "Aug") 08 $(if ("${tmp.month}" == "aug") 08 $(if ("${tmp.month}" == "Sep") 09 $(if ("${tmp.month}" == "sep") 09 $(if ("${tmp.month}" == "Oct") 10 $(if ("${tmp.month}" == "oct") 10 $(if ("${tmp.month}" == "Nov") 11 $(if ("${tmp.month}" == "nov") 11 $(if ("${tmp.month}" == "Dec") 12 $(if ("${tmp.month}" == "dec") 12 ${tmp.month}))))))))))))))))))))))))-${tmp.day} ${tmp.time}</value> </values>
Did you consider the excellent date-parser() which would *probably* help in this situation ?
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq