Monit question - and a php question! running centos 7

Discussion in 'ISPConfig 3 Priority Support' started by craig baker, May 25, 2018.

  1. craig baker

    craig baker Member HowtoForge Supporter

    I've been banging my head on the wall as far as a monit problem - the monitrc file always generates syntax errors! I've done as the tutorial suggested and have in monit.d
    --snip--
    set daemon 60
    set logfile syslog facility log_daemon

    # Send emails trough this mailserver
    set mailserver localhost

    # Set the From address of the alert emails
    set mail-format { from: [email protected] }

    # Send alerts to this address
    set alert root@localhost

    set httpd port 2812 and
    SSL ENABLE
    PEMFILE /var/certs/monit.pem
    allow admin:mypassword

    # Monitor the pure-ftpd service
    check process pureftpd pidfile /var/run/pure-ftpd.pid
    start program = "/usr/bin/systemctl start pure-ftpd"
    stop program = "/usr/bin/systemctl stop pure-ftpd"
    if failed port 21 protocol ftp then restart
    if 5 restarts within 5 cycles then timeout
    --snip--
    now the syntax above is NOT what is given in the documentation but it is what was given in the tutorial.
    I ALWAYS get syntax errors :
    May 25 16:23:30 ns9 monit: /etc/monit.d/monitrc:19: syntax error 'check process '
    May 25 16:23:30 ns9 monit: /etc/monit.d/monitrc:19: syntax error 'check process '
    May 25 16:23:30 ns9 systemd: monit.service: main process exited, code=exited, status=1/FAILURE

    now tutorial says 'with pidfile' and doc says 'pidfile' but both give errors.

    what am I missing?

    ALSO - a fun question. centos 7 comes with php 5.4 I need php 5.6 to install nextcloud. I see various pages on how to do the upgrade. is there any reason NOT to upgrade to 5.6? I'm running perfect server centos 7 with postfix/apache/ etc and ispconfig 3 :)
     
  2. craig baker

    craig baker Member HowtoForge Supporter

    ANSWERING my own monit question! my password contains the character '#' and that blows it up!
    have to escape the password with double-quotes! LOL
     
  3. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    if you don't need php 5.6 you should consider upgrading to php 7.2 ^^ doesn't the epel provide 5.6 or newer?
     
  4. craig baker

    craig baker Member HowtoForge Supporter

    I went ahead and used php-compiler.sh to add php 5.6.31 and 7.2 :)
     

Share This Page