Agent: move logs to `/var/log/`
Currently, the agent is configured to write logs to /etc/patchmon/logs. This is an unusual location where nobody would even expect them. It would be better to place them according to the FHS in /var/log/patchmon-agent.log.
Creation is here:
https://github.com/PatchMon/PatchMon/blob/f08cbc2c848799c3fdbe828b131a4a71b746882f/agents/patchmon_install.sh#L612-L613
There are probably some more locations where the data is written.
3 Comments
Log directory can now be configured in the hosts config.yml side. In the future we will have ability to have a system wide change via settings but for now it can be changed. I'm still keeping it open as a pending task.
Hi, in the config.yml file this is configurable to configure a different place to store the logs.
I do agree with you @thomas-mc-work - However I did want to address this as part of a feature where I can pull logs from the agent into PatchMon to view / download them and as part of this I will standardise it or at least make a global configuration option in PatchMon server where this can be set.
I am going to keep this open.

In 1.4.2 one could manually change the install.sh to directly to put the logs in the right location from the beginning, but since the installs scripts are now embedded within the server binary, that is no longer possible.
For systems where
/etc/is read only or under some kind of versioning system, having the logs in/etcis even more of a no-go.The same is true for the ".last_update_timestamp", it should be in
/run/patchmon-agentand not in/etc.