Nodeside testing consists of a script/program deployed on the node to be monitored from which data is regularly collected and analysed by FreeNATS. Data is passed between the node and the server in XML format via HTTP.
Data can either be "pulled" or "pushed" from the node into FreeNATS.
Pulling data involves the script being published via a webserver such as Apache running on the node. The script is periodically requested by FreeNATS, the data processed and alerts etc generated.
Pushing data involves the script being run periodically on the node via a scheduler such as CRON. In this mode the nodeside script connects to the FreeNATS server and HTTP POSTs the data to FreeNATS. In this case though the data is processed immediately (and recorded, test statuses updated etc) alerts are only generated when the node is next analysed by the server (depending on it's interval settings).
Adding Nodeside Testing
To add nodeside testing you need to install and configure the relevant nodeside test script/program for your node environment. You must then enable nodeside testing in the node.edit dialogue. Once this is done you can specify security options and choose to enable/disable pull and push methods.
Once pull is configured you can manually refresh the catalogue of tests provided by the node (or you have to wait until the first push has been completed if using the push method).
If using the pull method you can also set the interval here (though the node will only ever be pulled and processed when the node it due itself for testing so the interval shouldn't be shorter than the node interval as with local tests).
Once tests are in the catalogue they can be added to the node in the node.edit dialogue. You can edit the test to view it's most recent data, select whether it will generate alerts (or just be monitored/recorded) and set any custom evaluators you wish (as with local tests). Tests returning non-numeric output (such as the system time) can be viewed but if recorded or evaluated will always have a zero result.
Once a test is added to the node it will also fail if nodedata arrives which does not contain the test data (i.e. that test fails or is disabled). The node will also have a failed status (and alert) if a pull fails (if it is configured and enabled).
An optional key can be defined (one is automatically generated the first time nodeside testing is enabled) that must be provided by/to the server (dependent on mode) for authoriation. You can also set a single IP address (in the node settings for push delivery and in the nodescript configuration for pull) which is the only host allowed access/post data.
PHP Posix (Linux/UNIX) Nodeside Script
The posix node PHP script is configured through by editing the config.inc.php file in the same directory as the freenats-node.php script. Some of the options you will not have to specify if you are using the pull method (for example the push URL).
There are a number of monitoring types you can enable (true) or disable (false).
When enabled these monitoring types output data as detailed below.
net - Networking
Outputs network device utilisation in the form net.DEVICE.various. The various metrics returned for the interface include total bytes transferred (tx, rx and total) as well as speed calculations (if it was able to use the configured temp files to record previous totals).
disk - Disk Usage
Outputs disk usage in the form disk.DEVICE.various. Metrics returned include usage/free/size (Mb) as well as the % used.
mem - Memory Status
Returns memory metrics such as free/used for memory devices found (usually main RAM and swap)
uptime - Load and User Stats
Returns various figures from uptime such as the 1m, 5m and 15m load averages as well as number of logged in users
systime - System Time
Returns various formats of system time such as seconds past the epoch and a formatted DT string. Also returns seconds past the hour which can be useful to record (if not alert on) as a kind of visual "heartbeat"
proc - Process Information
Returns information on the number of each process name running.
How to use the POSIX PHP Nodeside Script
Please see the POSIX PHP nodeside script howto for more information.
Windows VB Script / WMI Nodeside Script (Highly Experimental)
Returns various pieces of perhaps not-too-accurate or properly timebound information (has that sold it to you?). Once setup provided test data should be fairly self explanitory. See the Win32 nodeside script howto for more information.
Troubleshooting Nodeside Testing
Most of the nodeside tools have the ability to output the XML to screen/file for you to check for validity. You may also see some useful log information if you encounter problems.
See the general troubleshooting section for more information.