<?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: Manipulating SNMP Data: how to correlate fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Manipulating-SNMP-Data-how-to-correlate-fields/m-p/298680#M90034</link>
    <description>&lt;P&gt;Hi &lt;EM&gt;somesoni2&lt;/EM&gt;, it worked perfectly!! Thank you very much!&lt;BR /&gt;
Our team is evaluating both event breaking methods to determinate wich on of them will give us simpler SPL searches.&lt;/P&gt;

&lt;P&gt;Thank you both &lt;EM&gt;somesoni2&lt;/EM&gt; and &lt;EM&gt;cpetterborg&lt;/EM&gt; for your answers! They helped a lot! &lt;/P&gt;</description>
    <pubDate>Thu, 30 Mar 2017 18:46:55 GMT</pubDate>
    <dc:creator>guimilare</dc:creator>
    <dc:date>2017-03-30T18:46:55Z</dc:date>
    <item>
      <title>Manipulating SNMP Data: how to correlate fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Manipulating-SNMP-Data-how-to-correlate-fields/m-p/298674#M90028</link>
      <description>&lt;P&gt;Hello Splunkers.&lt;/P&gt;

&lt;P&gt;I'm indexing some SNMP data from a server.&lt;BR /&gt;
Here is one event indexed:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;HOST-RESOURCES-MIB::hrStorageDescr."31" = "/" 
HOST-RESOURCES-MIB::hrStorageDescr."35" = "/tmp" 
HOST-RESOURCES-MIB::hrStorageDescr."36" = "/home" 
HOST-RESOURCES-MIB::hrStorageDescr."37" = "/usr" 
HOST-RESOURCES-MIB::hrStorageDescr."38" = "/usr/local" 
HOST-RESOURCES-MIB::hrStorageDescr."39" = "/var" 
HOST-RESOURCES-MIB::hrStorageDescr."40" = "/var/log" 
HOST-RESOURCES-MIB::hrStorageDescr."41" = "/opt" 
HOST-RESOURCES-MIB::hrStorageDescr."42" = "/opt/nds/data" 
HOST-RESOURCES-MIB::hrStorageDescr."43" = "/var/log/nds" 
HOST-RESOURCES-MIB::hrStorageDescr."44" = "/var/log/splunk" 
HOST-RESOURCES-MIB::hrStorageDescr."45" = "/boot"
HOST-RESOURCES-MIB::hrStorageSize."1" = "132061388" 
HOST-RESOURCES-MIB::hrStorageSize."3" = "168263816" 
HOST-RESOURCES-MIB::hrStorageSize."6" = "132061388" 
HOST-RESOURCES-MIB::hrStorageSize."7" = "94129872" 
HOST-RESOURCES-MIB::hrStorageSize."10" = "36202428" 
HOST-RESOURCES-MIB::hrStorageSize."31" = "1015393" 
HOST-RESOURCES-MIB::hrStorageSize."35" = "1015385" 
HOST-RESOURCES-MIB::hrStorageSize."36" = "1523090" 
HOST-RESOURCES-MIB::hrStorageSize."37" = "2030792" 
HOST-RESOURCES-MIB::hrStorageSize."38" = "1015385" 
HOST-RESOURCES-MIB::hrStorageSize."39" = "2030792" 
HOST-RESOURCES-MIB::hrStorageSize."40" = "2538497" 
HOST-RESOURCES-MIB::hrStorageSize."41" = "12696559" 
HOST-RESOURCES-MIB::hrStorageSize."42" = "5073149" 
HOST-RESOURCES-MIB::hrStorageSize."43" = "19045441" 
HOST-RESOURCES-MIB::hrStorageSize."44" = "7384608" 
HOST-RESOURCES-MIB::hrStorageSize."45" = "507684" 
HOST-RESOURCES-MIB::hrStorageUsed."1" = "102838612" 
HOST-RESOURCES-MIB::hrStorageUsed."3" = "102838612" 
HOST-RESOURCES-MIB::hrStorageUsed."6" = "4708464" 
HOST-RESOURCES-MIB::hrStorageUsed."7" = "94129872" 
HOST-RESOURCES-MIB::hrStorageUsed."10" = "0" 
HOST-RESOURCES-MIB::hrStorageUsed."31" = "188130" 
HOST-RESOURCES-MIB::hrStorageUsed."35" = "55800" 
HOST-RESOURCES-MIB::hrStorageUsed."36" = "1302834" 
HOST-RESOURCES-MIB::hrStorageUsed."37" = "868359" 
HOST-RESOURCES-MIB::hrStorageUsed."38" = "165013" 
HOST-RESOURCES-MIB::hrStorageUsed."39" = "1473096" 
HOST-RESOURCES-MIB::hrStorageUsed."40" = "1659690" 
HOST-RESOURCES-MIB::hrStorageUsed."41" = "9159791" 
HOST-RESOURCES-MIB::hrStorageUsed."42" = "779795" 
HOST-RESOURCES-MIB::hrStorageUsed."43" = "8276891" 
HOST-RESOURCES-MIB::hrStorageUsed."44" = "86509" 
HOST-RESOURCES-MIB::hrStorageUsed."45" = "13485"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I want to do is something like the table below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Partition       Avail.    Used      Used%
/               1015393   188130    18,52
/tmp            1015385   55800     5,49
/home           1523090   1302834   85,53
/usr            2030792   868359    42,75
/usr/local      1015385   165013    16,25
/var            2030792   1473096   72,53
/var/log        2538497   1659690   65,38
/opt            12696559  9159791   72,14
/opt/ser/data   5073149   779795    15,37
/var/log/ser    19045441  8276891   43,45
/var/log/splunk 7384608   86509     1,17
/boot           507684    13485     2,65
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'd like to use the &lt;CODE&gt;"id"&lt;/CODE&gt; in each line to correlate to the same &lt;CODE&gt;"id"&lt;/CODE&gt; in other line.&lt;BR /&gt;
How can I do this? &lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 17:15:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Manipulating-SNMP-Data-how-to-correlate-fields/m-p/298674#M90028</guid>
      <dc:creator>guimilare</dc:creator>
      <dc:date>2017-03-30T17:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating SNMP Data: how to correlate fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Manipulating-SNMP-Data-how-to-correlate-fields/m-p/298675#M90029</link>
      <description>&lt;P&gt;That is one single event right?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 17:24:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Manipulating-SNMP-Data-how-to-correlate-fields/m-p/298675#M90029</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-03-30T17:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating SNMP Data: how to correlate fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Manipulating-SNMP-Data-how-to-correlate-fields/m-p/298676#M90030</link>
      <description>&lt;P&gt;That's correct&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 17:32:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Manipulating-SNMP-Data-how-to-correlate-fields/m-p/298676#M90030</guid>
      <dc:creator>guimilare</dc:creator>
      <dc:date>2017-03-30T17:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating SNMP Data: how to correlate fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Manipulating-SNMP-Data-how-to-correlate-fields/m-p/298677#M90031</link>
      <description>&lt;P&gt;It would be much easier if it were a separate event for each line. Then you could use eval to get the number, tie the event together by the number, extract the fields, then combine through a table and eval the %Used.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 17:35:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Manipulating-SNMP-Data-how-to-correlate-fields/m-p/298677#M90031</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2017-03-30T17:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating SNMP Data: how to correlate fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Manipulating-SNMP-Data-how-to-correlate-fields/m-p/298678#M90032</link>
      <description>&lt;P&gt;Agree. If you've control, can you change the line breaking of events to treat each line as separate events? If not, we need to do the same via search time operation, like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search  
