monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: monitor service


From: address@hidden
Subject: Re: monitor service
Date: Tue, 7 Jul 2020 08:45:04 +0200

Yes, something like this should work:

        check process traccar match "<pattern>"
                start program = "/bin/systemctl start traccar"
                stop program = "/bin/systemctl stop traccar"

You just need to replace the "<pattern"> by string that will match your process 
... you can test it with "monit procmatch <pattern>"


Best regards,
Martin


> On 7 Jul 2020, at 08:31, Anders Yuran <anders.yuran@gmail.com> wrote:
> 
> Hello!
> This is absolutely new for me so all possible help is needed.
> I have monit 5.25.1 installed on Ubuntu 18.04
> It monitor apache2 and mariadb but I also have a backend server installed for 
> gps tracking. Can I monitor that also?
> The traccar.service file looks like this
> 
> 
> [Unit]
> Description=traccar
> After=network.target
> 
> [Service]
> Type=simple
> WorkingDirectory=/opt/traccar
> ExecStart=/opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml
> SyslogIdentifier=traccar
> SuccessExitStatus=143
> 
> [Install]
> WantedBy=multi-user.target
> 
> -- 
> Kind Regards
> 
> Anders Yuran
> 
> Havouza 15
> 4607 Pissouri
> Cyprus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]