How do I set up periodic notifications indicating the host is alive?

How do I create monitor sending periodic alerts when its host is alive?

Q: I need to create a setup which will inform me every 3 hours when a particular host is online. Is it possible?

A: Yes, it is possible; basic connectivity monitor (such as PING, TCP or UDP) is enough to make such “keepalive” alerts. The idea is to create a monitor which will always remain in problem (Warning) state.

Use cases

Typical uses of keepalive monitors include:

  • Running tasks or services of high importance, e.g. performing database backup/restore operations (periodic reminders will keep you alerted to the progress)
  • Using backup services while primary ones are under maintenance or repair, e.g. using alternate Internet service provider connection (reminders will keep you aware of the maintenance still under way)
  • Any temporarily available resource which is normally unavailable, e.g. a port open in firewall for the duration of data transfer or security checks (reminders will keep you informed the temporary condition is still in effect)

Please follow the below instructions (we use PING in this example).

Create a new alerting rule

Let’s add a separate “Keepalive alerts” alerting rule for such a case. Let’s start with creating an alert (in IPHost GUI client, click “Alerting > Alerts” click “New”):

New alert

If there’s no appropriate simple action for this alert, click “Add” on the above window and create a new simple action (in the below example, it’s “Send mail” simple action):

New simple action

Specify action parameters as required. Now let’s create a new alerting rule (“Alerting > Alerting rules”), click “New”:

New alerting rule

Click “OK” when done. Let’s now create a new monitor.

Create keepalive monitor

Select a host, choose “New Monitor”, and add a new PING monitor with settings like below. In “Main parameters”:

Keepalive PING settings

In “State conditions” leave everything by default.

In “Alerting”, set alerting rule to the new one created above:

Keepalive PING settings

Save the changes and start the monitor. After it enters “OK” state, select “State conditions”, and set the threshold interval value (“greater than (>)”) to zero:

Keepalive PING settings

Save and poll the monitor. It starts sending notifications every 3 hours (or whichever interval values were set for corresponding alerting rule).

Additional notes

The drawback of this method: while keepalive monitor(s) are active, monitoring will indicate overall state as Warning (or Down, if there are monitors in Down state), i.e. it will never be “OK”.

Related topics