<?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: Test if host sends the same logs in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Test-if-host-sends-the-same-logs/m-p/446488#M126671</link>
    <description>&lt;P&gt;Exploit the &lt;CODE&gt;punct&lt;/CODE&gt; value like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats values(punct) AS puncts dc(punct) AS punctCount WHERE (index=YouShouldAlwaysSpecifyAnIndex AND sourcetype=AndSourcetypeToo) BY host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The hosts with the most punct values are the ones with the later version.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Feb 2019 17:25:41 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-02-08T17:25:41Z</dc:date>
    <item>
      <title>Test if host sends the same logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Test-if-host-sends-the-same-logs/m-p/446483#M126666</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have several hosts sending logs to Splunk. These logs depends on the version of the software creating these logs.&lt;BR /&gt;
I am trying to determine if a query is compatible with host X or Y by looking at the available logs for each host.&lt;/P&gt;

&lt;P&gt;Here's a en example.&lt;/P&gt;

&lt;P&gt;Host 1 would send:&lt;BR /&gt;
- Start of initialisation&lt;BR /&gt;
- Initialisation of device=motor1&lt;BR /&gt;
- initialisation of device=sensor1&lt;BR /&gt;
- error during initialisation&lt;BR /&gt;
- End of initialisation&lt;/P&gt;

&lt;P&gt;Host 2 would send:&lt;BR /&gt;
- Start of initialisation&lt;BR /&gt;
- Initialisation of device=motor1&lt;BR /&gt;
- End of initialisation&lt;/P&gt;

&lt;P&gt;Here, host2 runs an older version of the software that doesn't logs initialisation of sensor1 and errors. &lt;/P&gt;

&lt;P&gt;I'm looking for a command that would output something like:&lt;BR /&gt;
Site     | motor1   | sensor1   | error&lt;BR /&gt;
host1  | available | available | available&lt;BR /&gt;
host2  | available | not_here | not_here&lt;/P&gt;

&lt;P&gt;How could I check if my host publish this or that log line?&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;BR /&gt;
Benoit&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:05:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Test-if-host-sends-the-same-logs/m-p/446483#M126666</guid>
      <dc:creator>bntdumas</dc:creator>
      <dc:date>2020-09-29T23:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Test if host sends the same logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Test-if-host-sends-the-same-logs/m-p/446484#M126667</link>
      <description>&lt;P&gt;Hi, @bntdumas &lt;/P&gt;

&lt;P&gt;How can I identify these logs?  Is "Start of initialisation" a sourcetype something like that?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 08:58:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Test-if-host-sends-the-same-logs/m-p/446484#M126667</guid>
      <dc:creator>eduardKiyko</dc:creator>
      <dc:date>2019-02-06T08:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Test if host sends the same logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Test-if-host-sends-the-same-logs/m-p/446485#M126668</link>
      <description>&lt;P&gt;It could be anything, but mostly keyword based on the text of the logs. &lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 09:51:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Test-if-host-sends-the-same-logs/m-p/446485#M126668</guid>
      <dc:creator>bntdumas</dc:creator>
      <dc:date>2019-02-06T09:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Test if host sends the same logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Test-if-host-sends-the-same-logs/m-p/446486#M126669</link>
      <description>&lt;P&gt;Hello @bntdumas&lt;BR /&gt;
I think the best way to use it, use of eventtypes. &lt;BR /&gt;
1. Saved the search with these events as different eventtype like &lt;CODE&gt;index=* (host=A OR host=B) "Initialisation of device=motor1"&lt;/CODE&gt; as &lt;CODE&gt;motor1&lt;/CODE&gt;&lt;BR /&gt;
2. Saved the search with these events as different eventtype like &lt;CODE&gt;index=* (host=A OR host=B) "initialisation of device=sensor1"&lt;/CODE&gt; as &lt;CODE&gt;sensor1&lt;/CODE&gt; like this &lt;/P&gt;

&lt;P&gt;and then you can run search like : &lt;CODE&gt;index=* (host=A or host=B) | chart count by host, eventtype&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 10:38:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Test-if-host-sends-the-same-logs/m-p/446486#M126669</guid>
      <dc:creator>vishaltaneja070</dc:creator>
      <dc:date>2019-02-06T10:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Test if host sends the same logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Test-if-host-sends-the-same-logs/m-p/446487#M126670</link>
      <description>&lt;P&gt;Interesting solution, in this case I would have to define an eventtype for each snippet of log that I'm interested into.&lt;BR /&gt;
Unfortunately it seems a little heavy, I was searching for a more general solution. Do you think it would be possible?&lt;/P&gt;

&lt;P&gt;It would be a bit like a searchmatch, except across all the events.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 12:42:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Test-if-host-sends-the-same-logs/m-p/446487#M126670</guid>
      <dc:creator>bntdumas</dc:creator>
      <dc:date>2019-02-06T12:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Test if host sends the same logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Test-if-host-sends-the-same-logs/m-p/446488#M126671</link>
      <description>&lt;P&gt;Exploit the &lt;CODE&gt;punct&lt;/CODE&gt; value like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats values(punct) AS puncts dc(punct) AS punctCount WHERE (index=YouShouldAlwaysSpecifyAnIndex AND sourcetype=AndSourcetypeToo) BY host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The hosts with the most punct values are the ones with the later version.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2019 17:25:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Test-if-host-sends-the-same-logs/m-p/446488#M126671</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-02-08T17:25:41Z</dc:date>
    </item>
  </channel>
</rss>

