Trace: » alerts
Alerts
In this section there are alert sensors of our server. Having alert you get a notification. So you can constantly monitor many different server parameters: loading, bandwidth, disk usage, job of http-server etc.
Every alert uses one option and a list of parameters to it.
Available options:
- http - is the option of sites monitoring. Its parameters are:
- uri - is the full address of the site (for example: http://domain.com/mytestpage.html);
- ok_codes - is the separated with spaces and commas list of codes of http-serveranswer, which ARE NOT mistaken (for example: 200, 302, 304). If the field is not filled - it won’t be used.
- ok_content: is the line that MUST be in the body site. If the field isn’t filled - it won’t be used.
With the help of this option you may check if your site works (if it displays the necessary site, etc.). It’s also very easy to create your own alerts with this option. You may write a little script which checks the necessary for you condition (for example, if your mysql-server works), and if it succeeds, shows SUCCESS on the site. You write SUCCESS in ok_content and if it’s absent an alert’ll be sent to your email.
- snmp_statistics - this option works with snmp sources and it is used for monitoring the counters. Its parameters are:
- use_samples - how many latest counter values must be taken as an average.
- curr_samples - how many counter values must be taken as a current.
- stat_name - which counter to use (Name in snmp sources).
- condition - the condition of having alert. Possible variants:
- <NN - current (curr_samples) less value NN.
- >NN - current (curr_samples) greater value NN.
- <*NN - curr_samples less use_samples in NN times ( counter downtime in NN times).
- >*NN - curr_samples greater use_samples in NN times (counter uptime in NN times).
With the help of this option you may set up alerts on upping/downing of bandwidth, loading average, decreasing of disk space and so on.
- watch_ports - this easy option watches the open ports. Its parameters are:
- ip_ports - the separated with spaces list of ports or addresses with ports in form of ip_address:port. If ip_address isn’t specified, system_ipaddr is used.
- timeout - the time of waiting in seconds. 5 seconds are usually enough.
- retries - the amount of query attempts.
With the help of this option you may monitor the job of such services as apache (port 80), receiving mail (port 25) and so on. You may monitor not only your own server but you may point any other IP address.
- ping_trace - is the option for monitoring of other servers availability.
- ip_addr - is the address for checking.
- timeout - is the time of waiting for the connection in seconds. 5 seconds are usually enough.
- retries - is the amount of query attempts.
AVAILABLE ACTIONS:
Add alert – there are 3 types of sensors, how they work is written above.
Change – to change the sensor.
Delete – to delete the sensor.
- http:
- Name – is the name of the sensor.
- Comments – are the optional comments. They’re to describe the sensor job.
- Level – the field is used for the possibility of filtering of mail messages on the alert level. It’ll be only in the Subject of the letter.
- uri – is the full address of the site the query to which must be done.
- ok_codes – the code of answers of the http-server which will be right. They can be some and in this case they must be separated with commas.
- ok_content – is the word or the line that must be on the requested page.
- retries – is the amount of repeated query in case of failure.
- snmp_statistics:
- Name - is the name of the sensor.
- Comments - are the optional comments. They are to describe the sensor job.
- Level - is the field used for filtering mail messages on the alert level. It’ll be only in the Subject of the letter.
- condition – is the condition on which an alert works.
- stat_name – is the name of the counter from the snmp_sources.
- use_samples - how many latest counter values must be taken as an average.
- curr_samples - how many latest counter values must be taken as a current.
- watch_ports:
- Name - is the name of the sensor.
- Comments - are the optional camments. They are to describe the counter job.
- Level - is the field used for filtering mail messages on the alert level. It’ll be only in the Subject of the letter.
- ip_ports - is the separated with spaces list of ports and addresses in the form of ip_address:port. If ip_address isn’t specified, system_ipaddr is used.
- timeout - is the time of waiting for the connection in seconds. 5 seconds are usually enough.
- retries - is the amount of the repeated query in case of failure .
- ping_trace - is the option for monitoring availability of other servers.
- Comments - are the optional comments. They are to describe the sensor job.
- Level - is the field used filtering mail messages on the alert level. It’ll be only in the Subject of the letter.
- ipaddr - is the address for checking.
- timeout - is the time of waiting for the connection in seconds. 5 seconds are usually enough.
- retries - is the amount of query attempts.
FIELDS:
Name – is the name of the sensor.
Active – is the indicator of the sensor state. It can be either active or inactive.
Jobs – are the condition jobs pointed to the alert.
Option – is the using option. It can be snmp_statistics, http, watch_ports.
Level – informs about the text that will be in the Subject of the mail message. It can possess the value of NOTICE, WARN, ERROR, EMERG. It’s done for better usability of mail messages.
Parameters – is the full text of meeting condition which is generated automatically on the basis of input data on creating the sensor.