<?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 delta report for multiple hosts in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/delta-report-for-multiple-hosts/m-p/15463#M1726</link>
    <description>&lt;P&gt;I have the following log messages coming from syslog-ng&lt;/P&gt;

&lt;P&gt;Jun 14 10:32:04 sc4-cron.mcafeesecure.com syslog-ng[2775]: Log statistics; dropped='tcp(AF_INET(10.98.202.126:514))=1613614', processed='center(queued)=175194', processed='center(received)=109152', processed='destination(d_resin)=51369', processed='destination(d_boot)=0', processed='destination(d_auth)=439', processed='destination(d_cron)=362', processed='destination(d_mlal)=0', processed='destination(loghost)=109152', processed='destination(d_mesg)=93', processed='destination(d_cons)=0', processed='destination(d_snmp)=6782', processed='destination(d_spol)=0', processed='destination(d_mail)=6997', processed='source(s_sys)=66165', processed='source(s_tail)=42187', processed='source(s_raccess)=800', processed='source(s_tail_2)=0'&lt;/P&gt;

&lt;P&gt;Jun 14 10:22:04 sc4-cron.mcafeesecure.com syslog-ng[2775]: Log statistics; dropped='tcp(AF_INET(10.98.202.126:514))=1613614', processed='center(queued)=173017', processed='center(received)=107903', processed='destination(d_resin)=50855', processed='destination(d_boot)=0', processed='destination(d_auth)=430', processed='destination(d_cron)=359', processed='destination(d_mlal)=0', processed='destination(loghost)=107903', processed='destination(d_mesg)=92', processed='destination(d_cons)=0', processed='destination(d_snmp)=6610', processed='destination(d_spol)=0', processed='destination(d_mail)=6768', processed='source(s_sys)=65231', processed='source(s_tail)=41872', processed='source(s_raccess)=800', processed='source(s_tail_2)=0'&lt;/P&gt;

&lt;P&gt;Jun 14 10:12:04 sc4-cron.mcafeesecure.com syslog-ng[2775]: Log statistics; dropped='tcp(AF_INET(10.98.202.126:514))=1613614', processed='center(queued)=171101', processed='center(received)=106828', processed='destination(d_resin)=50405', processed='destination(d_boot)=0', processed='destination(d_auth)=416', processed='destination(d_cron)=338', processed='destination(d_mlal)=0', processed='destination(loghost)=106828', processed='destination(d_mesg)=87', processed='destination(d_cons)=0', processed='destination(d_snmp)=6428', processed='destination(d_spol)=0', processed='destination(d_mail)=6599', processed='source(s_sys)=64382', processed='source(s_tail)=41646', processed='source(s_raccess)=800', processed='source(s_tail_2)=0'&lt;/P&gt;

&lt;P&gt;I am using the following query to generate a diff of the field in this message I want (in this case the dropped field)&lt;/P&gt;

&lt;P&gt;syslog-ng "Log statistics" host="sc4-cron*" | rex "(?i)^(?:[^=]&lt;EM&gt;=){2}(?P[^']&lt;/EM&gt;)(?=')" | search DROPPED="&lt;EM&gt;" | delta DROPPED as DROPPEDDIFF | search DROPPEDDIFF="&lt;/EM&gt;"&lt;/P&gt;

&lt;P&gt;this works fine  on a single host, however, I would like to run this across all of my hosts. The problem I then encounter, is that the previous log message is not from the same host as the latest message, therefore the diffs that are created are not accurate.&lt;/P&gt;

&lt;P&gt;I have hundreds of hosts, and would like to build a report on this data, however, I can't really go and do them all individually. In addition getting all of this into one report would be ideal.&lt;/P&gt;</description>
    <pubDate>Tue, 15 Jun 2010 00:58:09 GMT</pubDate>
    <dc:creator>mcafeesecure</dc:creator>
    <dc:date>2010-06-15T00:58:09Z</dc:date>
    <item>
      <title>delta report for multiple hosts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/delta-report-for-multiple-hosts/m-p/15463#M1726</link>
      <description>&lt;P&gt;I have the following log messages coming from syslog-ng&lt;/P&gt;

&lt;P&gt;Jun 14 10:32:04 sc4-cron.mcafeesecure.com syslog-ng[2775]: Log statistics; dropped='tcp(AF_INET(10.98.202.126:514))=1613614', processed='center(queued)=175194', processed='center(received)=109152', processed='destination(d_resin)=51369', processed='destination(d_boot)=0', processed='destination(d_auth)=439', processed='destination(d_cron)=362', processed='destination(d_mlal)=0', processed='destination(loghost)=109152', processed='destination(d_mesg)=93', processed='destination(d_cons)=0', processed='destination(d_snmp)=6782', processed='destination(d_spol)=0', processed='destination(d_mail)=6997', processed='source(s_sys)=66165', processed='source(s_tail)=42187', processed='source(s_raccess)=800', processed='source(s_tail_2)=0'&lt;/P&gt;

