Best VPS Hosting | Website Hosting Pakistan | Domain & Hosting Services

Nagios login screen at times redirects to itself after entering the login credentials. It generally happens due to a mismatch in the time zone.

As a part of our Server Management Services, we help our Customers to fix Nagios related errors regularly.

Let us today discuss the possible causes and fixes for this error.

What causes Nagios login screen to redirects to itself

Nagios XI uses cookies to save session state and these are set to expire after 30 minutes. The mismatch in time between the Nagios XI server and the client’s browser causes the cookies to appear expired.

We have noticed that it generally happens when the time set on the Nagios XI server is incorrect.

Nagios login screen redirects to itself – How to fix

Our Support Engineers fix the time on the Nagios XI server and ensure that it is correct. It helps to resolve this issue in most cases.

Timezone Configuration Using Nagios XI GUI

Nagios XI has a dedicated configuration section in the web GUI which does the timezone configuration.

  • Navigate to Admin > System Config > System Settings
  • Find the Timezone Settings section (on the General tab)
  • From the Timezone drop-down list select the timezone
  • Click the Update Settings button

Nagios login screen to redirects to itself

 

Setting the System Timezone

Even after setting the time zone via GUI, our support specialists have noticed date/time and timezone issues in some cases.

In such cases, we update the system time to resolve the issue. The steps to update the system time varies based on the operating system used.

RHEL 7|CentOS 7|Oracle Linux 7

We use the timedatectl command to configure the timezone. To display a list of available timezones, use the command:

# timedatectl list-timezones

The timezones are listed by country/city and include daylight savings time adjustments.

Then we 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 helps 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

Next, we will configure the php.ini for the timezone set above. The location of the php.ini file differs depending on the operating system/version. The following command will determine the location:

# find /etc -name php.ini

We will then open the file with a suitable text editor and change the timezone value as given below

date.timezone = America/Los_Angeles

Finally, we will restart the Apache service:

RHEL 7|CentOS 7|Oracle Linux 7

# systemctl restart httpd.service

Ubuntu 14

# service apache2 restart

 

Checking The System Date/Time

We will now check the timezone information by checking the XI system time by executing the following command:

# date

If the timezone is correct, but the date and/or time are incorrect we could set the proper time using the date:

# date MMDDhhmmCCYY

Where MM is the month, DD is the day, hh is the hour, mm is minute, and CCYY is the year.

Restart Database Services

Whenever we change the system time or timezone, we need to restart the database services so that they use the new date/time.

Use the postgresql command only if you are using Nagios XI pre version 5.x OR you have upgraded to version 5.x from a previous version.

RHEL 7|CentOS 7

# systemctl stop nagios.service
# systemctl stop ndo2db.service
# service postgresql restart
# systemctl restart mariadb.service
# systemctl start ndo2db.service
# systemctl start nagios.service

Debian|Ubuntu 16/18

# systemctl stop nagios.service
# systemctl stop ndo2db.service
# service postgresql restart
# systemctl restart mysql.service
# systemctl start ndo2db.service
# systemctl start nagios.service

[Need any further assistance in fixing Nagios errors? – We’re available 24*7]

Conclusion

In short, a mismatch in the time zone can cause the Nagios login screen to redirects to itself after entering the login credentials. Today, we saw how our Support Engineers fix this error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = “owonCMyG5nEQ0aD71QM”;



Source link

Author

Write A Comment