Creating custom layout
======================

So how you can create your own layout that fits your system requirements?

- file: config.layout

In the main source tree there's a file called config.layout with the content about:

## Layoutfile

# default layout
<Layout default>
  prefix:			/usr/local/nagios
  nagios_config:		${prefix}/etc/nagios.cfg
  nagios_config_cgi:		${prefix}/etc/cgi.cfg
  nagios_images:		${prefix}/share/images
  nagios_images_logos:		${prefix}/share/images/logos
  nagios_folder_cgi:		${prefix}/sbin
  perl_inc:			/etc/perl
  nagios_contribution:		${prefix}/contrib
  ng_config:			${prefix}/etc
  ng_config_sub:		${ng_config}/ngraph.d
  ng_daemon:			${prefix}/var/nagios_grapher
  ng_srvext_file:		${prefix}/etc/serviceext.cfg
  ng_srvext_dir:		${prefix}/etc/serviceext
  ng_interface_pipe:		${prefix}/var/rw/ngraph.pipe
  ng_logfile:			${prefix}/var/ngraph.log
  ng_pid_file:			${ng_daemon}/nagios_grapher.pid
  ng_rrd:			${prefix}/var/rrd
</Layout>

This is the dir/file layout if you build nagios from scratch with the default settings.

You can simply add a new block with the same parameters:

# default myLayout (Just a comment, maybe snow maybe rain ...)
<Layout myLayout>
  prefix:				The prefix if you want to use this
  						This var will be overwritten if you use the
  						--prefix switch to configure the package

  nagios_config:		The absolute filename of the nagios config
  						${prefix}/etc/nagios.cfg

  nagios_config_cgi:	Yes the same thing with the CGI file
  						${prefix}/etc/cgi.cfg

  nagios_images:		Where are the images of nagios located?
  						${prefix}/share/images

  nagios_images_logos:	${prefix}/share/images/logos

  nagios_folder_cgi:	Now the logos:
  						${prefix}/sbin

  perl_inc:				The Perl include folder for then NagiosGrapher.pm MOD.
  						With Debian wirks this: /etc/perl

  nagios_contribution:	The folder for the C written comm tools and the daemon
  						${prefix}/contrib

  ng_config:			Where would you like to store your grapher config
  						${prefix}/etc

  ng_config_sub:		The directory where the templates to be placed
  						${ng_config}/ngraph.d

  ng_daemon:			A directory for the daemon file (ObjectCache and PID file)
  						!!! IMPORTANT: this have to be a subdirectory
  						If no the collector can not start
  						${prefix}/var/nagios_grapher

  ng_srvext_file:		serviceext file for the serviceextmode SINGLE
						for using with the xed template option in nagios 1.3
  						${prefix}/etc/serviceext.cfg

  ng_srvext_dir:		service ext dir where host seperated configfiles will be placed
  						mode: MULTIPLE for using with nagios above v2
  						${prefix}/etc/serviceext

  ng_interface_pipe:	location of the pipe if you want to use it
  						--with-ng-interface=pipe
  						${prefix}/var/rw/ngraph.pipe

  ng_logfile:			Don't forget the logfile:
  						${prefix}/var/ngraph.log

  ng_rrd:				And at least some folder where the RRD databases are stored
  						${prefix}/var/rrd
</Layout>


	-------------
	--- It's important that all switches in the layout will be given otherwise the
	--- configure script will not work.
	---
	--- This is based on the behavior the user wants to use serviceext and interfaces
	--- and so on ...
	-------------


If you create some usefull layouts, you can send it on the mailinglist.

