Logging sub-tab
    • 18 Apr 2023
    • 2 Minutes to read
    • Dark
      Light
    • PDF

    Logging sub-tab

    • Dark
      Light
    • PDF

    Article summary

    Data logs capture all session information sent and received from a device. This feature is available to log all text-based sessions (serial or SSH-based).

    Data Logging and Event Logging can be configured to collect information and create event notifications, based on custom scripts triggered by events. Defined alert strings (simple text match or regular expression pattern) are evaluated against the data source stream (during data collection). Events are generated for each match.

    NOTE
    Custom scripts can be created by the customer or a professional services provider.

    For data log events, copy scripts to the /etc/scripts/datalog folder. For event logs, copy scripts to /etc/scripts/events folder. Each script must be executable with user privileges.

    Enable Data Logging and Triggered Alerts

    Session data is recorded even if no user is connected. System messages are logged when pushed to console sessions. Location of data logs (local or remote) is based on Auditing settings.

    1. Go to Managed Devices :: Devices :: <device name> :: Logging.
    2. Select Data Logging checkbox (expands dialog). Select Enable data logging alerts checkbox.
    3. Select Enable data logging alerts checkbox (expands dialog).
      1. Enter Data String 1 (that triggers alert).
      2. On Data Script 1 drop-down, select a script that executes on occurrence.
    4. Repeat for additional triggers.
    5. Click Save.

    CLI Procedure

    1. Go to /settings/devices/<device name>/logging
    2. Use the set command to change the data_logging value to yes.
    3. Use the set command to change the enable_data_logging_alerts value to yes.
    4. Define for data_string_1 string or regular expression which will be matched against the data stream.
    5. Define for data_script_1 an available script in case a custom script should be executed.
    6. If needed, repeat for data_string_2 and data_script_2.
    7. Save the changes with commit
    [admin@nodegrid /]# /settings/devices/Device_Console_Serial/logging/
    [admin@nodegrid /]#set data_logging=yes
    [+admin@nodegrid logging]#set enable_data_logging_alerts=yes
    [+admin@nodegrid logging]#set data_string_1="String"
    [+admin@nodegrid logging]#set data_script_1=ShutdownDevice_sample.sh
    [+admin@nodegrid logging]#commit
    

    Enable Event Logging and Triggered Alerts

    NOTE
    If Event Logging does not appear on the Logging sub-tab, it is not available on the selected device.

    This feature logs events for Service Processor and IPMI sessions. When enabled, the System collects Service Processor Event Log data. The type of collected data depends on the Service Process functions and configuration.

    The settings control the interval of collected information (# = 1-999, and time = minutes-hour). Location of data logs (local or remote) is based on Auditing section settings.

    1. Go to Managed Devices :: Devices :: <device name> :: Logging
    2. Event Logging checkbox (expands dialog). 
    3. Enable Event Logging Alerts checkbox (expands dialog). 
      1. Enter Event String 1 (that triggers alert)
      2. Select Event Script 1 drop-down, select one
      3. Repeat for additional triggers.
    4. Adjust Event Log Frequency (1-9999)
    5. On Event Log Unit drop-down, select one (hours, minutes).
    6. Click Save.

    CLI Procedure

    1. Go to /settings/devices/<device name>/logging
    2. Use the set command to change the event_logging value to yes
    3. Use the set command to adjust event_log_frequency and event_log_unit as needed:
      event_log_frequency range from 1 – 9999
      event_log_unit options hours or minutes
    4. Use the set command to change the enable_event_logging_alerts value to yes
    5. For event_string_1, define the text string or regular expression (to be matched against the data stream).
    6. For event_script_1 define an available script (if a custom script should be executed).
    7. As needed, define event_string_2 and event_script_2.
    8. Save the changes with commit
    [admin@nodegrid /]# /settings/devices/ipmi/logging/
    [admin@nodegrid /]#set event_logging=yes
    [+admin@nodegrid logging]#set event_log_frequency=1
    [+admin@nodegrid logging]#set event_log_unit=hours
    [+admin@nodegrid logging]#set enable_event_logging_alerts=yes
    [+admin@nodegrid logging]#set event_string_1="String"
    [+admin@nodegrid logging]#set event_script_1=PowerCycleDevice_sample.sh
    [+admin@nodegrid logging]#commit
    



    Was this article helpful?

    ESC

    Eddy AI, facilitating knowledge discovery through conversational intelligence