A simple workaround to allow Pulseway to monitor Docker containers by using a generic systemd service
To use this solution properly:
- Copy one of the scripts to
/opt/
(or other location if you want) and give it permission of exection (chmod +x script
) - Copy the special service file (
[email protected]
) to one of the valid systemd locations (e.g./lib/systemd/system
) - Enable the service for each specific Docker container you want to monitor using the following notation:
$ systemctl enable pulseway-docker@nameofcontainer
$ systemctl start pulseway-docker@nameofcontainer
- Include the entry in the Pulseway XML config file as a systemd service inside of the section
MonitoredServices
:
<MonitoredServices>
<Service Name="[email protected]" DisplayName="Container Name" IsDaemon="true" DaemonType="SYSTEMD" Path="" StartParameters="" CanBeStopped="false" Enabled="true"/>
</MonitoredServices>
- Restart the Pulseway agent.