<?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 How do I find unique errors from cronjobs sent to syslog? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-find-unique-errors-from-cronjobs-sent-to-syslog/m-p/458267#M79213</link>
    <description>&lt;P&gt;I am trying to find all unique messages sent to syslog from specific machines&lt;BR /&gt;
Splunk 6.6.8&lt;/P&gt;

&lt;P&gt;Using the following bash command, I get what I want:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;grep -v  "sendmail\|nrpe\|freshclam" /var/log/messages | cut -c27- |sort| uniq -c
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The following Splunk search comes close, but cuts out some results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="srvr1" OR host="srvr2"  NOT ( sendmail OR nrpe OR freshclam )  | dedup process
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As an example, I only get one of these lines instead of all three:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;### init: Id "x" respawning too fast: disabled for 5 minutes
### init: Id "y" respawning too fast: disabled for 5 minutes
### init: Id "z" respawning too fast: disabled for 5 minutes
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk will only return one of those lines. If I do a general search for the other two errors, they are there in Splunk so they are captured. I tried a &lt;CODE&gt;dedup&lt;/CODE&gt; on other fields, but so far "process" seems to be the best fit.&lt;/P&gt;

&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
    <pubDate>Fri, 14 Sep 2018 21:39:09 GMT</pubDate>
    <dc:creator>cwheeler33</dc:creator>
    <dc:date>2018-09-14T21:39:09Z</dc:date>
    <item>
      <title>How do I find unique errors from cronjobs sent to syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-find-unique-errors-from-cronjobs-sent-to-syslog/m-p/458267#M79213</link>
      <description>&lt;P&gt;I am trying to find all unique messages sent to syslog from specific machines&lt;BR /&gt;
Splunk 6.6.8&lt;/P&gt;

&lt;P&gt;Using the following bash command, I get what I want:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;grep -v  "sendmail\|nrpe\|freshclam" /var/log/messages | cut -c27- |sort| uniq -c
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The following Splunk search comes close, but cuts out some results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="srvr1" OR host="srvr2"  NOT ( sendmail OR nrpe OR freshclam )  | dedup process
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As an example, I only get one of these lines instead of all three:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;### init: Id "x" respawning too fast: disabled for 5 minutes
### init: Id "y" respawning too fast: disabled for 5 minutes
### init: Id "z" respawning too fast: disabled for 5 minutes
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk will only return one of those lines. If I do a general search for the other two errors, they are there in Splunk so they are captured. I tried a &lt;CODE&gt;dedup&lt;/CODE&gt; on other fields, but so far "process" seems to be the best fit.&lt;/P&gt;

&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 21:39:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-find-unique-errors-from-cronjobs-sent-to-syslog/m-p/458267#M79213</guid>
      <dc:creator>cwheeler33</dc:creator>
      <dc:date>2018-09-14T21:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I find unique errors from cronjobs sent to syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-find-unique-errors-from-cronjobs-sent-to-syslog/m-p/458268#M79214</link>
      <description>&lt;P&gt;@cwheeler33,&lt;/P&gt;

&lt;P&gt;Try using &lt;CODE&gt;substr&lt;/CODE&gt; and then dedup them&lt;/P&gt;

&lt;P&gt;For e.g.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="srvr1" OR host="srvr2"  NOT ( sendmail OR nrpe OR freshclam )  | eval message=substr(_raw,0,50)|table _raw,message|dedup message
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You could change the &lt;CODE&gt;_raw&lt;/CODE&gt; to the filed where you are getting the log messages if any and also change the character length to get sufficient text to decide the duplicates.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Sep 2018 03:30:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-find-unique-errors-from-cronjobs-sent-to-syslog/m-p/458268#M79214</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-09-15T03:30:19Z</dc:date>
    </item>
  </channel>
</rss>

