I’m new to WebPageTest and looking into running this in a test environment.
I’ve currently set this up locally on a mac, using docker for the WPT Server and Agent.
I wanted a way to perform a healthcheck to indicate if the agent is running, and came across this python script - https://github.com/WPO-Foundation/healthcheck/blob/master/healthcheck.py
Background: The reason for the healthcheck, is that there will be a service making healthcheck pings to agents to ensure the agent is running.
Looking at the python script (healthcheck.py), the script needs to be running on the same instance/container as the agent and it will check 2 things
- The process uptime in /proc/uptime
- An ALIVE_FILE (which needs to be pointing to something), passed in as an option (see: https://github.com/WPO-Foundation/healthcheck/blob/master/healthcheck.py#L47)
Question: I would like to know is there already another file that gets updated that could be referenced as an ALIVE_FILE (ideally a log file?).
Or if there is a log file in the container / a way to configure a log file within the docker container?
I also had a look at the agent container logs (running: docker logs --tail ), I see this as output:
02:12:25.380 - Get Work Error: None
02:12:30.505 - Get Work Error: None
Question: Is there a way to have this log to a file?