&lt;P&gt;Jun 14 10:22:04 sc4-cron.mcafeesecure.com syslog-ng[2775]: Log statistics; dropped='tcp(AF_INET(10.98.202.126:514))=1613614', processed='center(queued)=173017', processed='center(received)=107903', processed='destination(d_resin)=50855', processed='destination(d_boot)=0', processed='destination(d_auth)=430', processed='destination(d_cron)=359', processed='destination(d_mlal)=0', processed='destination(loghost)=107903', processed='destination(d_mesg)=92', processed='destination(d_cons)=0', processed='destination(d_snmp)=6610', processed='destination(d_spol)=0', processed='destination(d_mail)=6768', processed='source(s_sys)=65231', processed='source(s_tail)=41872', processed='source(s_raccess)=800', processed='source(s_tail_2)=0'&lt;/P&gt;

&lt;P&gt;Jun 14 10:12:04 sc4-cron.mcafeesecure.com syslog-ng[2775]: Log statistics; dropped='tcp(AF_INET(10.98.202.126:514))=1613614', processed='center(queued)=171101', processed='center(received)=106828', processed='destination(d_resin)=50405', processed='destination(d_boot)=0', processed='destination(d_auth)=416', processed='destination(d_cron)=338', processed='destination(d_mlal)=0', processed='destination(loghost)=106828', processed='destination(d_mesg)=87', processed='destination(d_cons)=0', processed='destination(d_snmp)=6428', processed='destination(d_spol)=0', processed='destination(d_mail)=6599', processed='source(s_sys)=64382', processed='source(s_tail)=41646', processed='source(s_raccess)=800', processed='source(s_tail_2)=0'&lt;/P&gt;

&lt;P&gt;I am using the following query to generate a diff of the field in this message I want (in this case the dropped field)&lt;/P&gt;

&lt;P&gt;syslog-ng "Log statistics" host="sc4-cron*" | rex "(?i)^(?:[^=]&lt;EM&gt;=){2}(?P[^']&lt;/EM&gt;)(?=')" | search DROPPED="&lt;EM&gt;" | delta DROPPED as DROPPEDDIFF | search DROPPEDDIFF="&lt;/EM&gt;"&lt;/P&gt;

&lt;P&gt;this works fine  on a single host, however, I would like to run this across all of my hosts. The problem I then encounter, is that the previous log message is not from the same host as the latest message, therefore the diffs that are created are not accurate.&lt;/P&gt;

&lt;P&gt;I have hundreds of hosts, and would like to build a report on this data, however, I can't really go and do them all individually. In addition getting all of this into one report would be ideal.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2010 00:58:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/delta-report-for-multiple-hosts/m-p/15463#M1726</guid>
      <dc:creator>mcafeesecure</dc:creator>
      <dc:date>2010-06-15T00:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: delta report for multiple hosts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/delta-report-for-multiple-hosts/m-p/15464#M1727</link>
      <description>&lt;P&gt;You can use the &lt;CODE&gt;streamstats&lt;/CODE&gt; command, something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | streamstats current=f global=f window=1 first(DROPPED) as NEXT_DROPPED by host | eval DROPPEDDIFF = NEXT_DROPPED-DROPPED
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Something like that. You may have to reverse the subtraction, I'm not sure which way around it goes, and well, it might be off-by-one, i.e. the diff might be on the &lt;EM&gt;previous&lt;/EM&gt; vs the &lt;EM&gt;current&lt;/EM&gt; result, but you get the idea.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2010 01:39:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/delta-report-for-multiple-hosts/m-p/15464#M1727</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-06-15T01:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: delta report for multiple hosts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/delta-report-for-multiple-hosts/m-p/15465#M1728</link>
      <description>&lt;P&gt;Thanks.&lt;BR /&gt;
For the record, the final query looks like this:&lt;/P&gt;

&lt;P&gt;syslog-ng "Log statistics" host!="qa2-cron*" | rex "(?i)^(?:[^=]&lt;EM&gt;=){2}(?P&lt;DROPPED&gt;[^']&lt;/DROPPED&gt;&lt;/EM&gt;)(?=')" | search DROPPED="*" | streamstats current=f global=f window=1 first(DROPPED) as NEXT_DROPPED by host | eval DROPPEDDIFF = NEXT_DROPPED-DROPPED | search DROPPEDDIFF&amp;gt;0&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:13:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/delta-report-for-multiple-hosts/m-p/15465#M1728</guid>
      <dc:creator>mcafeesecure</dc:creator>
      <dc:date>2020-09-28T09:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: delta report for multiple hosts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/delta-report-for-multiple-hosts/m-p/15466#M1729</link>
      <description>&lt;P&gt;Thank you, you helped me solve my problem.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Apr 2016 19:50:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/delta-report-for-multiple-hosts/m-p/15466#M1729</guid>
      <dc:creator>morian</dc:creator>
      <dc:date>2016-04-16T19:50:18Z</dc:date>
    </item>
  </channel>
</rss>

