.. _ar_agent_conf_restart:
How to restart an agent after changes to the agent.conf:
========================================================
OSSEC agents require a restart after the agent.conf has been updated.
Active response can do this automatically when it notices the file has changed.
Requirements:
^^^^^^^^^^^^^
* Active response must be enabled.
* This only works for \*nix based systems
Details:
^^^^^^^^
The idea behind this is to have active response restart the OSSEC processes when the agent.conf file changes.
A rule must be created to notice the change to that specific file, and an active response setup to react to that rule.
rules:
^^^^^^
.. code-block:: console
syscheck
/var/ossec/etc/shared/agent.conf
agent.conf was modified
active response configuration:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: console
restart-ossec
restart-ossec.sh
restart-ossec
local
710001