Welcome to docs.opsview.com

Differences

This shows you the differences between two versions of the page.

opsview4.6:opsviewshutdown [2014/09/09 12:19] (current)
Line 1: Line 1:
 +====== Opsview Shutdown and Startup ======
 +There are two services on an Opsview master server:
 +  * opsview - which runs the background daemons for monitoring, including an agent on the master
 +  * opsview-web - which runs the application server to serve the web pages
 +
 +If you run these commands as the nagios user, make sure you use ''su - nagios'' (with the dash) to switch to the nagios user as you will need the environment variables to be setup.
 +
 +===== Shutdown =====
 +==== Master shutdown ====
 +To shutdown, you can run the commands as either the root user or the nagios user:
 +
 +<code>
 +/etc/init.d/opsview stop
 +/etc/init.d/opsview-web stop
 +</code>
 +
 +==== Slave shutdown ====
 +To stop Opsview on all slave systems, run as the nagios user on the master server:
 +<code>
 +/usr/local/nagios/bin/dosh /usr/local/nagios/bin/rc.opsview stop
 +</code>
 +
 +
 +
 +===== Startup =====
 +==== Master startup =====
 +To start Opsview on the master, run as the nagios user:
 +<code>
 +/etc/init.d/opsview start
 +/etc/init.d/opsview-web start
 +</code>
 +
 +==== Slave startup ====
 +To start Opsview on all slave systems, run as the nagios user on the master server:
 +<code>
 +/usr/local/nagios/bin/dosh /usr/local/nagios/bin/rc.opsview start
 +</code>
 +
 +
 +===== Opsview Server Shutdown =====
 +To shutdown your Opsview server, use the appropriate OS shutdown routine. Opsview will install an appropriate handler to shut Opsview down as part of the OS shutdown. An appropriate handler will also be run as part of an OS startup.
 +
 +**Note**: Slaves will continue to run and do local notifications as an OS shutdown does not stop slaves from running. See the steps above to shutdown slaves.
 +
 +====== Troubleshooting ======
 +===== I get the message "Environment not set properly", when running the start/stop scripts =====
 +When you run the init script and you get this message:
 +<code>
 +Environment not set properly. Check nagios user's profile
 +</code>
 +
 +This means that the nagios user does not have the Opsview profile sourced correctly. To resolve, change to the nagios user and check that the .profile, .bash_profile AND .bashrc file (based on your OS) has the following line:
 +<code>
 +test -f /usr/local/nagios/bin/profile && . /usr/local/nagios/bin/profile
 +</code>
 +
 +You can check if the environment has been sourced correctly by checking the OPSVIEW_BASE variable:
 +<code>
 +# su - nagios
 +$ echo $OPSVIEW_BASE
 +/usr/local/nagios
 +</code>
 +
 +As root, check if the error now occurs:
 +<code>
 +# /etc/init.d/opsview status
 +Nagios is running
 +</code>
Navigation
Print/export
Toolbox