title: logstash : create fingerprint from timestamp part
body: <p>I have a problem to create a fingerprint based on client-ip and a timestamp containing date+hour. 
  I'm using logstash 7.3.1. Here it the relevant part of my configuration file </p>
  
  <pre><code>filter {
    grok {
      match =&gt; { "message" =&gt; "%{COMBINEDAPACHELOG}" }
    }
    date{ 
      match =&gt; [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z" ]
    }
    ...
    ruby{
      code =&gt; "
        keydate = Date.parse(event.get('timestamp'))
        event.set('keydate', keydate.strftime('%Y%m%d-%H'))
      "
    }
    fingerprint {
      key =&gt; "my_custom_secret"
      method =&gt; "SHA256"
      concatenate_sources =&gt; "true"
      source =&gt; [
        "clientip",
        "keydate"
      ]
    }
  }
  </code></pre>
  
  <p>The problem is into the 'ruby' block. I tried multiple methods to compute the keydate, but none works without giving me errors.
  The last one (using this config file) is </p>
  
  <pre><code>[ERROR][logstash.filters.ruby    ] Ruby exception occurred: Missing Converter handling for full class name=org.jruby.ext.date.RubyDateTime, simple name=RubyDateTime
  </code></pre>
  
  <p><strong>input document</strong></p>
  
  <pre><code>{
        "timestamp" =&gt; "19/Sep/2019:00:07:56 +0200",
         "referrer" =&gt; "-",
         "@version" =&gt; "1",
       "@timestamp" =&gt; 2019-09-18T22:07:56.000Z,
               ...
          "request" =&gt; "index.php",
             "type" =&gt; "apache_access",
         "clientip" =&gt; "54.157.XXX.XXX",
             "verb" =&gt; "GET",
               ...
             "tags" =&gt; [
                [0] "_rubyexception"  # generated by the ruby exception above
             ],
         "response" =&gt; "200"
  }
  </code></pre>
  
  <p><strong>expected output</strong></p>
  
  <pre><code>{
        "timestamp" =&gt; "19/Sep/2019:00:07:56 +0200",
         "referrer" =&gt; "-",
         "@version" =&gt; "1",
       "@timestamp" =&gt; 2019-09-18T22:07:56.000Z,
               ...
          "request" =&gt; "index.php",
             "type" =&gt; "apache_access",
         "clientip" =&gt; "54.157.XXX.XXX",
             "verb" =&gt; "GET",
               ...
          "keydate" =&gt; "20190919-00", #format : YYYYMMDD-HH
      "fingerprint" =&gt; "ab347766ef....1190af",
         "response" =&gt; "200"
  }
  </code></pre>
  
  <p>As always, many thanks for all your help !</p>