Troubleshooting
Problem
Resolving The Problem
Quick links
- Option 1: How to change the time zone for a single appliance
- Option 2: How to change the time zone for several appliances in the deployment
- Option 3: How to change the time zone for every appliance in the deployment
Important: This guide needs the Tomcat server to be restarted. Restarting the Web Server logs out users, cancels event exports, and prevent scheduled reports from running while services restart. It is recommended you complete this procedure during scheduled maintenance or alert users before you take an action that restarts core services. For more information, see: QRadar: How to clear the Tomcat cache or contact QRadar Support.
Option 1: How to change the time zone for a single appliance
Before you begin
The procedures listed do not apply to HA pairs. The primary HA appliance is responsible for copying the time zone file to the HA secondary. To complete the procedure outlined, you must have root access to the QRadar Console.
- Procedure
To change the time zone on one appliance, administrators can replace the localtime value on the appliance with a symbolic link to a time zone or city.- Use SSH to log in to the Console as the root user.
- Optional. Open an SSH session to the managed host to make a change on a non-Console appliance.
- Navigate to the /etc directory.
- To remove the existing localtime file, type
rm localtime
- Press Y when prompted to delete the existing localtime file.
- To list all-time zones, type the following command: ls /usr/share/zoneinfo/
If you specify a country, you must also specify the time zone or city from the subdirectory.
For example:/usr/share/zoneinfo/Europe/London /usr/share/zoneinfo/US/Pacific /usr/share/zoneinfo/Eastern /usr/share/zoneinfo/UTC
- To update the symlink and update the time zone, type:
ln -s /usr/share/zoneinfo/<new_timezone> localtime
- To ensure that changes are applied to the QRadar appliance, type:
/opt/qradar/init/hostcontext -q restart
- To restart the user interface on the Console, type:
systemctl restart tomcat
- To ensure that cron runs on the new time zone information, type:
systemctl restart crond
Results
After services are restarted, the appliance will use the same time zone as defined in /etc/localtime.
Option 2: How to change the time zone for several appliances in the deployment
Before you begin
The procedures listed do not apply to HA pairs. To complete the procedure outlined, you must have root access to the QRadar Console.
- Procedure
To change the time zone on specific managed hosts in the deployment, administrators can replace the localtime value on the appliance with a symbolic link to a time zone or city.- Use SSH to log in to the Console as the root user.
- Optional. Open an SSH session to the managed host to make a change on a non-Console appliance.
- Navigate to the / directory.
- To list all-time zones, type the following command: ls /usr/share/zoneinfo/
If you specify a country, you must also specify the time zone or city from the subdirectory.
For example,/usr/share/zoneinfo/Europe/London /usr/share/zoneinfo/US/Pacific /usr/share/zoneinfo/Eastern /usr/share/zoneinfo/UTC
- To change the time zone on multiple appliances, you can use the following command to update QRadar managed hosts by IP address:
/opt/qradar/support/all_servers.sh -I <IP address>,<IP address>,<IP address> "cd /etc;rm -f localtime;ln -s /usr/share/zoneinfo/US/<new_timezone> localtime"
Alternately, you can use all_servers.sh to apply commands for hostnames of QRadar appliances. For example, the following command updates any appliances with a hostname that starts with SVRQRD-EP and updates the time zone on those appliances.
For example,/opt/qradar/support/all_servers.sh -a 'SVRQRD-EP%' "cd /etc;rm -f localtime;ln -s /usr/share/zoneinfo/<Country>/<new_timezone> localtime"
- To ensure that changes are applied to the QRadar appliance, type:
/opt/qradar/support/all_servers.sh -I <IP address>,<IP address>,<IP address> "/opt/qradar/init/hostcontext -q restart"
- To restart the user interface on the Console, type:
systemctl restart tomcat
- To ensure that cron runs on the new time zone information, type:
systemctl restart crond
After services are restarted, all appliances in the network will use the same time zone as defined in /etc/localtime.
Option 3: How to change the time zone for every appliance in the deployment
Before you begin
The procedures listed do not apply to HA pairs. To complete the procedure outlined, you must have root access to the QRadar Console.
- Procedure
To change the time zone on your QRadar Console and all managed hosts by using the command-line interface. This procedure allows administrators to remove the existing time zone value and create a new symlink with the correct time zone that they want all appliances to use.- Use SSH to log in to the Console as the root user.
- Navigate to the / directory.
- To list all possible time zone options, type the following command: ls /usr/share/zoneinfo/
If you specify a country, you must also specify the time zone or city from the subdirectory.
For example,/usr/share/zoneinfo/Europe/London /usr/share/zoneinfo/US/Pacific /usr/share/zoneinfo/Eastern /usr/share/zoneinfo/UTC
- Type the following command to update the time zone on all appliances in the deployment:
/opt/qradar/support/all_servers.sh "cd /etc;rm -f localtime;ln -s /usr/share/zoneinfo/<Country>/<new_timezone> localtime"
/opt/qradar/support/all_servers.sh "cd /etc;rm -f localtime;ln -s /usr/share/zoneinfo/US/Pacific localtime" /opt/qradar/support/all_servers.sh "cd /etc;rm -f localtime;ln -s /usr/share/zoneinfo/Europe/London localtime" /opt/qradar/support/all_servers.sh "cd /etc;rm -f localtime;ln -s /usr/share/zoneinfo/GMT localtime"
- To ensure that changes are applied to the QRadar appliance, type:
/opt/qradar/support/all_servers.sh "/opt/qradar/init/hostcontext -q restart"
- To restart the user interface on the Console, type:
systemctl restart tomcat
- To ensure that cron runs on the new time zone information:
systemctl restart crond
Results
After services are restarted, all appliances in the network use the same time zone as defined in /etc/localtime.
Was this topic helpful?
Document Information
Modified date:
11 August 2022
UID
swg21988720