<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to extract the host and dvc field with the Cisco ios TA in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-the-host-and-dvc-field-with-the-Cisco-ios-TA/m-p/494696#M60862</link>
    <description>&lt;P&gt;Hi hfernandez_hfernandez_,&lt;BR /&gt;
I'm not sure about your regex because I cannot read it, please use the Code Sample button (the one with 101010), so I give you my regex for host field that you have to extract at index time:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^\w+\s+\d+\s+\d+:\d+:\d+\s+[^ ]*\s+\d+\s+([^:]*)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/iOnbKJ/1" target="_blank"&gt;https://regex101.com/r/iOnbKJ/1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Then at search time you can extract the dvc field with this regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^\w+\s+\d+\s+\d+:\d+:\d+\s+(?&amp;lt;dvc&amp;gt;[^ ]*)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/iOnbKJ/2" target="_blank"&gt;https://regex101.com/r/iOnbKJ/2&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;In addition, where do you deployed this TA?&lt;BR /&gt;
it must be on Indexers.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 02:31:03 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2020-09-30T02:31:03Z</dc:date>
    <item>
      <title>How to extract the host and dvc field with the Cisco ios TA</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-the-host-and-dvc-field-with-the-Cisco-ios-TA/m-p/494695#M60861</link>
      <description>&lt;P&gt;Hi Answers,&lt;/P&gt;

