<?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: Monitor specific set of Processes from WMI in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Monitor-specific-set-of-Processes-from-WMI/m-p/88981#M22788</link>
    <description>&lt;P&gt;Thanks, worked really well. I was on the right track (very close actually) as I was looking at lookup tables, but had issues uploading it (which I've since resolved) and I wasn't putting a 0 value in the second column. Thanks for the help.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jul 2012 04:31:52 GMT</pubDate>
    <dc:creator>joshhenderson</dc:creator>
    <dc:date>2012-07-04T04:31:52Z</dc:date>
    <item>
      <title>Monitor specific set of Processes from WMI</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Monitor-specific-set-of-Processes-from-WMI/m-p/88979#M22786</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;What I'm attempting to do is monitor a specific set of processes on a machine. For this, I am obtaining data from WMI (where &lt;CODE&gt;wmi_type=LocalProcesses&lt;/CODE&gt;,) and checking how many instances of that a specific process has occurred within a specified time frame (which I choose depening on how often the data from that server gets updated.) If it is ever zero, then there is an error.&lt;/P&gt;

&lt;P&gt;Below is a search query that I am using on a dashboard:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=[HOST] wmi_type=LocalProcesses earliest=-5m Name="[PROCESS]" | stats count AS TimesDetected | rangemap field=TimesDetected severe=0-0 default=low
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(Where &lt;CODE&gt;[HOST]&lt;/CODE&gt; is the name of the particular machine I am checking for, and &lt;CODE&gt;[PROCESS]&lt;/CODE&gt; is the name of the process. An example would be &lt;CODE&gt;Server01&lt;/CODE&gt; and &lt;CODE&gt;CcmExec&lt;/CODE&gt; respectively.)&lt;/P&gt;

&lt;P&gt;This works quite well, and I can add text only panels to my dashboard (within the search app) to monitor each process.&lt;/P&gt;

&lt;P&gt;The problem with this is that, once more than a handful of processes are monitored, the dashboard get's very cluttered (since you can only have 2 panels per row, and each process takes up a panel.) I am looking for a way to display the data in a table, for only certain processes that I have specified.&lt;/P&gt;

&lt;P&gt;In an attempt to do this, I have come up with the following query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=HTVMBI02 wmi_type=LocalProcesses earliest=-5m Name="System" OR "CcmExec" | stats count AS TimesDetected by Name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It works well when viewed as a table, and I can add as many processes as I want to monitor to the table. However, should the process not have any data, it will not be shown in the resulting table. I can understand why this is (there is no data for it,) but I am looking for a way to force it to say '0' for processes I've specified that it can't find data for. Is there a way to do this?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2012 06:36:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Monitor-specific-set-of-Processes-from-WMI/m-p/88979#M22786</guid>
      <dc:creator>joshhenderson</dc:creator>
      <dc:date>2012-07-03T06:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor specific set of Processes from WMI</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Monitor-specific-set-of-Processes-from-WMI/m-p/88980#M22787</link>
      <description>&lt;P&gt;One approach (an obviously not optimal one, but perhaps it will scale sufficiently) might be to use a lookup table and &lt;CODE&gt;| append&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Suppose you set up a lookup table like this (call it processes.csv):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Name,TimesDetected
System,0
CcmExec,0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now, you can make your search as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=HTVMBI02 wmi_type=LocalProcesses earliest=-5m 
[ | inputlookup processes.csv | fields Name ] 
| stats count AS TimesDetected by Name
| append [ | inputlookup processes.csv ]
| stats max(TimesDetected) as TimesDetected by Name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In theory, the lookup not only populates the base search but provides sentinel values to make it so you can be sure that every possible row has a "TimesDetected=0" value for display purposes.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2012 19:24:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Monitor-specific-set-of-Processes-from-WMI/m-p/88980#M22787</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-07-03T19:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor specific set of Processes from WMI</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Monitor-specific-set-of-Processes-from-WMI/m-p/88981#M22788</link>
      <description>&lt;P&gt;Thanks, worked really well. I was on the right track (very close actually) as I was looking at lookup tables, but had issues uploading it (which I've since resolved) and I wasn't putting a 0 value in the second column. Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jul 2012 04:31:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Monitor-specific-set-of-Processes-from-WMI/m-p/88981#M22788</guid>
      <dc:creator>joshhenderson</dc:creator>
      <dc:date>2012-07-04T04:31:52Z</dc:date>
    </item>
  </channel>
</rss>

