1.4. Running IdM Healthcheck on a schedule
Follow this procedure to configure IdM Healthcheck to run on a schedule. This includes configuring the following utilities:
-
The
systemdtimer to run the Healthcheck tool periodically and generate the logs. -
The
crondservice to ensure log rotation.
The default log name is healthcheck.log and the rotated logs use the healthcheck.log-YYYYMMDD format.
The Healthcheck timer tool is not a real-time tool. It is only meant to be run a few times an hour. If you require real-time monitoring of, for example, services or disk space, use a different tool.
Prerequisites
-
You have
rootprivileges.
Procedure
Enable a
systemdtimer:# systemctl enable ipa-healthcheck.timer Created symlink /etc/systemd/system/multi-user.target.wants/ipa-healthcheck.timer -> /usr/lib/systemd/system/ipa-healthcheck.timer.Start the
systemdtimer:# systemctl start ipa-healthcheck.timerOpen the
/etc/logrotate.d/ipahealthcheckfile to configure the number of logs you want to be saved:[...] rotate 30 }By default, logs are stored for 30 days before they are overwritten by newer logs.
In the same file, configure the path to the file storing the logs.
/var/log/ipa/healthcheck/healthcheck.log { [...]By default, logs are saved in the
/var/log/ipa/healthcheck/directory.- Save the file.
Ensure that the
crondservice is enabled and running:# systemctl enable crond # systemctl start crondTo start generating logs, start the IdM healthcheck service:
# systemctl start ipa-healthcheck
Verification
-
Navigate to the
/var/log/ipa/healthcheck/directory. - Display the contents of the log file to check if it was created correctly.