Monit para Squid

0

Estou tentando usar o monitor para monitorar meu servidor de lula. Eu instalei o servidor squid no trecho raspbian usando o apt-get. O serviço squid foi instalado em /etc/init.d/squid e verifiquei se o arquivo PID em /var/run/squid.pid existe.

Ainda quando executo o sudo monit, começo tudo o que recebo:

There is no service named "squid"

Eu instalei o monit compilando-o como root e adicionando-o ao systemd assim: link

Heres meu arquivo monit criado em / etc / monitrc

set daemon 60
set logfile syslog facility log_daemon
set idfile /tmp/monit.id
set statefile /tmp/monit.state
set mailserver localhost
set alert [email protected]
set httpd port 2812 and
     #use address localhost  # only accept connection from localhost
      allow localhost        # allow localhost to connect to the server and
      allow admin:monit      # require user 'admin' with password 'monit'

 check process squid with pidfile /var/run/squid.pid
   group proxy
   start program = "/etc/init.d/squid start"
   stop  program = "/etc/init.d/squid stop"
   if failed host localhost port 3128
     send "GET /monit-check HTTP/1.0\r\n\r\n"
     expect "HTTP/[0-9\.]{3} 400 .*\r\n"
     for 5 cycles then restart

Saída de service squid status :

● squid.service - LSB: Squid HTTP Proxy version 3.x
   Loaded: loaded (/etc/init.d/squid; generated; vendor preset: enabled)
   Active: active (running) since Tue 2018-01-16 12:23:25 UTC; 2h 1min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 24781 ExecStop=/etc/init.d/squid stop (code=exited, status=0/SUCCESS)
  Process: 24928 ExecStart=/etc/init.d/squid start (code=exited, status=0/SUCCESS)
 Main PID: 24970 (squid)
      CPU: 3.718s
   CGroup: /system.slice/squid.service
           ├─24968 /usr/sbin/squid -YC -f /etc/squid/squid.conf
           ├─24970 (squid-1) -YC -f /etc/squid/squid.conf
           ├─24971 (logfile-daemon) /var/log/squid/access.log
           ├─24984 (pinger)
           └─25378 (basic_ncsa_auth) /etc/squid/squid_passwd

Jan 16 12:23:24 raspberrypi systemd[1]: Starting LSB: Squid HTTP Proxy version 3.x...
Jan 16 12:23:25 raspberrypi squid[24968]: Squid Parent: will start 1 kids
Jan 16 12:23:25 raspberrypi squid[24968]: Squid Parent: (squid-1) process 24970 started
Jan 16 12:23:25 raspberrypi squid[24928]: Starting Squid HTTP Proxy: squid.
Jan 16 12:23:25 raspberrypi systemd[1]: squid.service: PID file /var/run/squid.pid not readable (yet?) after start: No sJan 16 12:23:25 raspberrypi systemd[1]: squid.service: Supervising process 24970 which is not our child. We'll most likeJan 16 12:23:25 raspberrypi systemd[1]: Started LSB: Squid HTTP Proxy version 3.x.
    
por Julian 16.01.2018 / 13:34

0 respostas