Skip to content

RFE - Configure Portainer to read specific log, then restart container #4873

@redtripleAAA

Description

@redtripleAAA

Subject:
RFE - Configure Portainer to read specific log, then restart container

It would be nice to have that feature, which will help us maintain stable connection with VPN containers, that most of the times just requires container restart when it sees an error

I know there are few Restart policies:

Any: Restart under any condition (Restarted host or Docker daemon).

On Failure: Restart the container if it exits due to an error, which manifests as a non-zero exit code.

None: Do not automatically restart the container.

And I know there is a container that is called AutoHeal, would do the same, but it doesn't work as expected all the time.

So, the ask to detect a specific log we add in the container config and then that will force the container to reboot using a feature from Portainer itself.

Example:

Container >> qbittorrentvpn

When it sees the following log:

Thu Feb 11 07:27:39 2021 RESOLVE: Cannot resolve host address: ca-toronto.privacy.network:1198 (Temporary failure in name resolution)

Thu Feb 11 07:27:39 2021 Could not determine IPv4/IPv6 protocol Thu Feb 11 07:27:39 2021 SIGUSR1[soft,init_instance] received, process restarting

Portainer should be able to force reboot the container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions