NEXSM
 
REQUISITES
You need the following in order to run NEXSM:
 
  1.  Java 1.5.0 or better
  2.  A php 4.3.10 or better enabled web server (tested with the option memory_limit = 16M) but should work with less depending of your monitoring installation size.
  3.  Quick and Dirty XML Parser you can download an already compiled jar in here (original qdxml article)
INSTALLation
You may want to download the entire file (the .zip one) the first time you are going to install NEXSM, it contains the php files for polling information from nagios status.log, objects.cache files and for NEXSM configuration files.
 
In order to run NEXSM you need the libraries mentioned above, and the php scripts that for now are only in the (.zip file in the downloads section) also that file contains configuration files examples for you to understand better and change a little NEXSM's behavior.
 
I encorage you to sign all the jar files (to grant all the permissions to the application) using the jarsigner utility, (more information on signing jar files and keytool).
 
Copy the directory etc/nagios/nexsm to your nagios config directory (usually /etc/nagios/) if you decide to change this you should change the configuration php file in html/php/config/config.php (more on that later) and copy the contents of htdocs to somewhere in your web server, change the index.php according to your needs.
Configuring the PHP Scripts
All the php configuration is done in the file config.php located in the directory php/config, you can safely modify the vars at the beginning until the line that says:
 
/* -----------------------------------------------------------
 Do not modify after this line unless you know what you are doing
   ----------------------------------------------------------- */
 
/etc/nagios/nexsm
The directory /etc/nagios/nexsm/ and the file mapconfig.xml should be readable by the user running the web server.
 
The directory /etc/nagios/nexsm/map should be writable and readable by the user running your web server, in order to access the files for the map views configuration.
 
(this directory depends of the value of $_mapConfigPath var defined in the file php/config/config.php)
 
status.log & objects.cache Files
 Usually those two files are located in /var/log/nagios, if your nagios web interface is running correctly maybe you don't have to change anything to access those files, but just in case, check that the user running the web server, is able to read those files, don't change permissions or owners here, because they will probably be changed back later, the nagios user is usually a member of the group running the web server.
 
If these files are not located in /var/log/nagios then edit the file php/config/config.php to reflect where your files are, you will see that is fairly simple to understand the config file.
 
The JNLP File
The jnlp file or better yet the php that generates the jnlp file guess some of the NEXSM’s parameters using the host, protocol and port its called with if your installation doesn’t work with the guessed values then you may want to change that in the nexsm.php
 
These parameters are nagiosbase, defaultpuller, defaultpullerparam and icons_url
The basic idea here is that nagiosbase will be used in any relative links in the configuration.
 
The default puller is the class name of the puller used to get the configuration, and everything else (in the future it will be the one used for only NEXSM configuration or everything if there’s no other puller defined in the configuration)
 
The codebase (at the beginning) is used as the java web start base URL, any relative link in the file (other than the parameters) uses the codebase to complete the URL, this value is generated by the php using the protocol, host and port used to access the php file.
 
Example:
You are accessing the php file using the following URL:
 https://www.mydomain.com:8080/nexsm/nexsm.php
 
The codebase will be https://www.mydomain.com:8080
 
So the resources links (the jar files) will be in the following form:
https://www.mydomain.com:8080/nexsm/jar/nexsm.jar
 
Remember the relative links used in the configuration (mapconfig.xml) and nexsm.php parameters use nagiosbase as the base url, which may differ from the codebase generated by the php.
 
Check out the INSTALL file (in the .zip file for the release) for more information.