linux · tech · tips

Re-calculate a checksum for monit

Today I changed one init script that was being checked by monit by a simple rule:

check file tomcat_bin with path /usr/sbin/tomcat6
  if failed checksum then unmonitor

The documentation isn’t very clear about how to regenerate the checksums after a legit change. You must either reload monit conf (with recent versions of monit):

# monit reload

or restart monit:

# service monit restart

you may need to put the resource under monitor again:

# monit monitor tomcat_bin