- 18 Apr 2023
- 2 Minutes to read
- Print
- DarkLight
- PDF
Logging sub-tab
- Updated on 18 Apr 2023
- 2 Minutes to read
- Print
- DarkLight
- PDF
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.
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.
- Go to Managed Devices :: Devices :: <device name> :: Logging.
- Select Data Logging checkbox (expands dialog). Select Enable data logging alerts checkbox.
- Select Enable data logging alerts checkbox (expands dialog).
- Enter Data String 1 (that triggers alert).
- On Data Script 1 drop-down, select a script that executes on occurrence.
- Repeat for additional triggers.
- Click Save.
CLI Procedure
- Go to /settings/devices/<device name>/logging
- Use the set command to change the data_logging value to yes.
- Use the set command to change the enable_data_logging_alerts value to yes.
- Define for data_string_1 string or regular expression which will be matched against the data stream.
- Define for data_script_1 an available script in case a custom script should be executed.
- If needed, repeat for data_string_2 and data_script_2.
- 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
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.
- Go to Managed Devices :: Devices :: <device name> :: Logging.
- Event Logging checkbox (expands dialog).
- Enable Event Logging Alerts checkbox (expands dialog).
- Enter Event String 1 (that triggers alert)
- Select Event Script 1 drop-down, select one
- Repeat for additional triggers.
- Adjust Event Log Frequency (1-9999)
- On Event Log Unit drop-down, select one (hours, minutes).
- Click Save.
CLI Procedure
- Go to /settings/devices/<device name>/logging
- Use the set command to change the event_logging value to yes
- 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 - Use the set command to change the enable_event_logging_alerts value to yes
- For event_string_1, define the text string or regular expression (to be matched against the data stream).
- For event_script_1 define an available script (if a custom script should be executed).
- As needed, define event_string_2 and event_script_2.
- 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