How to monitor if a process is not running in UNIX/Linux
search cancel

How to monitor if a process is not running in UNIX/Linux

book

Article ID: 152698

calendar_today

Updated On:

Products

Monitor Solution Monitor Pack for Servers Monitor Solution for Servers

Issue/Introduction

How can I monitor/alert when a process is not running in UNIX or Linux?

Resolution

Create a new Command metric which returns a count of running processes:
  
Monitor Solution 8.x:
 
Name:  Count of running processnameprocesses
Polling interval:  60 seconds
Data type: Numeric
Use: Command Line: ps -eoargs|awk /processname/'{print $0}'|grep -v -c 'awk /processname'
Return value column:  0

Create a new a rule with a condition of “Is equal to 0” with an appropriate severity. If the desired process is not running, the metric will return a value of “0”, and the rule will trigger.


Note:  This command line syntax has been confirmed compatible on SLES, RHEL, AIX, and Solaris