1 .\" Hey, EMACS: -*- nroff -*-
2 .\" First parameter, NAME, should be all caps
3 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
4 .\" other parameters are allowed: see man(7), man(1)
5 .TH OMD 8 "August 7, 2010"
6 .\" Please adjust this date whenever revising the manpage.
8 .\" Some roff macros, for reference:
9 .\" .nh disable hyphenation
10 .\" .hy enable hyphenation
11 .\" .ad l left justify
12 .\" .ad b justify to both left and right margins
13 .\" .nf disable filling
14 .\" .fi enable filling
15 .\" .br insert line break
16 .\" .sp <n> insert n+1 empty lines
17 .\" for manpage-specific macros, see man(7)
19 omd \- admin interface for OMD, the Open Monitoring Distribution
26 .B OMD - the Open Monitoring Distribution
27 is something really new. OMD bundles existing open source software to
28 ease the installation procedure of Nagios and many important addons
29 like NagVis, PNP4Nagios, rrdtool, nagios-plugins, Check_MK,
30 MK Livestatus, Dokuwiki, NSCA, check_nrpe and others.
35 - multiple versions of OMD installed in parallel
37 - multiple instances of Nagios running in parallel (so called "sites")
40 .\" TeX users may be more comfortable with the \fB<whatever>\fP and
41 .\" \fI<whatever>\fP escape sequences to invode bold face and italics,
43 \fBomd\fP is the administration interface for creating and maintaining
44 sites within OMD - the open monitoring distribution.
48 Show short summary of available commands.
50 .B omd version [--bare, -b] [SITE]
51 Show the default version of your OMD installation. OMD supports
52 multiple versions to be installed in parallel.
53 The option \fB-b\fP or \fB--bare\fP reduces the output to the plain
54 version number (for easier parsing in scripts). If you specify the name
55 of a site then that site's version is being displayed instead of the
58 .B omd versions [--bare, -b]
59 Show a list of all installed versions of OMD. The option \fB-b\fP or \fB--bare\fP
60 makes the output leave out a hint to the default version and easier parseable by
63 .B omd setversion [VERSION]
64 Sets the default OMD version to be used for new sites. Can be called with a target
65 version as optional argument or without argument to get a menu of available versions displayed.
67 This mainly updates the symlink \fB/omd/versions/default\fP. On debian based distributions
68 it calls update-alternatives to change the default versions. In this case there is a special
69 option \fBauto\fP available to let update-alternatives choose the default OMD version.
72 Prepare operating system for OMD. This includes installing all software
73 packages from your linux distribution that the components of OMD need
74 to run properly. You need to make sure that a package installation via
75 aptitude/zypper/yum is possible.
77 After installing missing packages a group \fBomd\fP will be created,
78 some Apache modules will be activated, the init script \fB/etc/init.d/omd\fP
79 will be activated and the SUID bits for some Nagios plugins will be
80 correctly configured (for the group omd).
82 \fBNote:\fP If you have installed OMD via RPM or DEB and have installed
83 all packages the omd package depends on, no \fBomd setup\fP is neccessary.
86 This deletes all software and data of OMD and its sites. That command is mainly used
87 for trying out OMD or testing the installation of OMD. Be aware that
88 all your monitoring configuration and data will be lost!
90 Note: Do not use \fBomd uninstall\fP if you've installed omd via RPM or DEB.
91 Better remove all sites via by using \fBomd rm\fP and remove the RPM/DEB
94 .B omd sites [--bare, -b]
95 Show a list of all sites and the version of OMD each site uses. If you specify
96 the option \fB-b\fP or \fB--bare\fP, then the output leaves out hints to the
97 versions, so it is better parseable by scripts.
99 .B omd create [OPTIONS] SITE
100 Create a new site. The name of the site must be at most 16 characters
101 long and consist only of letters, digits and underscores. It must not
104 OMD creates an operating system user and group with the name of the
105 site. No user or group with that name must exist prior to the site creation. Then a
106 directory \fB/omd/sites/\fPSITE will be created and used as the new
107 user's home directory.
109 You need root permissions for creating a new site.
111 After creating a new site you can do a \fBsu - \fPSITE and start
112 the site with \fBomd start\fP.
114 The following options can be used:
116 \fB-u UID\fP Force a specific user id for the new user
118 \fB-g GID\fP Force a specific group id for the group of the new user
120 \fB--no-init\fP Omits the population of the site's home directory and the integration into
121 the system Apache (/omd/apache/SITE.conf will be empty).
123 \fB--apache-reload\fP Issue a reaload of the apache process instead of the default restart
125 \fB-t SIZE\fP By default the tmpfs of the site is created to allocate 50% of
126 the available RAM at max. When providing the \fB-t\fP option together with the SIZE
127 given as absolute value of e.g. \fB500M\fP or percentage value like \fB10%\fP the
128 maximum size of the tmpfs can be changed.
131 .B omd init [OPTIONS] SITE
132 Initializes a site that has been created with \fBomd create --no-init\fP.
133 This includes populating the site's home directory with the default
134 configuration files and enabling the site (see \fBomd disable\fP). Afterwards
135 the site is in the same state as after an \fBomd create\fP without \fB--no-init\fP.
137 The following options can be used:
139 \fB--apache-reload\fP Issue a reaload of the apache process instead of the default restart
142 .B omd [-f, --force] rm [OPTIONS] SITE
143 Remove a site and all of its data. This includes deleting the
144 directory \fB/omd/sites/\fPSITE and removing the system user
145 and group of that site. This - of course - needs root permissions.
147 The following options can be used:
149 The option \fB--kill\fP will automatically kill all processes that
150 use the temporary filesystem of the site before unmounting it.
151 Otherwise the unmount and the removal of the site will fail.
153 \fB--apache-reload\fP Issue a reaload of the apache process instead of the default restart
156 .B omd disable [--kill] SITE
157 Disable a site. First the site will be stopped, if it is running.
158 Then the tmpfs will be unmounted and the site will be made unknown
159 to the global Apache server (by emptying the file /omd/apache/SITE.conf
160 and restarting Apache). You cannot do any init-action like start and
161 stop on a disabled site. Disabled sites will be skipped during
162 system boot or a manual call to \fB/etc/init.d/omd\fP.
164 Disabling a site brings OMD into a state where the sites home directory
165 \fB/omd/sites/SITE\fP is not being used or referred to by any process
166 or program. It can safely be unmounted. This is convenient in
167 situations where the site is clustered and the site's home directory
168 shall be moved to another cluster node.
170 Since unmounting the tmpfs will only be possible if no process
171 is using it, you can specify \fB--kill\fP to automatically kill
172 all such processes before the unmount. This is especially useful if
173 omd disable is used in cluster-failover scripts.
175 Disabling a site needs root permissions.
179 Enables a formerly disabled site. The site is not started. This command
180 needs root permissions.
183 .B omd mv [OPTIONS] SITE NEWNAME
184 Rename a site. The site must be stopped. the NEWNAME must be a valid
185 site name as described in "omd create". Root permissions are needed.
187 The following options can be used:
189 \fB-u UID\fP Force a specific user id for the new user
191 \fB-g GID\fP Force a specific group id for the group of the new user
193 \fB--conflict=HOW\fP non-interactively resolve merge conflicts. See
194 section about \fBomd update\fP for details.
196 \fB-t SIZE\fP By default the tmpfs of the site is created to allocate 50% of
197 the available RAM at max. When providing the \fB-t\fP option together with the SIZE
198 given as absolute value of e.g. \fB500M\fP or percentage value like \fB10%\fP the
199 maximum size of the tmpfs can be changed.
202 .B omd cp [OPTIONS] SITE NEWNAME
203 Make a copy of a site. A new site with the name NEWSITE will be created
204 as an exact copy of SITE. All occurrances of SITE will be replaced by
205 NEWSITE in the sites configuration files.
207 The following options can be used:
209 \fB-u UID\fP Force a specific user id for the new user
211 \fB-g GID\fP Force a specific group id for the group of the new user
213 \fB--no-rrds\fP Do not copy any performance data from the past. This
214 includes RRD and XML files created by PNP4Nagios as well as journal
215 files from the RRD caching daemon. This option usually greatly speeds
218 \fB--no-logs\fP Do not copy any logfiles from the past. This
219 include the Nagios logfiles, which bear the historical events. While
220 this does speed up the copying, the new site will have no history
223 The option \fB-N\fP or \fB--no-past\fP combines both \fB--no-rrds\fP and \fB--no-logs\fP.
224 This is very useful especially for copies that are created for testing
227 \fB--conflict=HOW\fP non-interactively resolve merge conflicts. See
228 section about \fBomd update\fP for details.
230 \fB-t SIZE\fP By default the tmpfs of the site is created to allocate 50% of
231 the available RAM at max. When providing the \fB-t\fP option together with the SIZE
232 given as absolute value of e.g. \fB500M\fP or percentage value like \fB10%\fP the
233 maximum size of the tmpfs can be changed.
236 .B omd [-f, --force] [ -V VERSION ] update [ --conflict=HOW ] SITE
237 Update SITE to the current default version of OMD or to the version
238 \fBVERSION\fP, if the option \fB-V\fP is specified. The default version is
239 usually the version that was installed most lately. It can be changed
240 with \fBomd setversion\fP.
242 Those configuration files of the site that were initially created
243 will be updated if the new version brings changes in these files. OMD tries hard to
244 merge your changes with changes due to the new version but might need your
245 help in doing so. If a merge conflict occurs, you will be asked for an
246 interactive resolution. Note: OMD does \fBno\fP data migration in user-created
249 The option \fB-f/--force\fP will skip asking whether the user is sure to
250 update. If you have more than two versions of omd installed, you should
251 also specify \fB-V\fP if you want to avoid user interaction.
253 With \fB--conflict\fP (in addition to \fB-f\fP and \fB-V\fP) you can make
254 the whole update process non-interactive. There are four possible arguments
257 .B --conflict=keepold
258 Whenever your local changes cannot be merged with changes introduced by the
259 target version in a file , i.e. when a merge conflict occurs, then keep the current contents
260 and permissions of the file unchanged (this is the same as the option \fBr\fPestore
261 in the merge dialog or \fBk\fPeep in the dialog for conflicts in permissions and file
264 .B --conflict=install
265 In case of a merge conflict install the default file of the target version and
269 In case of a merge conflict abort the update. Please note that currently there is
270 no roll back (yet). Files already updated stay updated. The file that caused the
271 conflict will contain merge indicators (>>>>>> and <<<<<<). The version will not
275 This is the default behaviour of interactive conflict resolution.
278 .B omd [-f, --force] start [SITE] [SERVICE]
279 Start a site, i.e. start all activated daemons and services of a site.
280 If you call this as root, you need to specify the site to
281 be started. If you do not specify a site, then all sites with AUTOSTART=on
282 will be started, or all sites at all, if you specify \fB-f\fP or \fB--force\fP.
283 If you call this as site user, no site must be specified.
284 The current site will be started.
286 If you add the name of a service, e.g. \fBnagios\fP, then only that
287 service is being started. If being called as root, a service can only
288 be specified if also a site is specified.
290 .B omd stop [SITE] [SERVICE]
291 Stop a site. See \fBomd start\fP for details. This stops also sites where
294 .B omd [-f, --force] restart [SITE] [SERVICE]
295 Restart site. See \fBcmd start\fP for details.
297 .B omd [-f, --force] reload [SITE] [SERVICE]
298 Reload services of site(s). That is the same as calling all of the sites
299 init scripts with the option \fBreload\fP. Refer to \fBomd start\fP for
300 how to specify sites.
302 .B omd status [SITE] [SERVICE] [-b,--bare] [--auto]
303 Show status of site(s). Refer to \fBomd start\fP for
304 how to specify sites.
306 If this is called for one specific site, then the exit code is as follows:
307 \fB0\fP if the site is running, \fB1\fP if the site is stopped and \fB2\fP
308 if the site is partially running (some services running, some stopped).
310 The option \fB-b\fP or \fB--bare\fP produces a machine-readable output
313 If you add the option \fB--auto\fP then only the status of those sites will
314 be displayed, that are set to {AUTOSTART} = {on}.
316 .B omd config [-f, --force] [SITE] [set|show] [VARIABLE] [VALUE]
317 This command is used to view and change the configuration of a site. Each
318 site has a list of configuration variables. Those variables configure
319 how the addons of the site should work together. Optional addons can be
320 switched on and off. TCP portnumbers for externel access can be configured.
322 \fBomd config\fP [SITE] \fBshow\fP outputs the current settings of
323 all variables of a SITE. If you call this as root, you have to specify
324 which SITE to inspect. If you call \fBomd\fP as site user, you have to
327 \fBomd config\fP [SITE] brings you into the interactive configuration
328 mode where variables can be viewed, are explained and can be changed.
329 The site must be stopped for configuration changes.
331 Setting and querying variables in batch mode can be done with
333 \fBomd config [SITE] set VARIABLE VALUE\fP
335 \fBomd config [SITE] show VARIABLE\fP
337 The option \fB--force\fP will automatically stop the site in case
338 it is running before the config change is done and start it afterwards
342 .B omd [-v] diff [RELBASE] [-b, --bare]
343 Shows the differences of files in the current site compared to the files
344 delivered with the omd version used by the current site.
346 Without the optional RELBASE argument it lists changes in ALL files of the
347 site. The RELBASE argument may contain a relative path to the sites root
348 directory to filter the scope of the diff.
349 It is also possible to give a file/link as RELBASE path. In this case only the
350 information for this file are shown.
352 The command lists files which meet at least one criteria: modified content, changed
353 types, modified permissions, modified owner, deleted files.
355 If you specify the option \fB-b\fP or \fB--bare\fP, then the output leaves out things
356 to make the output more human readable, so it is better parseable by scripts.
358 This command also handles the global option \fB-v\fP or \fB--verbose\fP. It shows the
361 .B omd umount [--kill] [SITE]
362 Unmounts the ramdisk filesystem (tmpfs) of the given or all sites if no SITE option given.
364 The ramdisk can only be unmounted when a site is stopped and no processes are currently
365 using it (have a directory in it as current directory are have an open file in it).
366 If you specify \fB--kill\fP, then omd will kill processes using the filesystem using
369 .B omd backup [OPTIONS] [SITE] [-|TARBALL_PATH]
370 Creates a backup tarball containing the whole site. When executing this command as root,
371 you need to specify the name of the site, otherwise your current site will be used.
373 You need to provide either a path where the tarball will be created or specify \fB-\fP
374 for streaming the tarball to stdout.
376 The following options can be used:
378 \fB--no-rrds\fP Do not copy any performance data from the past. This
379 includes RRD and XML files created by PNP4Nagios as well as journal
380 files from the RRD caching daemon. This option usually greatly speeds
383 \fB--no-logs\fP Do not copy any logfiles from the past. This
384 include the Nagios logfiles, which bear the historical events. While
385 this does speed up the copying, the new site will have no history
388 The option \fB-N\fP or \fB--no-past\fP combines both \fB--no-rrds\fP and \fB--no-logs\fP.
389 This is very useful especially for copies that are created for testing
392 The site needs to be stopped to be able to create the backup. During the backup the
393 ramdisk filesystem (tmpfs) of the site will be unmounted. It's contents are not saved
396 .B omd restore [OPTIONS] [SITE] [-|TARBALL_PATH]
397 Restores a backup which was previously created with \fBomd backup\fP. This command is
398 only available as root user at the moment.
400 You need to provide either a path where the backup tarball is located or specify \fB-\fP
401 for reading the tarball from stdin.
403 When you specify no \fBSITE\fP the restore will be made with the original site name.
404 If you like to restore the site with another name, you can specify the new name with
405 by setting the \fBSITE\fP argument.
407 You can either restore a backup to overwrite an existing site using the \fB--reuse\fP
408 option. Together with the \fB--kill\fP option, the site will be stopped and cleaned up
409 before applying the restore.
411 Additionally the following options can be used:
413 \fB--apache-reload\fP Issue a reaload of the apache process instead of the default restart.
415 \fB-u UID\fP Force a specific user id for the new user
417 \fB-g GID\fP Force a specific group id for the group of the new user
419 \fB--conflict=HOW\fP non-interactively resolve merge conflicts. See
420 section about \fBomd update\fP for details.
422 \fB-t SIZE\fP By default the tmpfs of the site is created to allocate 50% of
423 the available RAM at max. When providing the \fB-t\fP option together with the SIZE
424 given as absolute value of e.g. \fB500M\fP or percentage value like \fB10%\fP the
425 maximum size of the tmpfs can be changed.
428 .BR http://www.omdistro.org
431 omd was written by Mathias Kettner <mk@mathias-kettner.de>.
432 See /usr/share/doc/omd/TEAM for contributors to omd.