28.4. Setting Up Scheduled Monitoring

The monitors that you can configure using this module are most useful when they are run on schedule, so that you can be automatically notified via email if a monitored server or daemon goes down. When scheduled checking is enabled, all your monitors will be run at a periodic interval, just as they are all run when you visit the module's main page.

To set up scheduled monitoring, the steps to follow are:

1.
Click on the Scheduled Monitoring button found on the module's main page below the table of monitors. This will take you to the form shown in Figure 28.3.

Figure 28.3. The scheduled monitoring configuration form.


2.
Change the Scheduled monitoring enabled? field to Yes.

3.
The Check every field controls when the scheduled check is run. The first lets you set the period, such as every 1 hour or 5 minutes, while the second part controls how many hours or minutes into the period it is run. For example, to have the monitors checked at 3:00 a.m. every day, you would set the Check every field to 1 days, and the with offset field to 3.

4.
To limit the check to only certain hours of the day, deselect those hours on which you don't want it to run from the Run monitor during hours list. This does not make much sense if the scheduled check is being run only once per day.

5.
Similarly, to limit the check to certain days of the week, deselect the days that you don't want it to run from the Run monitor on days list.

6.
The Send email when field determines which events will cause an email message to be sent by the scheduled check.

If When a service changes status is chosen, email will be sent when a service goes down or up.

If When a service goes down is chosen, email will only be sent when a service goes down.

If Any time service is down is chosen, email will be sent as long as any service is down, and will be sent again at each check until service comes back up.

It is possible to override this field on a per-monitor basis using the Check on schedule field on the monitor creation form.

7.
To receive email when a service goes down, enter your address into the Email status report to field. If it is left set to Nobody, then no email will be sent.

8.
To set the source address of the status email, change the From: address for email field. The default is just webmin@yourhostname.

9.
By default, any status email will be sent by running the sendmail program on your system. To have it sent via an SMTP server on another system, change the Send mail via field to SMTP server and enter the hostname of the mail server into the field next to it.

10.
If you want to receive an email for each monitor that goes down, change the Send one email per service? field to Yes. Otherwise, all services that are determined to have failed by a single check will be reported in a single email.

11.
If you have a pager command set up and working on the module's configuration, you can enter a pager number into the Page status report to number field. It will receive a shortened version of the message that is sent via email.

12.
Click the Save button at the bottom of the page to activate scheduled monitoring. Webmin will automatically set up a Cron job that runs a script on the chosen schedule.

Once scheduled monitoring is active, you should begin receiving email messages notifying you when services go down and come back up. If a service is down when scheduled checking is first enabled, however, and you have chosen to be only notified when services go down or come up, you will not receive a message about it.

To modify any of the scheduled monitoring options, just repeat the preceding steps again. To turn it off altogether, change the Scheduled monitoring enabled? field to No and click Save. If you want to change the monitoring schedule, it is best to do it in this module instead of in the Scheduled Cron Jobs module that is covered in Chapter 10.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.43.211