Short guide

Please note that nodewatch system is provided as is, without any warranty, expressed or implied.


Please send feedback to feedback [at]

Supported OS

Current version of Nodewatch supports OpenVZ kernels 2.6.18 and 2.6.32.

Important note on 2.6.18 kernel support: starting with version 3.20, running Nodewatch on 2.6.18 kernels is no longer recommended. We suggest that you migrate to 2.6.32.

Supported OS: 64-bit RHEL/CentOS 5.x, 6.x.

Supported Control Panels

Nodewatch does not care about the installed control panel, if any (SolusVM, HyperVM, etc). It is completely independent and will not cause a conflict with any control panel.

Impact on performance

Nodewatch does not use iptables on the host node to track abuse. It does not alter configuration files on the node or on the individual VPS servers. This means that it does not affect your normal operations in any way and is completely transparent to your customers.

We test Nodewatch on a Dual L5520 node with 500 VPS servers running different OS templates and performing random Storage and Network I/O. On this platform, Nodewatch uses approximately 70 MB of RAM and 10-11% of a single CPU core.


You must be root in order to install Nodewatch.


Now open /nodewatch/scripts/nodewatch_config.php and configure the following settings:

// e-mail address for alerts
$admin_email = 'your@email'; 

// your license key, see
$license_key = '1293819230781023'; 

Optional settings:

// set to true to enables SMS alerts
$sms_alerts = true; 

// cell phone for sms alerts; for US/Canada: '555-5555-555'; 

// international example: '+55-555-5555-555' 
// (+55 = country code with "+" prefix)

// multiple numbers example: '555-5555-555,+66-666-6666-666' 
// (up to 3 phone numbers are supported)
$sms_phoneno = '123-4567-890'; 

// change to true to disable scanning customers' VPS for weak root passwords
$disable_nodewatch_passwords = false; 

// From: address for e-mail alerts. If not specified, $admin_email will be used.
$admin_email_from = ''; 

Nodewatch-web section (optional):

// set to true to enable
$nodewatch_web_update_enabled = true; // change to false to disable web updates

// link to update.php, http only
$nodewatch_web_update_url = ''; 
// password for nodewatch-web, must match the password 
// set in config.php of your nodewatch-web installation
$nodewatch_web_password = 'secret'; 

SolusVM integration (optional section):

// set to true to enable
$solusvm_calls_enabled = true; 

// IP address of the SolusVM master
$solusvm_master_ip = '';

// API id must be created in the SolusVM Admin panel, menu: Configuration->Api Access 
$solusvm_master_api_id = 'ididididididididididididididid';    

// API key must be created in the SolusVM Admin panel, menu: Configuration->Api Access
$solusvm_master_api_key = 'keykeykeykeykeykeykeykeykeykey';   

// Numeric Node ID of this physical server. It can be looked up in the SolusVM Admin panel, menu: Nodes->List Nodes
$solusvm_node_id = '2';

After all desired changes are made, save the file and restart nodewatch:


Wait 5 minutes. Now you can watch some statistics.

Watching stats

watch -n 1 cat /tmp/nodewatch_stats

Sample output:

VPS: VE ID (container ID). Matches VE IDs provided by this command:

vzlist -a

CONN: Current number of conntrack sessions for this VPS

SMTP: Current number of outgoing SMTP connections for this VPS

SSH: Current number of incoming AND outgoing SSH connections for this VPS

Avg CPU: Average CPU usage for VPS in % (100% = full 1 core load, 200% = full 2 core load). Averages for 5, 30, 180 and 900 seconds.

Avg I/O: Average I/O (disk) bandwidth for VPS in MiB per second. Averages for 5, 30, 180 and 900 seconds.

Avg packets: Average number of UDP + TCP packets per second (sent + received). Averages for 5, 15, 30, 60, 180, 900 seconds.

Automatic VPS suspension

You should only consider changing default values if default thresholds do not work for you.

Modify if necessary in nodewatch_config.php:

$limit_packets_suspend = 500000
Suspend VPS if it exceeds 500000 packets per second.

$limit_smtp_suspend = 1000
Suspend VPS if it exceeds 1000 simultaneous SMTP connections per second.

$limit_ssh_suspend = 100
Suspend VPS if it exceeds 100 simultaneous SSH connections per second.

$limit_conntrack_suspend = 45000
Suspend VPS if it spawns over 45000 conntrack sessions

An email will be sent to the address provided in nodewatch_config.php file upon automatic suspension. If a phone number is provided in the configuration file, then an SMS notification will be sent to your phone as well.

If SolusVM Master details are provided in the configuration file, Nodewatch will also send a notification to the SolusVM master.

How VPS suspension works

Nodewatch executes the following shell command to suspend a VPS:

vzctl set VEID --disabled yes --save
This prevents VPS from starting, but will not stop it.

After VPS is disabled, Nodewatch removes all IP addresses assigned to the VPS:

vzctl set VEID --ipdel all
This stops all network traffic to/from VPS while VPS is being shut down. Note that this action has temporary effect, no changes to the configuration files are made as no --save parameter is used.

Then Nodewatch stops the VPS:

vzctl stop VEID

How to unsuspend a VPS after an automatic suspension

vzctl set VEID --disabled no --save
You can then start the VPS:
vzctl start VEID

If SolusVM Master details are provided in the configuration file, then you can also unsuspend the VPS directly from the SolusVM Master.


If you need to allow your customer to run mass mailing campaigns, mailing lists, etc, it is quite easy to whitelist their VPS. Simply add their VEID to the following files:

/nodewatch/scripts/smtp_whitelist – for smtp connections

/nodewatch/scripts/ssh_whitelist – for ssh connections

/nodewatch/scripts/conntrack_whitelist – for conntrack connections

To whitelist multiple VPS, add one VEID per line. Starting with version 3.20, changes made to whitelists are applied immediately, there is no need to restart Nodewatch.

Note that you will still get e-mail and SMS alerts even if the VPS is whitelisted.

Weak root password detection

Nodewatch uses John the Ripper to automatically scan your user's VPS for weak passwords. (John is installed automatically during Nodewatch installation, there is no need to install it separately). When a weak password is discovered, it is immediately replaced with a randomly generated password. A message is then thrown onto user's VPS console with new password as well as a record is sent to the syslog inside of the VPS.

Updating to latest version

Invoking this script will update and restart your Nodewatch installation. Allow 2-3 minutes after updating for stats to re-appear.


rm -f /etc/cron.d/vpsantiabuse
rm -rf /nodewatch