<?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 search and alert on processes that are not running on a list of hosts? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-and-alert-on-processes-that-are-not-running-on-a/m-p/209867#M61372</link>
    <description>&lt;P&gt;I have to identify processes not running on a list of hosts.&lt;BR /&gt;
To do this, I have a lookup table with all the processes for every host and I have a script that extract ps from linux servers.&lt;BR /&gt;
I'm able to find hosts with no running processes using the following search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup Processes.csv |eval host=upper(host)| search host="*"| eval count=0 | append [search index=services host=*| search [| inputlookup Processes.csv | search host="*" | eval query=Process | table host query] |eval host=upper(host)| stats count by host ] | stats sum(count) AS Total by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But the problem is that I need to verify both &lt;STRONG&gt;host&lt;/STRONG&gt; &lt;EM&gt;and&lt;/EM&gt; &lt;STRONG&gt;process&lt;/STRONG&gt; names (not only &lt;STRONG&gt;host&lt;/STRONG&gt; like the previous search).&lt;BR /&gt;
I tried to use two fields (&lt;STRONG&gt;host&lt;/STRONG&gt; and &lt;STRONG&gt;Process&lt;/STRONG&gt;) in the &lt;CODE&gt;stats count&lt;/CODE&gt; (instead of only &lt;STRONG&gt;host&lt;/STRONG&gt;) but the problem is that the &lt;STRONG&gt;process&lt;/STRONG&gt; names (values) are different between lookup and events. For example, in the lookup, I have &lt;CODE&gt;mailman&lt;/CODE&gt; and in ps result I have &lt;CODE&gt;arm_32000_--_2002_OPCMASTER_MAILMAN_UNIX_8.6_SONONLY&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;So I can find the process name in the events, but I don't know how to verify when a process is not running.&lt;/P&gt;

&lt;P&gt;Anyone can give me any suggestion?&lt;BR /&gt;
Anyone encountered a similar problem?&lt;BR /&gt;
thank you.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Fri, 30 Oct 2015 13:28:22 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2015-10-30T13:28:22Z</dc:date>
    <item>
      <title>How do I search and alert on processes that are not running on a list of hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-and-alert-on-processes-that-are-not-running-on-a/m-p/209867#M61372</link>
      <description>&lt;P&gt;I have to identify processes not running on a list of hosts.&lt;BR /&gt;
To do this, I have a lookup table with all the processes for every host and I have a script that extract ps from linux servers.&lt;BR /&gt;
I'm able to find hosts with no running processes using the following search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup Processes.csv |eval host=upper(host)| search host="*"| eval count=0 | append [search index=services host=*| search [| inputlookup Processes.csv | search host="*" | eval query=Process | table host query] |eval host=upper(host)| stats count by host ] | stats sum(count) AS Total by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But the problem is that I need to verify both &lt;STRONG&gt;host&lt;/STRONG&gt; &lt;EM&gt;and&lt;/EM&gt; &lt;STRONG&gt;process&lt;/STRONG&gt; names (not only &lt;STRONG&gt;host&lt;/STRONG&gt; like the previous search).&lt;BR /&gt;
I tried to use two fields (&lt;STRONG&gt;host&lt;/STRONG&gt; and &lt;STRONG&gt;Process&lt;/STRONG&gt;) in the &lt;CODE&gt;stats count&lt;/CODE&gt; (instead of only &lt;STRONG&gt;host&lt;/STRONG&gt;) but the problem is that the &lt;STRONG&gt;process&lt;/STRONG&gt; names (values) are different between lookup and events. For example, in the lookup, I have &lt;CODE&gt;mailman&lt;/CODE&gt; and in ps result I have &lt;CODE&gt;arm_32000_--_2002_OPCMASTER_MAILMAN_UNIX_8.6_SONONLY&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;So I can find the process name in the events, but I don't know how to verify when a process is not running.&lt;/P&gt;

&lt;P&gt;Anyone can give me any suggestion?&lt;BR /&gt;
Anyone encountered a similar problem?&lt;BR /&gt;
thank you.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2015 13:28:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-and-alert-on-processes-that-are-not-running-on-a/m-p/209867#M61372</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2015-10-30T13:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search and alert on processes that are not running on a list of hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-and-alert-on-processes-that-are-not-running-on-a/m-p/209868#M61373</link>
      <description>&lt;P&gt;Modify your &lt;CODE&gt;ps&lt;/CODE&gt; command to provide output formatted more to your liking.  The &lt;CODE&gt;man pages&lt;/CODE&gt; on &lt;CODE&gt;ps&lt;/CODE&gt; document an incredible array of formatting options.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2015 15:23:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-and-alert-on-processes-that-are-not-running-on-a/m-p/209868#M61373</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-10-30T15:23:18Z</dc:date>
    </item>
  </channel>
</rss>

