Enabling logs for Cloud Probe on Linux


Setting the logging level for the Cloud Probe

BMC recommends the following settings to control logging for a Real User Cloud Probe. For complete logging options and details, refer to the deployment documentation for Red Hat Enterprise Linux.

  1. On the virtual machine with the Cloud Probe, log in as root.
  2. To stop the rsyslog service, run the following command:
    /etc/init.d/rsyslog stop
  3. Open the /etc/rsyslog.conf configuration file.
  4. To save messages to the Cloud Probe log file, probe, add the following lines to the end of the RULES section:

    # Save Probe messages to the probe log
    local5.info   /var/log/probe
  5. Start the rsyslog service by running the following command:
    /etc/init.d/rsyslog start

Creating and modifying rotation rules for the Cloud Probe log

After you set the logging level, you can rotate the log files based on age or size.

  1. On the virtual machine with the Cloud Probe, log in as root.
  2. In the /etc/logrotate.d directory, create a new file named probe.
  3. Add the following lines for the Cloud Probe rotation rules, and modify the options. (For details, refer to Red Hat Linux documentation.)

    /var/log/probe
    {
        daily
        copytruncate
        rotate 4
        missingok
        create 0600 root root
    }
    • daily — rotates the log file every day
    • copytruncate — creates a copy of the original log file and truncates the original file (probe)
    • rotate 4 — limits the number of log file rotations, creating backup files
    • missingok — continues without an error message if the the log file is missing
    • create 0600 root root(optional) creates a copy of the original log file, with specified permissions and groups
  4. (Optional) You can check (debug) the rotation settings by running the following command:
    logrotate -d /etc/logrotate.conf
     The command tests the settings without actually rotating files.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*