<?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 get trend on a field from the logs in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-trend-on-a-field-from-the-logs/m-p/106592#M27734</link>
    <description>&lt;P&gt;HI Nick,&lt;BR /&gt;
thanks for a quick response; intent of this script is to check the line count of these logs and if there is a deviation of 20% in the line count from now to last value, it creates a new log of last 200 lines from that moment and splunk picks it up. &lt;BR /&gt;
as i mentioned that i am still new to this whole setup and dont want to consume splunk licenses unnecessarily with logs that are of value only when there is an issue.&lt;/P&gt;

&lt;P&gt;Coming back to ur response, i did try that and it doesnt suffice the needs... here's what i was looking:&lt;/P&gt;

&lt;P&gt;log1: 5 6 7 8 1 23 100&lt;BR /&gt;
log2: 5 3 7 8 5 3 45&lt;BR /&gt;
log2: 3 1 7 324 12 23&lt;/P&gt;</description>
    <pubDate>Sat, 18 Dec 2010 06:21:40 GMT</pubDate>
    <dc:creator>ashishv</dc:creator>
    <dc:date>2010-12-18T06:21:40Z</dc:date>
    <item>
      <title>how to get trend on a field from the logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-trend-on-a-field-from-the-logs/m-p/106590#M27732</link>
      <description>&lt;P&gt;Hello
i am new to splunk, i have this script that runs every minute and appends a log, it looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;11:05:01@12-17-10       LogName=IntroscopeEnterpriseManager.log PreviousCount=828557  CurrentCount=828559 LineCount=2
11:05:01@12-17-10       LogName=perflog.txt PreviousCount=28919  CurrentCount=28923 LineCount=4
11:06:01@12-17-10       LogName=tessperflog.txt PreviousCount=29174  CurrentCount=29178 LineCount=4
11:06:01@12-17-10       LogName=IntroscopeEnterpriseManager.log PreviousCount=828559  CurrentCount=828598 LineCount=39
11:06:02@12-17-10       LogName=perflog.txt PreviousCount=28923  CurrentCount=28927 LineCount=4
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;what i want is a create a TREND report on value of LineCount for each Log, there are  3 logs and i want to trend the LineCount by each log\&lt;/P&gt;

&lt;P&gt;\thanks
Ashish&lt;/P&gt;</description>
      <pubDate>Sat, 18 Dec 2010 05:56:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-trend-on-a-field-from-the-logs/m-p/106590#M27732</guid>
      <dc:creator>ashishv</dc:creator>
      <dc:date>2010-12-18T05:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to get trend on a field from the logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-trend-on-a-field-from-the-logs/m-p/106591#M27733</link>
      <description>&lt;P&gt;Given what you've said I think you might try this simple search: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sourcetype="&amp;lt;your sourcetype here&amp;gt;" | stats sum(LineCount) by LogName&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;or if you want to see the counts over time by each log: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sourcetype="&amp;lt;your sourcetype here&amp;gt;" | timechart sum(LineCount) by LogName&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;What also strikes me is that early on, new users often think they have to write scripts.  Sometimes they write a script that parses logfiles and later discover that it's vastly easier to just index the entire log in splunk, get slightly fancier with the splunk search language and throw away their script....&lt;/P&gt;

&lt;P&gt;but that's only a suggestion. There can obviously be quite good reasons to go in the direction of custom scripting.   &lt;/P&gt;</description>
      <pubDate>Sat, 18 Dec 2010 06:01:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-trend-on-a-field-from-the-logs/m-p/106591#M27733</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2010-12-18T06:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to get trend on a field from the logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-trend-on-a-field-from-the-logs/m-p/106592#M27734</link>
      <description>&lt;P&gt;HI Nick,&lt;BR /&gt;
thanks for a quick response; intent of this script is to check the line count of these logs and if there is a deviation of 20% in the line count from now to last value, it creates a new log of last 200 lines from that moment and splunk picks it up. &lt;BR /&gt;
as i mentioned that i am still new to this whole setup and dont want to consume splunk licenses unnecessarily with logs that are of value only when there is an issue.&lt;/P&gt;

&lt;P&gt;Coming back to ur response, i did try that and it doesnt suffice the needs... here's what i was looking:&lt;/P&gt;

&lt;P&gt;log1: 5 6 7 8 1 23 100&lt;BR /&gt;
log2: 5 3 7 8 5 3 45&lt;BR /&gt;
log2: 3 1 7 324 12 23&lt;/P&gt;</description>
      <pubDate>Sat, 18 Dec 2010 06:21:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-trend-on-a-field-from-the-logs/m-p/106592#M27734</guid>
      <dc:creator>ashishv</dc:creator>
      <dc:date>2010-12-18T06:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to get trend on a field from the logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-trend-on-a-field-from-the-logs/m-p/106593#M27735</link>
      <description>&lt;P&gt;OK. I understand what your script is doing.  But I dont think I understand what you want the splunk search to do. Can you update your question with more detail?&lt;/P&gt;</description>
      <pubDate>Sat, 18 Dec 2010 06:36:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-trend-on-a-field-from-the-logs/m-p/106593#M27735</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2010-12-18T06:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to get trend on a field from the logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-trend-on-a-field-from-the-logs/m-p/106594#M27736</link>
      <description>&lt;P&gt;what i want Splunk to do is draw a trend chart of LineCount by Each LogName, almost similar to how UNIX app does chart for CPU for different Hosts.&lt;BR /&gt;
so instead of a CPU i want to plot fiedl LineCount... not sure if this help?&lt;/P&gt;

&lt;P&gt;thanks&lt;BR /&gt;
ashish&lt;/P&gt;</description>
      <pubDate>Sat, 18 Dec 2010 06:42:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-trend-on-a-field-from-the-logs/m-p/106594#M27736</guid>
      <dc:creator>ashishv</dc:creator>
      <dc:date>2010-12-18T06:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to get trend on a field from the logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-trend-on-a-field-from-the-logs/m-p/106595#M27737</link>
      <description>&lt;P&gt;Did you ever get a reply on this?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2013 10:32:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-trend-on-a-field-from-the-logs/m-p/106595#M27737</guid>
      <dc:creator>chenlevi21</dc:creator>
      <dc:date>2013-11-27T10:32:09Z</dc:date>
    </item>
  </channel>
</rss>