| rex max_match=0 "HOST-RESOURCES-MIB::hrStorage(?&amp;lt;temp&amp;gt;\w+\.\"\d+\" \= \"[^\"]+\")" 
| table temp | mvexpand temp
| rex field=temp "(?&amp;lt;Metrics&amp;gt;\w+)\.\"(?&amp;lt;ID&amp;gt;\d+)\" \= \"(?&amp;lt;Val&amp;gt;[^\"]+)\""
| chart values(Val) over ID by Metrics 
| rename Descr as Partition Size as Avail 
| table Partition Avail Used | eval "Used%"=round(Used*100/Avail,2)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Mar 2017 18:00:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Manipulating-SNMP-Data-how-to-correlate-fields/m-p/298678#M90032</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-03-30T18:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating SNMP Data: how to correlate fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Manipulating-SNMP-Data-how-to-correlate-fields/m-p/298679#M90033</link>
      <description>&lt;P&gt;&lt;EM&gt;somesoni2&lt;/EM&gt; - That is great that you had that so quickly! Definitely do this as an &lt;STRONG&gt;answer&lt;/STRONG&gt;, then if &lt;EM&gt;guimilare&lt;/EM&gt; can't separate the event in to individual lines, he can accept that as the answer. I think this has some great potential for plenty of other people and having ti flagged as answered and accepted will help. You really have some great answers here and I think that sometimes your answers just get hidden down in the comments. Heaven knows you don't need the karma, but it would help know that a good and accepted answer is here. Thanks!!!  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 18:28:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Manipulating-SNMP-Data-how-to-correlate-fields/m-p/298679#M90033</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2017-03-30T18:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating SNMP Data: how to correlate fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Manipulating-SNMP-Data-how-to-correlate-fields/m-p/298680#M90034</link>
      <description>&lt;P&gt;Hi &lt;EM&gt;somesoni2&lt;/EM&gt;, it worked perfectly!! Thank you very much!&lt;BR /&gt;
Our team is evaluating both event breaking methods to determinate wich on of them will give us simpler SPL searches.&lt;/P&gt;

&lt;P&gt;Thank you both &lt;EM&gt;somesoni2&lt;/EM&gt; and &lt;EM&gt;cpetterborg&lt;/EM&gt; for your answers! They helped a lot! &lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 18:46:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Manipulating-SNMP-Data-how-to-correlate-fields/m-p/298680#M90034</guid>
      <dc:creator>guimilare</dc:creator>
      <dc:date>2017-03-30T18:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating SNMP Data: how to correlate fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Manipulating-SNMP-Data-how-to-correlate-fields/m-p/298681#M90035</link>
      <description>&lt;P&gt;I have to agree.  Sometimes I just change somesoni2's comments to answers myself... because often they are.  &lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 18:55:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Manipulating-SNMP-Data-how-to-correlate-fields/m-p/298681#M90035</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-03-30T18:55:57Z</dc:date>
    </item>
  </channel>
</rss>

