I want to monitor vsftpd server from monit on CentOS 5.4 but somehow vsftpd does not create pid file in /var/run (nor in any other place).
Is this behavior normal for this distro?
How should I configure monit to watch for vsftpd, should I create pid file manually in /etc/init.d/vsftpd script?
Thanks.
Best Answer
You can try this: monit: check process without pidfile
Alternatively you can follow the guide I put together using aforementioned init file. Created RPM to keep the system consistent across updates (via fpm). New init file has modified service name vsftpd-pid so you can keep vsftpd stopped and vsftpd-pid running.
Remember to change your monit start and stop commands too.
More info here: http://bemehow.github.com/2012/11/15/monit-vsftpd/