<?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: SPlunk SNMP TRAP to get IP address in Search Query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/SPlunk-SNMP-TRAP-to-get-IP-address-in-Search-Query/m-p/308870#M175032</link>
    <description>&lt;P&gt;Just use &lt;CODE&gt;dnslookup&lt;/CODE&gt; as described here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/105246/dns-resolution-in-a-search.html"&gt;https://answers.splunk.com/answers/105246/dns-resolution-in-a-search.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Apr 2017 13:43:07 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2017-04-03T13:43:07Z</dc:date>
    <item>
      <title>SPlunk SNMP TRAP to get IP address in Search Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPlunk-SNMP-TRAP-to-get-IP-address-in-Search-Query/m-p/308869#M175031</link>
      <description>&lt;P&gt;We have modified spectrum alerts for unix and it’s been sent to snmptrap and its working.  We don’t have ip address for windows machine in splunk. We have to figure out a way to get ip address in to splunk for those windows machines either by batch scripts or to try using wmi.conf.&lt;/P&gt;

&lt;P&gt;Can you please help for the same, HOw we can get IP address in WIndows server.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Sahil&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 12:51:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPlunk-SNMP-TRAP-to-get-IP-address-in-Search-Query/m-p/308869#M175031</guid>
      <dc:creator>sahils</dc:creator>
      <dc:date>2017-04-03T12:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: SPlunk SNMP TRAP to get IP address in Search Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPlunk-SNMP-TRAP-to-get-IP-address-in-Search-Query/m-p/308870#M175032</link>
      <description>&lt;P&gt;Just use &lt;CODE&gt;dnslookup&lt;/CODE&gt; as described here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/105246/dns-resolution-in-a-search.html"&gt;https://answers.splunk.com/answers/105246/dns-resolution-in-a-search.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 13:43:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPlunk-SNMP-TRAP-to-get-IP-address-in-Search-Query/m-p/308870#M175032</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-04-03T13:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: SPlunk SNMP TRAP to get IP address in Search Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPlunk-SNMP-TRAP-to-get-IP-address-in-Search-Query/m-p/308871#M175033</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;Below are the query and if we add dns its not working&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=perfmon sourcetype="Perfmon:Memory" source="Perfmon:Memory" counter="% Committed Bytes In Use"
|dedup host|eval unique_id=md5(_raw)
|search [inputlookup win_memalert.csv|fields host]
|eventstats avg(Value) as used_percent by host
|append [inputlookup win_memalert.csv]
|eval threshold=case(used_percent&amp;lt;70, "Stable", used_percent&amp;gt;=70 AND used_percent&amp;lt;85,"Warning", used_percent&amp;gt;=85, "Critical")
|stats first(used_percent) as used_percent, last(used_percent) as last_used_percent, first(threshold) as threshold, last(threshold) as last_threshold, last(unique_id) as unique_id, first(_time) as _time by host
|eval state=case(used_percent&amp;lt;70 AND threshold=last_threshold, "still_stable", used_percent&amp;lt;70, "stable", used_percent&amp;gt;=70 AND used_percent&amp;lt;85 AND threshold=last_threshold, "existing", used_percent &amp;gt;= 85 AND threshold=last_threshold, "existing", used_percent&amp;gt;=85 AND  threshold!=last_threshold, "shift_critical", used_percent&amp;lt;85 AND used_percent&amp;gt;=70 AND threshold!=last_threshold, "shift_warning")
|search state!="still_stable" 
|eval action=case(state="new", "post", state="existing", "nothing", state="stable", "clear", state="shift_warning", "recede", state="shift_critical", "escalate")
|table _time, host, used_percent, last_used_percent, threshold, last_threshold, unique_id, state, action
|append [search index=perfmon sourcetype="Perfmon:Memory" source="Perfmon:Memory" counter="% Committed Bytes In Use" | dedup host |search NOT 
[
|inputlookup win_memalert.csv|fields host
]
|eval unique_id=md5(_raw)
|eventstats avg(Value) as used_percent by host
|where used_percent&amp;gt;70
|eval threshold=case(used_percent&amp;lt;70, "Stable", used_percent&amp;gt;=70 AND used_percent&amp;lt;85,"Warning", used_percent&amp;gt;=85, "Critical")
|fillnull state value="new"|eval action=case(state="new", "post")
|eval title="win_Memory_Exceeds_Percent_by_Host"
|table _time, host, used_percent, last_used_percent, threshold, last_threshold, unique_id, state, action]
|outputlookup win_memalert.csv | search action!="nothing"
|eval alert_type="Windows Memory Alert" | eval 1=alert_type, 2=host, 3=used_percent, 4=threshold, 5=action, 6=unique_id
|fields 1 2 3 4 5 6
|createsnmptrap |
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Sahil&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 14:27:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPlunk-SNMP-TRAP-to-get-IP-address-in-Search-Query/m-p/308871#M175033</guid>
      <dc:creator>sahils</dc:creator>
      <dc:date>2017-04-03T14:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: SPlunk SNMP TRAP to get IP address in Search Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPlunk-SNMP-TRAP-to-get-IP-address-in-Search-Query/m-p/308872#M175034</link>
      <description>&lt;P&gt;Add 3 lines before you last 4 so that your last 7 lines look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| lookup dnslook clientip AS host OUTPUT clienthost
