Re: monitor service
| Newsgroups | gmane.comp.monitoring.monit.general |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> 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