CentOS7, monit and memcached

As my monit always showed memcache on error I investigated about this:

On CentOS 7 the memcached no longer has an PID within /var/run/memcached/, so I patched the file /opt/kaltura/app/configurations/monit/monit.d/enabled.memcached.rc
from
with pidfile "/var/run/memcached/memcached.pid"
to
with match memcached
and restarted the kaltura monit instance. Now the process turned green. Works for me.

Hello @kaikretschmann_1,

That is one way of approaching it. Another would be to edit /etc/sysconfig/memcached and set the OPTIONS var to:

OPTIONS="-l 127.0.0.1 -vv -P/var/run/memcached/memcached.pid"

So that it does place a PID on disk. Personally, I prefer the later as it is far more accurate the using ‘match’ which will just look at the list of running procs… usually it will not be a problem but potentially, you COULD have another unrelated memcached process running.

Nonetheless, since I do not wish the Kaltura deployment scripts to edit /etc/sysconfig/memcached which is owned by the memcached package and changing the monit config is better than adding additional manual instructions to the README, I would be happy to accept your change.

Can you please submit a pull request to https://github.com/kaltura/platform-install-packages/blob/Kajam-11.17.0/RPM/SOURCES/memcached.template.rc?

Thanks,

Just added a pull request:

Thanks very much. Was merged.