THIS KNOWLEDGE BASE HAS BEEN ARCHIVED AND IS NO LONGER BEING UPDATED
Please visit library.nagios.com/docs for the latest and most up-to-date documentation.
Home » Categories » Products » Nagios Log Server » Documentation » System Configuration

Nagios Log Server - Cluster Timezone Settings

Overview

Nagios Log Server needs the system and all of it's components to be configured with the correct timezone.

This article explains how to configure the timezone and also explains all the components and how to check them.

 

 

Setting The Cluster Timezone

  • Log into Nagios Log Server

  • In the top menu bar click Admin

  • Under General click Global Settings

  • Here you can define the Cluster Timezone

    • If it is not set correctly, select the desired timezone and click Save Settings

 

The remaining steps will show you all the areas where the timezone settings are defined. We will use America/Los_Angeles for this KB article, but be mindful that you must substitute your actual country/city. You will need to establish a terminal session to a Nagios Log Server node as a root user. You should verify all the nodes are correct by executing all the commands on all the nodes.

 

 

Editing Files

In steps of this article you will be required to edit files. This documentation will use the vi text editor. When using the vi
editor:

  • To make changes press i on the keyboard first to enter insert mode
  • Press Esc to exit insert mode
  • When you have finished, save the changes in vi by typing :wq and press Enter

 

 

Verify The System Timezone

 

RHEL 7 + | CentOS 7 +

The timedatectl command is used to configure the timezone. You can display a list of available timezones with the following command:

timedatectl list-timezones

 

The timezones are listed by country/city and include daylight savings time adjustments. The command above can be piped to the grep command to help search for your timezone, for example:

timedatectl list-timezones | grep Los

 

This will produce the following output:

America/Los_Angeles

 

Then you use the timedatectl command to configure the timezone:

timedatectl set-timezone America/Los_Angeles

 

Running the timedatectl command by itself will produce a summary, which will have the following line:

Time zone: America/Los_Angeles (PST, -0800)

 

 

Debian | Ubuntu

The dpkg-reconfigure command is used to configure the timezone. Use the following command to set the timezone:

dpkg-reconfigure tzdata

 

Select the appropriate region and this completes the required steps.

 

 

PHP Timezone

This change needs to be made to your php.ini file, to determine the location of this file execute the following command:

find /etc -name php.ini

If there are multiple results then the one in the apache directory is the one that needs changing.

 

Change the date.timezone = line to:

date.timezone =  America/Los_Angeles

When you have finished, save the changes.

 

Once the change has been made you will have to restart Apache for the changes to take effect using one of the commands below:

 

RHEL 7 + | CentOS 7 +

systemctl restart httpd.service

 

Debian | Ubuntu 16/18/20

systemctl restart apache2.service

 

 

Restart Logstash

If you manually change any of the timezone settings outside of the GUI interface you will need to restart the logstash service using one of the commands below:

 

RHEL 7 + | CentOS 7 + | Oracle Linux 7 + | Debian | Ubuntu 16/18/20

systemctl restart logstash.service

 

 

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/



Special Offer For Knowledgebase Visitors! Get a huge discount on Nagios Log Server by clicking below.

Get 60% Off Nagios Log Server!

Did you know? Nagios provides complete monitoring of: Windows, Linux, UNIX, Servers, Websites, SNMP, DHCP, DNS, Email, Storage, Files, Apache, IIS, EC2, and more!

0 (0)
Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Nagios Log Server - Using The Custom Includes Page
Viewed 4673 times since Mon, Sep 16, 2019
Nagios Log Server - Important Files And Directories
Viewed 6294 times since Mon, Feb 11, 2019
Nagios Log Server - Changing Data Store Path
Viewed 8901 times since Thu, Jan 28, 2016
SSL/TLS - Signing Certificates With A Microsoft Certificate Authority
Viewed 30432 times since Wed, Jun 14, 2017
Nagios Log Server - Adding Additional Instances To Cluster
Viewed 5019 times since Thu, Jan 28, 2016
Nagios Log Server - Removing An Instance From A Cluster
Viewed 4308 times since Wed, Mar 21, 2018
Resizing The VM Disk Size For CentOS 7
Viewed 73382 times since Tue, May 8, 2018
Nagios Log Server - Real Life Experience of Nagios Log Server - NWC15
Viewed 6598 times since Mon, Feb 8, 2016
Nagios Log Server - How To Configure SSL
Viewed 5479 times since Thu, Jan 28, 2016
Nagios Log Server - Managing Instances
Viewed 4613 times since Thu, Jan 28, 2016