Nagios tool is very helpful for monitoring server process, load, free space and etc. On this post how to configure at specific process like rsyslogd, cpanel, csf and other process.
For example do you want to monitor rsyslogd on nagios server?
root 12541 0.1 0.5 152411 5656 ? SNl 03:37 0:47 /sbin/rsyslogd -i /var/run/syslogd.pid
root 20658 0.0 0.0 175215 864 pts/2 S+ 12:35 0:00 grep rsyslogd
Download a process monitoring script from nagios and save to under /usr/local/nagios/libexec/ directory,
Give execute permission and user permission,
Execute the below command,
OK - Process: rsyslogd, User: root, CPU: 1.0%, RAM: 0.6%, Start: 17:10, CPU Time: 74 min | 'cpu'=1.0 'memory'=0.6 'cputime'=74 ]
-w specified to Warning Status
-c specified to Critical Status
If you may get the below error like, bc: command not found. Need to be install bc package in your system.
/usr/local/nagios/libexec/check_ps: line 152: bc: command not found
OK - Process: rsyslogd, User: root, CPU: 0.1%, RAM: 0.5%, Start: 03:37, CPU Time: min | 'cpu'=0.1 'memory'=0.5 'cputime'= ]