How to create and use server probes

You can define triggers and actions and combine them into probes according to your needs. This page shows you how.

How probes work

Probes allow you to automatically perform certain predefined actions when the amount of hosting resources (CPU, disk, bandwidth…) used by your server passes a threshold value you set. This will allow you to, for example:

  • receive a notification (by e-mail, IRC, XMPP, ICQ…);
  • increase or decrease the amount of resources allocated to the server;
  • reboot the server

It is possible to configure multiple actions for the same probe, and actions are saved and can be reused on other probes.

Create and configure the probe

To create a new probe, follow these steps:

  1. Go to the control panel of the server in question
  2. In the “Monitoring” section, click on “Manage”

  1. Click on “Add a probe” to get to the parameters screen:

The available parameters are:

  • Probe name: Select a name; this will appear in your list of probes.
  • Type of target: The resource you want to monitor. You can monitor the resources shown on the server performance graphs (CPU, disk, and bandwidth). It is not currently possible to use RAM usage as a trigger.
  • Name of the target: If your server has more than one CPU, interface or disk, select the one you want to monitor here.
  • Type of monitoring: Choose the type of trigger you want, such as exceeding (or dropping below) a certain threshold or level of activity.
  • Value (X): This is the threshold beyond (or below) which your alert will be triggered.
  • Trigger time (t1): Choose the duration beyond which your predefined actions will be executed.
  • Trigger time (t2): Choose the duration for which the resources must fall back under the threshold in order for the trigger to be deactivated.

Create a new action

In this section, you will select a predefined action from a dropdown menu.

To create a new action, click “Create.”

  • Action name: Choose a unique and descriptive name for the action; this will be chosen from a dropdown list from the probe creation page.
  • Type of action: Choose the type of action to be performed (Notification, increase or decrease hosting resources, or reboot the server):

Notifications

Notifications are purely informative.

  • Notification protocol: This is the protocol that will be used to alert you. You can choose to be notified by email, IRC (Freenode only), XMPP message, etc.
  • Contact's Gandi handle: The handle or email address to which the notification should be sent.

Temporary resource modification

Modifying resources allows you to increase or decrease the quantity of resources allocated to the server for a period of 1 to 24 hours. This is particularly useful in cases of brief but drastic changes in the CPU, RAM or bandwidth usage of your server.

This only works on Classic mode servers. It will have no effect on a VPS in AI mode, because its configuration would have to be resubmitted in order for the change to take effect.

The modification itself is defined by the following parameters:

  • Resource to modify: Choose the hosting resource you want to be adjusted by this action.
  • Current value: The current amount allocated to the server of the above hosting resource.
  • Value to define: Choose the absolute value (e.g. the total amount to be allocated, including the current value). Keep this in mind if you make manual modifications later to the server's allocated resources!
  • Duration of the modification: How long you want the value defined above to be applied to the server.
  • Additional cost to anticipate: This is how much you can expect to be charged for the action. The price is calculated according to “on-demand” rates.

Server reboot

Select this option to reboot the server automatically if the probe is triggered.

Special case: bandwidth example

Under the new billing system (introduced May 2013), bandwidth is billed according to the total consumption of all interfaces owned by a given Gandi handle. You can find out the current consumption of all your servers:

Automatically limit the amount of data sent by a server

In order to prevent an unexpected spike in bandwidth usage on a given server, you can use a probe to impose a temporary limit on an overcharged interface's outbound traffic.

To do so, create a probe with the following parameters:

  • Type of target: Network
  • Name of the target: Interface # (Note that in the case of multiple interfaces, the action will always be applied to interface 0!)
  • Statistic to monitor: Outbound traffic
  • Type of monitoring: Exceeding a threshold
  • Value (X): Choose the amount of bandwidth in Mb/s beyond which the probe will be triggered. (A continuous stream of data sent for one hour at 5Mb/s corresponds to about 2.2 GB of data being sent.)
  • Trigger time (t1): Your choice.
  • Time when returning to normal (t2): Your choice.

Then, create an action to throttle the bandwidth on the interface:

  • Type of action: Resource modification
  • Resource to modify: Bandwidth
  • Value to define: Choose a new value (in Mb/s) to be allocated to the interface according to your needs.
  • Duration of the modification: Your choice.
Last modified: 06/03/2013 at 18:26 by Thomas S. (Gandi)