This document described the installation and usage of the Nagios XML Engine (NXE).

NXE will run under both Win32 and Unix platforms. A system with Perl installed is the only major requirement. It should either have Nagios running on the same host or have access to the status log and external command files of any Nagios systems you would like to use NXE with. If you want to use NXE in either HTTP GET (URL) mode or XML-RPC mode the system must have Web server capable of running Perl CGIs. 

The transformation functions of NXE are based on the availability of a 3rd party XSLT engine. These are available for free for almost every platform. NXE supports the following XSLT engines:

* libxslt
* sablotron
* xalan 
* xslt
* xt
* saxon

We recommend Sablotron (http://www.gingerall.com/) if you are new to XSLT because it is easy to install on both Win32 & Unix platforms. We will use Sablotron as an example in this file, but the installation steps should be roughly the same regardless of the XSLT engine used. For maximum performance on Unix systems, we recommend using the LibXSLT (http://xmlsoft.org/XSLT/) engine.


INSTALLATION:
-------------

1) Verify Perl is installed correctly.

2) Verify Web server is setup and can handle Perl CGIs properly if you are going to use the XML-RPC or the HTTP GET functionality of NXE.

3) Most XSLT engines require that the Expat processor is installed. If you are going to use XSLT transformations with NXE now is when you should download Expat. Check the documentation of the XSLT engine you are planning on using, but more then likely it uses Expat. Get Expat from http://sourceforge.net/projects/expat .

4) Download & install the XSLT engine you would like to use. Ex: Sablotron from http://www.gingerall.com/ or LibXSLT from http://xmlsoft.org/XSLT/ .

5) This should be in the installation instructions for your XSLT engine, but often users overlook it. After you have installed your XSLT engine (on Unix systems only) you must run the "ldconfig" command.

6) Make sure the XSLT engine is in your path. Test it by trying to run the XSLT engine from the command line in a direcotry it is not installed in.

7) Start up CPAN (or PPM for Win32 users) by typing "cpan" (or "ppm") at a command prompt. Once in the CPAN prompt type:

install xxx

Where xxx is each of the following modules:


		XML::Writer
		XML::Parser
		XML::Writer::String
		Sys::Hostname
		Frontier::RPC2
		XML::XSLT::Wrapper
		CGI

8) Still at the CPAN (or PPM) prompt install the Perl modules for your XSLT engine. For example if you were using Sablotron you would type: "install XML::Sablotron" for LibXSLT it would be: "install XML::LibXML" and then "install XML::LibXSLT". See your XSLT engine documentation for details.

9) Copy the nxe.pl script to a CGI directory of your Web server if you would like to use XML-RPC of HTTP GET modes of NXE.

10) Make script executable chmod +x nxe.pl on Unix systems.

11) NXE uses an editable config file named "nxe.config" (you can change the name) to create aliases for specifying paths to different files (multiple Nagios status logs, XSLT templates, etc..). Alias entries take the form of "status1=/usr/local/nagios/var/status.log" on Unix systems and "HTML1=c:\XSLT\Nag2HTML.xsl" on Win32 systems. See the usage section below and the comments in the nxe.config file for details. 

12) By default NXE will look for the nxe.config file in the same directory it is being run from. This is not a recommended configuration when being used with a Web server. To change the location or name of nxe.config edit the first line of the nxe.pl script (the "$CONFIG_FILE" variable) to point to the correct file.

13) Ensure that the user running NXE can read nxe.config & all files specified in nxe.config. The user should also have ability to write to any Nagios external command files specified in nxe.config.