| eval host=coalesce(clienthost, host)
| fields - clienthost
| outputlookup win_memalert.csv | search action!="nothing"
| eval alert_type="Windows Memory Alert" | eval 1=alert_type, 2=host, 3=used_percent, 4=threshold, 5=action, 6=unique_id
| fields 1 2 3 4 5 6
| createsnmptrap
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Apr 2017 23:23:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPlunk-SNMP-TRAP-to-get-IP-address-in-Search-Query/m-p/308872#M175034</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-04-03T23:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: SPlunk SNMP TRAP to get IP address in Search Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPlunk-SNMP-TRAP-to-get-IP-address-in-Search-Query/m-p/308873#M175035</link>
      <description>&lt;P&gt;We run Query and add 3 lines also add number 7 IP address in fields but not geeting IP data&lt;/P&gt;

&lt;P&gt;index=perfmon sourcetype="Perfmon:LogicalDisk" source="Perfmon:LogicalDisk" counter="% Free Space" |dedup host |eval unique_id=md5(_raw) |search [inputlookup win_disk.csv|fields host]&lt;BR /&gt;
|eventstats avg(Value) as disk_free_space by host&lt;BR /&gt;
|eval used_percent= (100-disk_free_space)&lt;BR /&gt;
|append [inputlookup win_disk.csv]&lt;BR /&gt;
|eval threshold=case(used_percent&amp;lt;95, "Stable", used_percent&amp;gt;=95 AND used_percent&amp;lt;98,"Warning", used_percent&amp;gt;=98, "Critical")&lt;BR /&gt;
|stats first(used_percent) as used_percent, last(used_percent) as last_used_percent, first(threshold) as threshold, last(threshold) as last_threshold, last(unique_id) as unique_id, first(_time) as _time by host&lt;BR /&gt;
|eval state=case(used_percent&amp;lt;95, "stable", used_percent&amp;lt;95 AND threshold=last_threshold, "still_stable" , used_percent&amp;gt;=95 AND used_percent&amp;lt;98 AND threshold=last_threshold, "existing", used_percent&amp;gt;=98 AND  threshold=last_threshold, "existing", used_percent&amp;gt;=98 AND  threshold!=last_threshold, "shift_critical", used_percent&amp;lt;98 AND used_percent&amp;gt;=95 AND threshold!=last_threshold, "shift_warning")&lt;BR /&gt;
|search state!="still_stable" &lt;BR /&gt;
|eval action=case(state="new", "post", state="existing", "nothing", state="stable", "clear", state="shift_warning", "recede", state="shift_critical", "escalate")&lt;BR /&gt;
|table host, used_percent, last_used_percent, threshold, last_threshold, unique_id, _time, state, action&lt;BR /&gt;
| append [search index=perfmon sourcetype="Perfmon:LogicalDisk" source="Perfmon:LogicalDisk" counter="% Free Space" |dedup host | search NOT&lt;BR /&gt;
[&lt;BR /&gt;
|inputlookup win_disk.csv|fields host&lt;BR /&gt;
] &lt;BR /&gt;
|eval unique_id=md5(_raw)&lt;BR /&gt;
|eventstats avg(Value) as disk_free_space by host&lt;BR /&gt;
|eval used_percent= (100-disk_free_space)&lt;BR /&gt;
| where used_percent&amp;gt;=95&lt;BR /&gt;
| eval threshold=case(used_percent&amp;lt;95,"Stable",used_percent&amp;gt;=95 AND used_percent&amp;lt;98,"Warning", used_percent&amp;gt;=98,"Critical")&lt;BR /&gt;
|fillnull state value="new"|eval action=case(state="new", "post")&lt;BR /&gt;
| eval title="win_disk_Used_Exceeds_Perc_by_Host"&lt;BR /&gt;
|table host, used_percent, last_used_percent, threshold, last_threshold, unique_id, _time, state, action]&lt;BR /&gt;
|outputlookup win_disk.csv&lt;BR /&gt;
|eval alert_type="Windows Disk Alert" | eval 1=alert_type, 2=host, 3=used_percent, 4=threshold, 5=action, 6=unique_id, 7=ip&lt;BR /&gt;
|fields 1 2 3 4 5 6 7&lt;BR /&gt;
|createsnmptrap&lt;/P&gt;

&lt;P&gt;100 Per Page Format  Preview&lt;BR /&gt;
1   2   3   4   5   6   7   _time&lt;BR /&gt;
Windows Disk Alert  uslv-dapp-bsm02 95.705941   Warning nothing 832eb3f3cfdeec78fcd72e0131e740fb        2017-04-04 04:01:20&lt;/P&gt;

&lt;P&gt;Please suggest&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Sahil&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:31:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPlunk-SNMP-TRAP-to-get-IP-address-in-Search-Query/m-p/308873#M175035</guid>
      <dc:creator>sahils</dc:creator>
      <dc:date>2020-09-29T13:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: SPlunk SNMP TRAP to get IP address in Search Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPlunk-SNMP-TRAP-to-get-IP-address-in-Search-Query/m-p/308874#M175036</link>
      <description>&lt;P&gt;Please update and help for the same .&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Sahil&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 12:01:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPlunk-SNMP-TRAP-to-get-IP-address-in-Search-Query/m-p/308874#M175036</guid>
      <dc:creator>sahils</dc:creator>
      <dc:date>2017-04-10T12:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: SPlunk SNMP TRAP to get IP address in Search Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPlunk-SNMP-TRAP-to-get-IP-address-in-Search-Query/m-p/308875#M175037</link>
      <description>&lt;P&gt;Please help us for the same.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Sahil&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2017 14:42:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPlunk-SNMP-TRAP-to-get-IP-address-in-Search-Query/m-p/308875#M175037</guid>
      <dc:creator>sahils</dc:creator>
      <dc:date>2017-05-01T14:42:58Z</dc:date>
    </item>
  </channel>
</rss>

