CONFIG
======

All NagiosGrapher Configuration can be done by altering the ngraph.cfg. The 
first part - only the "config" paragraph configures NagiosGrapher itself. All 
the rest configures the graphs.

config PARAGRAPH
----------------

an example:

define config {
		# location of fifo for interprocesscommunication
        pipe                    /var/lib/nagios/ngraph.pipe
        
        # where to store the rrd files  	
        rrdpath                 /var/lib/nagios/rrd/
        
        # SINGLE (Nagios V.1.x) or MULTIPLE 
        serviceext_type         MULTIPLE
        
        # only for SINGLE
        serviceextinfo          /etc/nagios/serviceextinfo.cfg
        
        # only for MULTIPLE
        serviceext_path         /etc/nagios/serviceext
        
        # url of graphs.cgi script
        url                     /nagios/cgi-bin/graphs.cgi
        
        # path of main nagios configuration
        nagios_config           /etc/nagios/nagios.cfg
        
        # path of ngraph logfile
        log_file				/var/log/nagios/ngraph.log
        
        # log level
        log_level				127 
        }
        
The different log levels are:
-----------------------------
	1	recognied services and their values
	2	not recognized values
	4	program stati
	8	serviceext
	16	rrd stati
	32	pipe input
	
any combination is falid.

Do not forget to configure logratet for this logfile. Depending on your log 
level the file grows very very fast and NagiosGrapher does not have its own
logration.


Attention Nagios V 1.x Users!
-----------------------------
Because Nagios before V 2 doesn't support recursive configuration NagiosGrapher
must store all serviceextinfos in a single file. So use:

		serviceext_type			SINGLE
		serviceextinfo			/etc/nagios/servicextinfo.cfg
		

For better performance and administration Nagios V.2 Users should use 

		serviceext_type			MULTIPLE
		serviceext_path			/etc/nagios/servicext
		

ngraph PARAGRAPHs / basic parameters
------------------------------------

With these paragraphs the graphs are defined. Each paragraph define a single 
value. Each service can provide any number of values. Let's start with a 
simple example - the output of chec_procs (eg. "OK - 30 processes running").

define ngraph{
        service_name            lx-proc
        graph_log_regex         ([0-9]+) proc
        graph_value             processes
        graph_units             processes
        graph_legend            running processes
        rrd_plottype            LINE2
        rrd_color               00a000
        }

This define will lead to a simple line graph for all services with "lx-proc" in
their name. 

Each parameter line in-depth:

- service_name
With the help of this regexp/part NagiosGRapher will identify the individual
services. eg. "lx-procs" will match on "lx-procs", "lx-procs samba", 
"all lx-procs", ...

- graph_log_regex
This defines the value to cut out from the service output. Only the value 
inside the brackets is used. Please be aware that every trailing whitespace
(except newline) IS USED FOR MATCHING. 

- graph_value
Each value must have its own name which is used to define the value inside the
rrds

- graph_units
This is graph's label of the x-axis 

- graph_legend
The graph's legend

- rrd_plotttype
Possible values are LINE{1|2|3}, AREA or STACK. For more details have a look at
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/manual/rrdgraph.html

- rrd_color
Obvious the color of the graph


Additional (advanced) parameters
--------------------------------

- graph_perf_regex 
As graph_log_regex but for performancedata

- hide
Can be yes or no. This Parameters hide the value from the graph. Usefull for 
CDEFs (se below).

- page
Sometimes a plugin delivers values you want to graph but not to be shown in the
same graph. Then you can arrange the values on different graphs. (Have a look 
inside the ping example).

- type
Default VALUE but also can be CDEF,GPRINT and HRULE (see below)

- rrd_type
By default GAUGE but can be all COUNTER,DERIVE and ABSOULTE. For more details
please read the "DS" paragraph on 
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/manual/rrdcreate.html


Other types than GAUGE
----------------------

This types only affect the painting not the collecting of the data

- CDEF
Used to calculate another value during ploting the graph. As additional 
parameter you need "graph_calc". Because this parameter is directly forwarded
to the rrdtool it use the same syntax. For a tutorial have a look at 
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/tutorial/rpntutorial.html or
the the "lx-load" example. 

- HRULE
just paints a simple horizontal line for the "hrule_value" inside the graph. 
See the examples

- GPRINT
Get the last/average/... value of a graph and print it below the legend. For 
the possible functions check 
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/tutorial/ 

