So normally I'd define ShortMessageLength during the extension definition part of my configuration file like so:

<Extension gelf>
  Module xm_gelf
  ShortMessageLength -1

Unfortunately, there are other issues preventing me from doing that. Is there a way to define ShortMessageLength in the input or output areas instead? When I try to like so:

<Input win_dns_logs_in>
    Module im_file
    File 'C:\\dns.txt'
    ShortMessageLength -1
    InputType LineBased


I get the following error: "invalid keyword: ShortMessageLength"





AskedAugust 30, 2016 - 9:53pm

Answer (1)

ShortMessageLength is specific to the xm_gelf module and needs to be defined in its own Extension block for that reason. Note that the $ShortMessage field is honoured by xm_gelf and you can do this elsewhere in other blocks:

Exec $ShortMessage = substr($Message, 0, 100);