<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Using the patterndb to associate
      metadata with each syslog message is great, however, you have to
      ensure that those additional fields are output into the json
      object that you send to elasticsearch.<br>
      <br>
      We do exactly what you are trying to do, so that our elasticsearch
      document contains all of the fields parsed by our patterndb.<br>
      <br>
      as an example we have a log line of<br>
      <br>
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      September 12th 2016, 11:17:25.836    chiru.comp.uvic.ca   
      mail.info    in.imapproxyd: LOGOUT: '"vgmodi"' from server sd
      [200]<br>
      <br>
      and an elasticsearch document shown below. The cfgmgr* fields come
      from our asset management system. The PATTERNID comes from our
      pattern database entry and the user and sd fields come from the
      patterndb data parsers.<br>
      <br>
      You don't need to have a pattern for every log line at the start.
      The second example below is a syslog line that does NOT match any
      pattern in our database.<br>
      <br>
      {<br>
        "_index": "flare-2016.09.12.11",<br>
        "_type": "flare",<br>
        "_id": "AVcfnhBMpdjtwzWgS7rU",<br>
        "_score": 1,<br>
        "_source": {<br>
          "user": "vgmodi",<br>
          "sd": "200",<br>
          "flare": {<br>
            "profile": "DCS"<br>
          },<br>
          "cfgmgrrole": "ADMIN",<br>
          "cfgmgrosFull": "Redhat 5_64",<br>
          "cfgmgros": "unix",<br>
          "cfgmgrmodel": "ESX 5",<br>
          "cfgmgrlocation": "ESX-BCP",<br>
          "cfgmgrenvironment": "BCP PROD",<br>
          "cfgmgrassetType": "Virtual Server",<br>
          "SOURCEHOST": "chiru.comp.uvic.ca",<br>
          "SHORTHOST": "chiru",<br>
          "PROGRAM": "in.imapproxyd",<br>
          "PRIORITY": "info",<br>
          "PID": "5129",<br>
          "PATTERNID": "864",<br>
          "MESSAGE": "LOGOUT: '\"vgmodi\"' from server sd [200]",<br>
          "ISODATE": "2016-09-12T11:17:25.836-07:00",<br>
          "HOST": "chiru.comp.uvic.ca",<br>
          "FACILITY": "mail"<br>
        },<br>
        "fields": {<br>
          "ISODATE": [<br>
            1473704234822<br>
          ]<br>
        }<br>
      }<br>
      <br>
      Non-matching log line.<br>
      <br>
      {<br>
        "_index": "flare-2016.09.12.11",<br>
        "_type": "flare",<br>
        "_id": "AVcfpLpIpdjtwzWgXfVD",<br>
        "_score": 1,<br>
        "_source": {<br>
          "flare": {<br>
            "profile": "DCS"<br>
          },<br>
          "cfgmgrrole": "ADMIN",<br>
          "cfgmgrosFull": "Redhat 6_64",<br>
          "cfgmgros": "unix",<br>
          "cfgmgrmodel": "ESX 5",<br>
          "cfgmgrlocation": "ESX-PROD",<br>
          "cfgmgrenvironment": "Prod",<br>
          "cfgmgrassetType": "Virtual Server",<br>
          "SOURCEHOST": "tyrant.comp.uvic.ca",<br>
          "SHORTHOST": "tyrant",<br>
          "PROGRAM": "cas",<br>
          "PRIORITY": "info",<br>
          "MESSAGE": "prod: [ajp-apr-8009-exec-37]: Mon Sep 12 11:24:31
      PDT
2016,CAS,SERVICE_TICKET_NOT_CREATED,<a class="moz-txt-link-freetext" href="https://www.uvic.ca/netlink/j_spring_cas_security_check,audit:unknown,206.87.181.44,www.uvic.ca">https://www.uvic.ca/netlink/j_spring_cas_security_check,audit:unknown,206.87.181.44,www.uvic.ca</a>",<br>
          "ISODATE": "2016-09-12T11:24:31.000-07:00",<br>
          "HOST": "tyrant.comp.uvic.ca",<br>
          "FACILITY": "daemon"<br>
        },<br>
        "fields": {<br>
          "ISODATE": [<br>
            1473704671000<br>
          ]<br>
        }<br>
      }<br>
      <br>
      <br>
      On 09/12/2016 11:08 AM, Scot Needy wrote:<br>
    </div>
    <blockquote
      cite="mid:7EC0E214-04BA-485A-89C0-3149B50CCF33@gmail.com"
      type="cite">
      <pre wrap="">Hello List, 

  
I’m trying to understand the use case of pattern_db when the destination will be ES. My initial understanding was that I could use patterndb as an engine to tag my log message data with attributes, but it doesn’t seem to work that way. I have a json output like this in Kibana. 

In a loghost deployment, It looks like I would need to manually align a patterndb filter with each host_message type even before patterned comes into play.  

Q) What is the right solution for enriching message data into ES ? 

Example JSON from Kibana MESSAGE is not parsed.  
=======================
{
  "_index": "syslog-ng_2016.09.12",
  "_type": "syslog-ng",
  "_id": "AVcdnzJla9VjMdxDYo8Z",
  "_score": null,
  "_source": {
    "PROGRAM": “###-asa11",
    "PRIORITY": "warning",
    "MESSAGE": "%ASA-4-106023: Deny tcp src outside:###.###.31.2/33553 dst public:###.###.7.191/443 by access-group \"outside_access_in\" [0x2c1c6a65, 0x0]",
    "ISODATE": "2016-09-12T13:57:03-04:00",
    "HOST": “###.###.###.###",
    "FACILITY": "local5",
    "@timestamp": "2016-09-12T13:57:03-04:00"
  },
  "fields": {
    "ISODATE": [
      1473703023000
    ],
    "@timestamp": [
      1473703023000
    ]
  },
  "sort": [
    1473703023000
  ]
}


______________________________________________________________________________
Member info: <a class="moz-txt-link-freetext" href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
Documentation: <a class="moz-txt-link-freetext" href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a>
FAQ: <a class="moz-txt-link-freetext" href="http://www.balabit.com/wiki/syslog-ng-faq">http://www.balabit.com/wiki/syslog-ng-faq</a>

</pre>
    </blockquote>
    <br>
    <p><br>
    </p>
    <pre class="moz-signature" cols="500">-- 
Evan Rempel                                      <a class="moz-txt-link-abbreviated" href="mailto:erempel@uvic.ca">erempel@uvic.ca</a>
Senior Systems Administrator                        250.721.7691
Data Centre Services, University Systems, University of Victoria 
</pre>
  </body>
</html>