File: verifyconfig.html

package info (click to toggle)
nagios2 2.6-2%2Betch5
  • links: PTS
  • area: main
  • in suites: etch
  • size: 6,856 kB
  • ctags: 4,475
  • sloc: ansic: 64,870; sh: 4,676; makefile: 787; perl: 722
file content (85 lines) | stat: -rw-r--r-- 3,922 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Verifying Your Nagios Configuration</title>

<STYLE type="text/css">
<!--
        .Default { font-family: verdana,arial,serif; font-size: 8pt; }
        .PageTitle { font-family: verdana,arial,serif; font-size: 12pt; font-weight: bold; }
-->      
</STYLE>

</head>

<body bgcolor="#FFFFFF" text="black" class="Default">

<p>
<div align="center">
<h2 class="PageTitle">Verifying Your Nagios Configuration</h2>
</div>
</p>
<hr>

<p>
<strong><u>Verifying The Configuration From The Command Line</u></strong>
</p>

<p>
Once you've entered all the necessary data into the <a href="config.html">configuration files</a>, its time to do a sanity check. Everyone make mistakes from time to time, so its best to verify what you've entered.  Nagios automatically runs a "pre-flight check" before before it starts monitoring, but you also have the option of running this check
manually before attempting to start Nagios.  In order to do this, you must start Nagios with the <b>-v</b> command
line argument as follows...
</p>
<p>
<strong><font color="red">/usr/local/nagios/bin/nagios -v &lt;main_config_file&gt;</font></strong>
</p>

<p>
Note that you should be entering the path/filename of your <i>main</i> configuration file (i.e. <i>/usr/local/nagios/etc/nagios.cfg</i>) as the second argument.  Nagios will read your <a href="configmain.html">main configuration file</a> and all <a href="configobject.html">object configuration files</a> and verify that they contain valid data.
</p>

<p>
<strong><u>Relationships Verified During The Pre-Flight Check</u></strong>
</p>

<p>
During the "pre-flight check", Nagios verifies that you have defined the data relationships necessary for 
monitoring.  Objects are all related and need to be setup properly in order for things to run.  This is a list of the basic things that Nagios attempts to check before it will start monitoring...
</p>

<p>
<ol>
<li>Verify that all contacts are a member of at least one contact group.
<li>Verify that all contacts specified in each contact group are valid.
<li>Verify that all hosts are a member of at least one host group.
<li>Verify that all hosts specified in each host group are valid.
<li>Verify that all hosts have at least one service associated with them.
<li>Verify that all commands used in service and host checks are valid.
<li>Verify that all commands used in service and host event handlers are valid.
<li>Verify that all commands used in contact service and host notifications are valid.
<li>Verify that all notification time periods specified for services, hosts, and contact are valid.
<li>Verify that all service check time periods specified for services are valid.
</ol>
</p>

<p>
<strong><u>Fixing Configuration Errors</u></strong>
</p>

<p>
If you've forgotten to enter some critical data or just plain screwed things up, Nagios 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, Nagios 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 <i>generally</i> be safely ignored, since they are only recommendations and not requirements.
</p>

<p>
<strong><u>Where To Go From Here</u></strong>
</p>

<p>
Once you've verified your configuration files and fixed any errors, you can be reasonably sure that Nagios will start monitoring the services you've specified.  On to <a href="starting.html">starting Nagios</a>!
</p>

<hr>

</body>
</html>