&lt;P&gt;I'm currently using the following apps:&lt;BR /&gt;
Cisco Networks App for Splunk Enterprise 2.5.8 (&lt;A href="https://splunkbase.splunk.com/app/1352/" target="_blank"&gt;https://splunkbase.splunk.com/app/1352/&lt;/A&gt;)&lt;BR /&gt;
Cisco Networks Add-on for Splunk Enterprise 2.5.8(&lt;A href="https://splunkbase.splunk.com/app/1467/" target="_blank"&gt;https://splunkbase.splunk.com/app/1467/&lt;/A&gt;)&lt;/P&gt;

&lt;P&gt;I'm collecting the logs from the devices via syslog:&lt;/P&gt;

&lt;P&gt;Here is how the raw log looks in Splunk:&lt;BR /&gt;
&lt;STRONG&gt;Oct 9 16:14:04 syslog-server.domain.com 1 aa-bbbb-ccc: *pemReceiveTask: Oct 09 16:13:56.935: %DTL-6-OSARP_ADD_FAILED: [SS]dtl_arp.c:1549 Unable to add an ARP entry for x.x.x.x to the operating system. No such device.&lt;/STRONG&gt;*&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;syslog-server.domain.com = syslog server (some device names have "-" in them)&lt;BR /&gt;
aa-bbbb-ccc = device (some device names have "-" in them)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Splunk extracts the host=syslog-server.domain.com and dvc=syslog-server.domain.com.  When I apply the syslog-header-stripper-ts-host to both the props.conf and transforms.conf, but that doesn't change the host and dvc values.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TA-cisco_ios\props.conf
[source::udp:514]
TRANSFORMS-strip-syslog = syslog-header-stripper-ts-host
TRANSFORMS-force_sourcetype_for_cisco_ios = force_sourcetype_for_cisco_ios, force_sourcetype_for_cisco_ios-xr, force_sourcetype_for_cisco_ios-xe
SHOULD_LINEMERGE = false
MAX_TIMESTAMP_LOOKAHEAD = 100
TA-cisco_ios\transforms.conf
# This will strip the syslog header (date stamp and host) from a syslog event
[syslog-header-stripper-ts-host]
REGEX         = ^[A-Z][a-z]+\s+\d+\s\d+:\d+:\d+\s[^\s]*\s\d\s(.*)$
FORMAT        = $1
DEST_KEY      = _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The syslog-header-stripper-ts-host data looks like:&lt;BR /&gt;
&lt;STRONG&gt;aa-bbbb-ccc: *pemReceiveTask: Oct 09 16:09:56.926: %DTL-6-OSARP_ADD_FAILED: [SS]dtl_arp.c:1549 Unable to add an ARP entry for x.x.x.x to the operating system. No such device.&lt;/STRONG&gt;*&lt;/P&gt;

&lt;P&gt;In this case the host and dvc still are set to syslog-server.domain.com.  How do I change the value of host and dvc to aa-bbbb-ccc ?&lt;/P&gt;

&lt;P&gt;I appreciate the help.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:25:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-the-host-and-dvc-field-with-the-Cisco-ios-TA/m-p/494695#M60861</guid>
      <dc:creator>hfernandez_</dc:creator>
      <dc:date>2020-09-30T02:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract the host and dvc field with the Cisco ios TA</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-the-host-and-dvc-field-with-the-Cisco-ios-TA/m-p/494696#M60862</link>
      <description>&lt;P&gt;Hi hfernandez_hfernandez_,&lt;BR /&gt;
I'm not sure about your regex because I cannot read it, please use the Code Sample button (the one with 101010), so I give you my regex for host field that you have to extract at index time:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^\w+\s+\d+\s+\d+:\d+:\d+\s+[^ ]*\s+\d+\s+([^:]*)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/iOnbKJ/1" target="_blank"&gt;https://regex101.com/r/iOnbKJ/1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Then at search time you can extract the dvc field with this regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^\w+\s+\d+\s+\d+:\d+:\d+\s+(?&amp;lt;dvc&amp;gt;[^ ]*)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/iOnbKJ/2" target="_blank"&gt;https://regex101.com/r/iOnbKJ/2&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;In addition, where do you deployed this TA?&lt;BR /&gt;
it must be on Indexers.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:31:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-the-host-and-dvc-field-with-the-Cisco-ios-TA/m-p/494696#M60862</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-30T02:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract the host and dvc field with the Cisco ios TA</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-the-host-and-dvc-field-with-the-Cisco-ios-TA/m-p/494697#M60863</link>
      <description>&lt;P&gt;Hi Giuseppe,&lt;/P&gt;

&lt;P&gt;I appreciate the reply and guidance.  The sample code comes from the etc/system/default/transforms.conf file under the  stanza:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# This will strip the syslog header (date stamp and host) from a syslog event
[syslog-header-stripper-ts-host]
REGEX         = ^[A-Z][a-z]+\s+\d+\s\d+:\d+:\d+\s[^\s]*\s(.*)$
FORMAT        = $1
DEST_KEY      = _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ah, here's more background info.  We have Splunk Cloud and the app and TA are installed to both Cloud SHs and INDs.  The syslog data is being sent to an on-prem HF via UDP port and I'm configuring the TA there.  The challenge is that the App Dashboards show the host and dvc as the syslog server vs the actual network device.  I would simply change the field name in the code, but the actual device name is not capture.  How do I go about setting the host and/or dvc to the actual device name at index time in the TA?  I appreciate it.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 15:14:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-the-host-and-dvc-field-with-the-Cisco-ios-TA/m-p/494697#M60863</guid>
      <dc:creator>hfernandez_</dc:creator>
      <dc:date>2019-10-10T15:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract the host and dvc field with the Cisco ios TA</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-the-host-and-dvc-field-with-the-Cisco-ios-TA/m-p/494698#M60864</link>
      <description>&lt;P&gt;Ok, I was able to get it to work.  I applied your regex and the the following code to the the TA's props.conf and transforms.conf files.  Here is the code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TA-cisco_ios\props.conf

[source::udp:514]
TRANSFORMS-force_host= force_real_host 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    TA-cisco_ios\transforms.conf

    [force_real_host]
    REGEX = ^\w+\s+\d+\s+\d+:\d+:\d+\s+[^ ]*\s+\d+\s+([^:]*)
    FORMAT = host::$1
    DEST_KEY = MetaData:Host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I appreciate the help.  Hope this helps others.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 16:04:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-the-host-and-dvc-field-with-the-Cisco-ios-TA/m-p/494698#M60864</guid>
      <dc:creator>hfernandez_</dc:creator>
      <dc:date>2019-10-10T16:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract the host and dvc field with the Cisco ios TA</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-the-host-and-dvc-field-with-the-Cisco-ios-TA/m-p/494699#M60865</link>
      <description>&lt;P&gt;Hi hfernandez_,&lt;BR /&gt;
did you solved?&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 07:15:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-the-host-and-dvc-field-with-the-Cisco-ios-TA/m-p/494699#M60865</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-10-11T07:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract the host and dvc field with the Cisco ios TA</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-the-host-and-dvc-field-with-the-Cisco-ios-TA/m-p/494700#M60866</link>
      <description>&lt;P&gt;Hi Giuseppe,&lt;BR /&gt;
Yes, I was able to put together all the pieces and got it to work.  I appreciate the help in pointing me in the right direction.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 14:41:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-the-host-and-dvc-field-with-the-Cisco-ios-TA/m-p/494700#M60866</guid>
      <dc:creator>hfernandez_</dc:creator>
      <dc:date>2019-10-11T14:41:08Z</dc:date>
    </item>
  </channel>
</rss>

