Monit Not Recgonizing MYSQL PID

Discussion in 'ISPConfig 3 Priority Support' started by yupthatguy, Oct 3, 2021.

  1. yupthatguy

    yupthatguy Member HowtoForge Supporter

    @till. I am working through your tutorial on Monit and Munin... everything seems to work well, except I am currently having 2 issues:

    I can't get Monit to to monitor mysql or memcached (properly).

    In your tutorial you have a note:

    So I used (and variations thereof)
    check process mysql with pidfile /var/lib/mysql/
    didn't work.
    So I did some digging and check out the documentation for monit... (cool app)
    I used:
    # find /run -iname mysql*.pid 
    to find:
    check process mysql with pidfile /run/mysqld/
    Also, doesn't work... so I am a bit befuddled on how to get monit working for mysql.  
    With regards to memcached.  I have memcached on both the main system and inside the jailkit. The problem is that Monit will only monit the memcached that is running inside the jailkit on the website that I use for Monit GUI. (i.e. /var/www/clients/client1/web4/var/run/memcached/, but if I point the monit config file at the system installation of memcached I get an error (i.e. /run/memcached/, saying that the path does not exist (outside of jailkit).
    Any tips?
  2. yupthatguy

    yupthatguy Member HowtoForge Supporter

    Hey hey... quick update. I got mysql to be monitored using
    check process mysql with pidfile /run/mysqld/
    Apparently, the "missing element" was a full server reboot.

    Now, the only porblem is memcahced.
  3. yupthatguy

    yupthatguy Member HowtoForge Supporter

    Ok... I solved the memcached problem...

    I pointed at the system installation not the jailkit, and then rebooted the entire server.... and it worked.

    For anyone interested, apparently "#service monit reload" is sometimes insufficient for monit to recognize new configs.
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Maybe restart would work? That is, service monit restart, avoids rebooting whole server.
    Newish OS use systemd, so the commands are
    systemctl reload monit
    systemctl restart monit
    ahrasis likes this.
  5. yupthatguy

    yupthatguy Member HowtoForge Supporter

    When I get to adding more services to monitor.. I will give those a try. thanks
  6. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I normally use restart as well but I prefer the old command of service monit restart instead as it still work just fine until now even in systemd.

Share This Page