Running Centreon Engine¶
Verifying Your Configuration¶
Every time you modify your configuration files, you should run a sanity check on them. It is important to do this before you (re)start Centreon Engine, as Centreon Engine will shut down if your configuration contains errors.
In order to verify your configuration, run Centreon Engine with the -v command line option like so:
$ /usr/sbin/centengine -v /etc/centreon-engine/centengine.cfg
If you’ve forgotten to enter some critical data or misconfigured things, Centreon Engine will spit out a warning or error message that should point you to the location of the problem. Error messages generally print out the line in the configuration file that seems to be the source of the problem. On errors, Centreon Engine will often exit the pre-flight check and return to the command prompt after printing only the first error that it has encountered. This is done so that one error does not cascade into multiple errors as the remainder of the configuration data is verified. If you get any error messages you’ll need to go and edit your configuration files to remedy the problem. Warning messages can generally be safely ignored, since they are only recommendations and not requirements.
Once you’ve verified your configuration files and fixed any errors you can go ahead and (re)start Centreon Engine.
Starting and Stopping Centreon Engine¶
There’s more than one way to start, stop, and restart Centreon Engine. Here are some of the more common ones ...
Always make sure you verify your configuration before you (re)start Centreon Engine.
On CentOS, Centreon Engine provides an init script called centengine that should have been installed in /etc/init\*.d/. The script can be used like this as a superuser (root):
$ /etc/init.d/centengine <operation>
Where operation is one of:
|start||Start Centreon Engine if it is not already running.|
|stop||Stop Centreon Engine if it is running.|
|restart||Stop and restart Centreon Engine if it is already running, otherwise start it.|
|try-restart||Restart Centreon Engine if it is already running.|
|reload||Cause the configuration to be reloaded without actually stopping and restarting the service. Warning : the use of this feature is highly discouraged.|
|force-reload||Similar to try-restart.|
|status||Print the current status of the service.|
On Ubuntu, Centreon Engine provides an upstart configuration file called centengine.conf that should have been installed in the /etc/init\*/ directory. Starting and stopping the daemon should be as simple as:
$ start centengine # Start Centreon Engine $ stop centengine # Stop Centreon Engine
Please refer to the initctl manpage for the full list of operations available.