Opsview Knowledge Center

Changing Opsview Monitor Passwords

Learn how to change your Opsview Monitor admin and database passwords

Note: There will be a short outage to Opsview Monitor while the passwords are changed.

  1. As root, stop all Opsview Monitor daemons:

    /opt/opsview/watchdog/bin/opsview-monit stop all

  2. Edit passwords in /usr/local/nagios/etc/opsview.conf

  3. Change passwords in MySQL to match those in opsview.conf

Note: Passwords should avoid characters such as @, ! and $ due to handling by Perl or by the shell. You can see how the variables would be calculated by running /usr/local/nagios/bin/opsview.sh.

$ mysql -u root -p
Password: 
mysql> USE mysql;
mysql> UPDATE user SET password=PASSWORD("newpass") WHERE user="opsview";
mysql> UPDATE user SET password=PASSWORD("newpass") WHERE user="odw";
mysql> UPDATE user SET password=PASSWORD("newpass") WHERE user="nagios";
mysql> UPDATE user SET password=PASSWORD("newpass") WHERE user="reports";
mysql> FLUSH PRIVILEGES;
mysql> quit
  1. Run /usr/local/nagios/bin/rc.opsview gen_config for 5.X - this will regenerate the Opsview Monitor configuration files and then restart the Opsview Monitor daemons automatically.

  2. As root, validate that all of the Opsview Monitor daemons are running correctly:

    /opt/opsview/watchdog/bin/opsview-monit validate

How do I change the "admin" User Interface password?

To change the "admin" user password (if the current one is known) via the Opsview Monitor Web Interface follow the steps noted below:

  1. Login as the admin user

  2. Click on the name in the top right, then choose My Profile

  3. Enter the new password in the fields provided, and click Submit Changes

Note: Your current UI session will continue, but you will need to use the new password for the next login.

How do I recover the "admin" Web User Interface password?

In the event that the "admin" password has been lost, the following commands will reset it to the installation default.

mysql -u root -p
Password: 
mysql> use opsview;
mysql> update contacts set encrypted_password='$apr1$SUR3Kcd8$CkJfpqvqy3r.6rzawNwCS.' where name='admin';

You should now be able to access the Opsview Monitor Web User Interface once again using the username "admin" and the password "initial".

Note: Be sure to change the password to something other than the default!

Changing Opsview Monitor Passwords

Learn how to change your Opsview Monitor admin and database passwords