VERSION INFO ------------ Date of release : May 13, 2003 Version number: 2.0.0 stable Status: Check CHANGELOG for more info I. DISCLAIMER ------------- I hereby deny any responsability for the use of my freeware program. It is written in the best intentions and within the bounds of my little knowledge. In short, "it works for me, and if it don't for you, then thats too bad" I wrote this tool because I needed a very simple network monitor, and thats what it is, don't expect any miracles from this thing. Sincerely yours, Jan Uyttersprot jan@uyttersprot.com II INSTALL ---------- a) TOOLS The default configuration include tcp and udp portscans to act as service scans. Nmonitor therefor relies on nmap, a portscanning tool made by Fyodor . The newest version of nmap can be obtained from http://www.insecure.org/nmap/. Location of nmap used in the plugins is /usr/bin/nmap. Make links accordingly, or change the plugin scripts, but later more on plugins. * NOTE * For some operations (UDP service response check) root privileges are required to nmap to do udp service scan, therefore, as my monitoring machine is not accessible by any other users then me, I have a SUID root copy of nmap. I know some ppl will disagree with my great plan, but I dont care:) b) WEBSERVER you need a working installation of any webserver that does the job for you. Personally I use apache, with a working PHP loadable module with MySQL support blah blah, what we will not discuss here how to get that working. I just suppose it works. You allso need a commandline version of PHP, with mysql support, because the service poller is in PHP. c) DATABASE Assuming all your stuff works, it's time to create the database. in the base directory you find 3 scripts. But first logon to your database and create a database called nmonII. the 'create_tables.sql' script creates all tables with no plugin configuration. dont use this if you dont want to setup everything yourself. Instead, use 'nmonitor2.default_tables.sql'. *** NOTE *** that this script defaults to a webserver location of /usr/local/apache/htdocs/nmonitor2/plugins for its plugins. If you have it in /var/www or elsewhere, change the lines accoringly before importing the tables. Dont worry, you can also modify them via the config gui. Create a user with access to the nmonII DB, as described in 'create_user.txt' If you dont like to use default pwd's for your installation, you just need to change the variables in 'setup/security.php' accordingly. That should all be pretty straightforward. d) PLUGINS A word on plugins. The basic checks delivered with nmonitor are ping, udp and tcp scan. With these allready a lot of monitoring can be accomplished. But you could allso install an oracle sql client on your box, and write some tablespace monitoring scripts, that can be called from within nmonitor. Thats what I use nmonitor for anyway, but since they are way too customized to be of benefit to someone else, I didn't include them. Anyway, you sortof get the idea of whats possible. Ive included a template for writing scripts with boolean result in the plugin directory. The template describes how it should work. For example, the ping check required 1 parameter, the IP address, witch is gathered from checks database. parameters are passed 1,2,3... You can send up to 6 parameters. (Ive encountered a max of 4 with complex sql scripts, so I figured 6 should be plenty) e) ALARMS Same goes for the alarms. Ive just included one script to send email to some, but I personnly also use snmp trap sending scripts, SMS gateways, etc. Alarms can be enabled on a per check basis, so the less important the check is, the less 'noise' it makes :) Ive inluded possibility to add up to 8 different alarm scripts. f) FINISHING UP Once you've installed everything, you can point your browser to http://yourserver/nmonitor2/ and start configuring your services. once it looks like you like it, you should install a cronjob executing the poller.php script. Dont forget you have to run this trough php, so you need to execute : 'php /usr/local/apache/htdocs/nmonitor2/poller.php' in my case. In cron this would look like : * * * * * /usr/bin/php /usr/local/apache/htdocs/nmonitor2/poller.php > /dev/null 2>&1 or whatever timeframe you like ADVICE !! --------- - nmonitor should be platform independant (ahem:)), as long as all required tools are present. Therefore its good practice to FIRST manually check all the plugin scripts from the commandline, to check if they do what they have to do. Peronally I have experienced problems with the ping command implementing nmonitor on solaris, since some parameter used in the script, is not available on solaris ping. - If, for some odd reason, the poller.php script should abort prematurely, the database will be 'locked', means that the table poll will have entry causing it to be locked. just 'DELETE FROM poll;' and there you go. This locking stuff is there to avoid hickups of your server in case you polling loop takes longer then the given time in cron. If a previous polling is still going on (db locked) the poller.php will abort. I think about adding some kinde of doodad in the gui to check how long it takes by average to perform a complete polling loop. - THOROUGHLY CHECK YOUR CUSTOM SCRIPTS !! If they cause trouble, and php chokes on your scripts nmonitor will stay locked and your monitoring will be dead !! Im speaking from experience here:) That's it for now. Cheers, Jan