<?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: UNIX Process Monitoring Template in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/UNIX-Process-Monitoring-Template/m-p/27518#M679</link>
    <description>&lt;P&gt;Do you know about the Unix App?&lt;BR /&gt;
If you do some research and have a look at this app you will notice that it grabs process information using the TOP command around every 60 seconds.
Using a search then you can have splunk notify you if this process is not running.&lt;/P&gt;

&lt;P&gt;Something like:  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="os" source="top" myprocess earliest=-2min latest=-1min
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and have it run every every minute.
Then you can save this search with the condition that if it returns less then 1 result, it should email you an alert.&lt;/P&gt;

&lt;P&gt;So if myprocess is dead, then splunk should notify you of it, unless of course its a stale process that shows up in top even when it is not running...&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jan 2011 03:58:01 GMT</pubDate>
    <dc:creator>Genti</dc:creator>
    <dc:date>2011-01-18T03:58:01Z</dc:date>
    <item>
      <title>UNIX Process Monitoring Template</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/UNIX-Process-Monitoring-Template/m-p/27516#M677</link>
      <description>&lt;P&gt;Anybody in Splunk answers tried to register process to monitor for Unix systems?&lt;/P&gt;

&lt;P&gt;I am trying to set-up Splunk to monitor running status of a process.   When a process dies, meaning no longer exists, then I want splunk to generate an event that the process no longer is running in a system.&lt;/P&gt;

&lt;P&gt;It sounds pretty simple, but my delima is that when I search for a process, for example httpd.  When the httpd is running then, it would give me a result to verify that the process is there, but when the process no longer exists, splunk will fail searching for that process event.  Based on the result that failed to search a process event, how can I make that situation into an event?&lt;/P&gt;

&lt;P&gt;I would appreciate it if anyone has simular monitoring template that mointors certain proceses' status.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2011 01:43:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/UNIX-Process-Monitoring-Template/m-p/27516#M677</guid>
      <dc:creator>clyde772</dc:creator>
      <dc:date>2011-01-18T01:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: UNIX Process Monitoring Template</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/UNIX-Process-Monitoring-Template/m-p/27517#M678</link>
      <description>&lt;P&gt;The default Unix app already contains a scripted input that runs &lt;CODE&gt;ps&lt;/CODE&gt;. That should get you most of the way, but there are several different ways you might construct the search.&lt;/P&gt;

&lt;P&gt;Here's one approach, which will generate a new field  &lt;CODE&gt;is_running&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=os sourcetype=ps
| head 1
| eval is_running=if(match(_raw, "\shttpd\b"), 1, 0)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;CODE&gt;head 1&lt;/CODE&gt; will retrieve only the latest polling cycle, giving you the "current" status. If you want to do things like charting status over time, leave that bit out. Using 1 or 0 makes charting easier, but you can also replace them with text values like &lt;CODE&gt;"Running"&lt;/CODE&gt; or &lt;CODE&gt;"Not Running"&lt;/CODE&gt;, etc.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2011 03:54:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/UNIX-Process-Monitoring-Template/m-p/27517#M678</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2011-01-18T03:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: UNIX Process Monitoring Template</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/UNIX-Process-Monitoring-Template/m-p/27518#M679</link>
      <description>&lt;P&gt;Do you know about the Unix App?&lt;BR /&gt;
If you do some research and have a look at this app you will notice that it grabs process information using the TOP command around every 60 seconds.
Using a search then you can have splunk notify you if this process is not running.&lt;/P&gt;

&lt;P&gt;Something like:  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="os" source="top" myprocess earliest=-2min latest=-1min
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and have it run every every minute.
Then you can save this search with the condition that if it returns less then 1 result, it should email you an alert.&lt;/P&gt;

&lt;P&gt;So if myprocess is dead, then splunk should notify you of it, unless of course its a stale process that shows up in top even when it is not running...&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2011 03:58:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/UNIX-Process-Monitoring-Template/m-p/27518#M679</guid>
      <dc:creator>Genti</dc:creator>
      <dc:date>2011-01-18T03:58:01Z</dc:date>
    </item>
  </channel>
</rss>

