Hi,
Hum, did you send the email before review it ?
Anyway, let's try to help you.
A NodeJS _javascript_ file is not a PID file. So this won't ever work.
You have to run you process in a way to keep track of the pid like:
nohup node /home/centos/prerender/server.js > /dev/null 2>&1 & echo $! > /var/run/my-nodejs-server-pid-file.pid
then use this PID file in monit configuration with somethink like below
check process Prender with pidfile /var/run/my-nodejs-server-pid-file.pid
start program = "nohup node /home/centos/prerender/server.js > /dev/null 2>&1 & echo $! > /var/run/my-nodejs-server-pid-file.pid"
if cpu usage > 90% for 10 cycles then restart
Best would be to use a wrapper script instead of the full command line also.
Hopes this help mister "Sr. Devops Engineer"