<?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 Device Configuration checking in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/Device-Configuration-checking/m-p/74404#M22504</link>
    <description>&lt;P&gt;HI I have a problem.&lt;/P&gt;

&lt;P&gt;I have a NAS that have a mail folder to store Devices' configuration file.&lt;BR /&gt;
Each device will have a separate directory to its configuration.&lt;BR /&gt;
A configuration commit in the device will automatically save a new copy in own folder and each day a copy will automatically generate at specific time, for example, 12:00am.&lt;/P&gt;

&lt;P&gt;I want to use splunk to figure out change of the configuration &lt;/P&gt;

&lt;P&gt;I could use diff and head to pull out last 5 configuration and diff on it.&lt;BR /&gt;
but boss want to add an additional comparison whcih compare to the last file one day ago.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="deviceconfig" host="switch1" latest_time=now | head 5 | diff position1=1 position2=2 
| append [ search sourcetype="deviceconfig" host="switch1" latest_time=now | head 5 | diff position1=2 position2=3 ] 
| append [ search sourcetype="deviceconfig" host="switch1" latest_time=now | head 5 | diff position1=3 position2=4 ] 
| append [ search sourcetype="deviceconfig" host="switch1" latest_time=now | head 5 | diff position1=4 position2=5 ] 
| rex  "@@\s*(?&amp;lt;para1&amp;gt; [+-]?\d*,\d*\s*[+-]?\d*,\d*)\s*@@" max_match=50 | rex max_match=100 "(?&amp;lt;para2&amp;gt;\n[+-][ a-zA-Z0-9].*)" | rex "hostname\s*(?&amp;lt;host_name&amp;gt;\w*)" 
| eval count=mvcount(para1)|table _time host count para2 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Do anyone know how I could check against the configuration file one day ago ?&lt;BR /&gt;
Or I should say How I can find the last event one day ago? &lt;/P&gt;</description>
    <pubDate>Mon, 20 Feb 2012 03:20:10 GMT</pubDate>
    <dc:creator>keiichilam</dc:creator>
    <dc:date>2012-02-20T03:20:10Z</dc:date>
    <item>
      <title>Device Configuration checking</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Device-Configuration-checking/m-p/74404#M22504</link>
      <description>&lt;P&gt;HI I have a problem.&lt;/P&gt;

&lt;P&gt;I have a NAS that have a mail folder to store Devices' configuration file.&lt;BR /&gt;
Each device will have a separate directory to its configuration.&lt;BR /&gt;
A configuration commit in the device will automatically save a new copy in own folder and each day a copy will automatically generate at specific time, for example, 12:00am.&lt;/P&gt;

&lt;P&gt;I want to use splunk to figure out change of the configuration &lt;/P&gt;

&lt;P&gt;I could use diff and head to pull out last 5 configuration and diff on it.&lt;BR /&gt;
but boss want to add an additional comparison whcih compare to the last file one day ago.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="deviceconfig" host="switch1" latest_time=now | head 5 | diff position1=1 position2=2 
| append [ search sourcetype="deviceconfig" host="switch1" latest_time=now | head 5 | diff position1=2 position2=3 ] 
| append [ search sourcetype="deviceconfig" host="switch1" latest_time=now | head 5 | diff position1=3 position2=4 ] 
| append [ search sourcetype="deviceconfig" host="switch1" latest_time=now | head 5 | diff position1=4 position2=5 ] 
| rex  "@@\s*(?&amp;lt;para1&amp;gt; [+-]?\d*,\d*\s*[+-]?\d*,\d*)\s*@@" max_match=50 | rex max_match=100 "(?&amp;lt;para2&amp;gt;\n[+-][ a-zA-Z0-9].*)" | rex "hostname\s*(?&amp;lt;host_name&amp;gt;\w*)" 
| eval count=mvcount(para1)|table _time host count para2 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Do anyone know how I could check against the configuration file one day ago ?&lt;BR /&gt;
Or I should say How I can find the last event one day ago? &lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2012 03:20:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Device-Configuration-checking/m-p/74404#M22504</guid>
      <dc:creator>keiichilam</dc:creator>
      <dc:date>2012-02-20T03:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Device Configuration checking</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Device-Configuration-checking/m-p/74405#M22505</link>
      <description>&lt;P&gt;what about this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search&amp;gt; earliest=-1d@d latest=@d | head 1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Feb 2012 20:09:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Device-Configuration-checking/m-p/74405#M22505</guid>
      <dc:creator>MarioM</dc:creator>
      <dc:date>2012-02-20T20:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Device Configuration checking</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Device-Configuration-checking/m-p/74406#M22506</link>
      <description>&lt;P&gt;Thank you I will try this out.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2012 04:16:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Device-Configuration-checking/m-p/74406#M22506</guid>
      <dc:creator>keiichilam</dc:creator>
      <dc:date>2012-02-22T04:16:56Z</dc:date>
    </item>
  </channel>
</rss>

