Giter Site home page Giter Site logo

PID file about pingbeat HOT 4 CLOSED

joshuar avatar joshuar commented on September 6, 2024
PID file

from pingbeat.

Comments (4)

joshuar avatar joshuar commented on September 6, 2024

Hi @captainark thanks for reporting! Yes, I need to make better use of the beats-packer tooling the Beats team uses for releases and also fix small things like this.

I believe as a workaround, Monit can track services using the process name IIRC. That might be a workaround while I get this sorted.

from pingbeat.

captainark avatar captainark commented on September 6, 2024

Hi @joshuar !

Thanks for taking the time to reply !

I didn't know that monit doesn't need PID files anymore... I guess I hadn't read the manual in a while.

I've added the following in my /etc/systemd/system/pingbeat.service unit file to generate a PID file :

ExecStartPre=/bin/bash -c "/bin/rm -f /run/pingbeat.pid"
ExecStartPost=/bin/bash -c "/usr/bin/pgrep -fx '/opt/go/bin/pingbeat -c /etc/pingbeat/pingbeat.yml' > /run/pingbeat.pid"
ExecStopPost=/bin/bash -c "[[ -f /run/pingbeat.pid ]] && /bin/rm /run/pingbeat.pid"

I'm still looking forward to seeing pingbeat generate a PID file on its own though ;)

from pingbeat.

mbadran avatar mbadran commented on September 6, 2024

The latest update includes a systemd service file. I copied it to /etc/systemd/system/, updated the path in ExecStart, and it just worked with systemctl.

$ systemctl status pingbeat
● pingbeat.service - Pingbeat
   Loaded: loaded (/etc/systemd/system/pingbeat.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2016-07-08 21:23:40 AEST; 38min ago
 Main PID: 3572 (pingbeat)
   CGroup: /system.slice/pingbeat.service
           └─3572 /opt/go/bin/pingbeat -c /etc/pingbeat/pingbeat.yml

Jul 08 21:23:40 pingbeat.local systemd[1]: Started Pingbeat.
Jul 08 21:23:40 pingbeat.local systemd[1]: Starting Pingbeat...

from pingbeat.

joshuar avatar joshuar commented on September 6, 2024

Closing as the systemd file should be working now?

from pingbeat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.