diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2002-06-24 15:26:36 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2002-06-24 15:26:36 +0000 |
commit | a88fe0b17a66a001b78b4d13c6fb9da9df1720c3 (patch) | |
tree | dfe7d825d1e46c93f682c56cc0ca1b436c4cf34e | |
parent | 7b8199f4bbc932f3d72c6c67e4205c8ef4aed704 (diff) | |
download | zabbix-a88fe0b17a66a001b78b4d13c6fb9da9df1720c3.tar.gz zabbix-a88fe0b17a66a001b78b4d13c6fb9da9df1720c3.tar.xz zabbix-a88fe0b17a66a001b78b4d13c6fb9da9df1720c3.zip |
- added parameter SenderFrequency to zabbix_suckerd configuration
file (Alexei)
- added frontends/include/defines.inc.php (Alexei)
- added column services.algorithm (Alexei)
- list of test cases added to the Manual (Alexei)
- emails to be sent in case of TRUE-UNKNOWN-FALSE and v.s. (Alexei)
- one zabbix_suckerd to send alerts (Alexei)
- minimum number of zabbix_suckers StartSuckers is set to 3 (Alexei)
- added alerts.retries (Alexei)
- added alerts.status (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@413 97f52cf1-0a1b-0410-bd0e-c28be96e8082
-rw-r--r-- | ChangeLog | 29 | ||||
-rw-r--r-- | create/mysql/schema.sql | 6 | ||||
-rw-r--r-- | doc/manual.lyx | 1973 | ||||
-rw-r--r-- | frontends/php/alerts.php | 25 | ||||
-rw-r--r-- | frontends/php/config.php | 2 | ||||
-rw-r--r-- | frontends/php/include/config.inc.php | 13 | ||||
-rw-r--r-- | frontends/php/include/defines.inc.php | 4 | ||||
-rw-r--r-- | frontends/php/services.php | 65 | ||||
-rw-r--r-- | frontends/php/srv_status.php | 5 | ||||
-rw-r--r-- | include/common.h | 7 | ||||
-rw-r--r-- | include/db.c | 59 | ||||
-rw-r--r-- | include/db.h | 15 | ||||
-rw-r--r-- | include/functions.c | 90 | ||||
-rw-r--r-- | include/functions.h | 1 | ||||
-rw-r--r-- | misc/conf/zabbix_suckerd.conf | 7 | ||||
-rw-r--r-- | src/zabbix_sucker/zabbix_sucker.c | 85 | ||||
-rw-r--r-- | upgrades/dbpatches/1.0beta3_to_1.0beta4/mysql/patch.sql | 6 | ||||
-rw-r--r-- | upgrades/dbpatches/1.0beta3_to_1.0beta4/postgresql/patch.sql | 2 |
18 files changed, 2301 insertions, 93 deletions
@@ -1,25 +1,32 @@ -Not ready yet: +Not ready yet (later versions): +[ CORE. All errors and warnings must be numbered and documented ] +[ CORE. Support for macros like {server:system[procload].graph(1)} ] [ HB. Verify parameters before using them in SQL ] -[ CORE. Support for Service Tree ] -[ CORE. Change trigger status in case if host/item status is changed ] -[ PHP. Navigation by time period for graphs and trends ] - -[ TESTING. Define procedure for regression testing ] -[ PHP. Show triggers by userid ] +Not ready yet (1.0beta4): -[ CORE. Make one suckerd to send emails ] +[ CORE. Support for Service Tree ] +[ CORE. Check permission system ] +[ CORE. Support of monitoring of log files ] [ DOCS. SNMP with missing MIB files can be used by: snmpget -On localhost public enterprises.ucdavis.memory.memTotalSwap.0] -[ CORE. All errors and warnings must be numbered and documented ] - -[ CORE. Support for macros like {server:system[procload].graph(1)} ] +[ PHP. Navigation by time period for graphs and trends ] Changes for 1.0beta4: + - added parameter SenderFrequency to zabbix_suckerd configuration + file (Alexei) + - added frontends/include/defines.inc.php (Alexei) + - added column services.algorithm (Alexei) + - list of test cases added to the Manual (Alexei) + - emails to be sent in case of TRUE-UNKNOWN-FALSE and v.s. (Alexei) + - one zabbix_suckerd to send alerts (Alexei) + - minimum number of zabbix_suckers StartSuckers is set to 3 (Alexei) + - added alerts.retries (Alexei) + - added alerts.status (Alexei) - status of triggers changes if host/item status has been changed (Alexei) - status of triggers is set correctly even if zabbix is restarted (Alexei) - php/include/*inc renamed to php/include/*inc.php (Alexei) diff --git a/create/mysql/schema.sql b/create/mysql/schema.sql index e68a5f3f..d518a72f 100644 --- a/create/mysql/schema.sql +++ b/create/mysql/schema.sql @@ -6,6 +6,7 @@ CREATE TABLE services ( serviceid int(4) NOT NULL auto_increment, name varchar(128) DEFAULT '' NOT NULL, status int(1) DEFAULT '0' NOT NULL, + algorithm int(1) DEFAULT '0' NOT NULL, triggerid int(4), PRIMARY KEY (serviceid) ); @@ -126,9 +127,12 @@ CREATE TABLE alerts ( sendto varchar(100) DEFAULT '' NOT NULL, subject varchar(255) DEFAULT '' NOT NULL, message blob DEFAULT '' NOT NULL, + status int(4) DEFAULT '0' NOT NULL, + retries int(4) DEFAULT '0' NOT NULL, PRIMARY KEY (alertid), INDEX (actionid), - KEY clock (clock) + KEY clock (clock), + KEY status_retries (sent, retries) ); -- diff --git a/doc/manual.lyx b/doc/manual.lyx index d6b375be..f224929d 100644 --- a/doc/manual.lyx +++ b/doc/manual.lyx @@ -24,13 +24,13 @@ \layout Title \added_space_top vfill -Zabbix Reference Manual for version 1.0 (draft v1.21) +Zabbix Reference Manual for version 1.0 (draft v1.22) \layout Author ALEXEI VLADISHEV \layout Date -02 June 2002 +23 June 2002 \layout Abstract The document is Reference Manual for Zabbix version 1.0. @@ -976,6 +976,18 @@ Remember, the more physical memory you have, the faster the database (and Zabbix \series default ) works! +\layout Subsubsection + +Time synchronisation +\layout Standard + +It is very important to have precise system date on server with Zabbix running. + +\emph on +timed +\emph default +is one of most popular daemons that synchronises the host's time with the + time of other machines. \layout Subsection Structure of Zabbix distribution @@ -3018,11 +3030,11 @@ history \emph default , \emph on -alarms +alarms, alerts \emph default and \emph on -alerts +sessions \emph default . \layout Standard @@ -4059,7 +4071,7 @@ No \layout Standard -Number of zabbix_suckerd to start +Number of zabbix_suckerd to start (3-255) \end_inset </cell> </row> @@ -6746,6 +6758,8 @@ Oid: 1.2.3.45.6.7.8.0 \layout Standard Key: <Unique string to be used as reference to triggers> +\layout Standard + \layout Subsection Supported Parameters by Platform @@ -14099,7 +14113,7 @@ Zabbix \noun on -Lauris Stiglics +LAURIS STIGLICS \layout Standard Select criteria in for @@ -16469,4 +16483,1951 @@ Appendix \layout Section Warnings and Errors +\layout Section + +Regression tests +\layout Standard + +The following table contains list of tests applied to current Zabbix release. + Each test case must be tested for each supported platform. +\layout Standard + + +\begin_inset Tabular +<lyxtabular version="2" rows="50" columns="5"> +<features rotate="false" islongtable="false" endhead="0" endfirsthead="0" endfoot="0" endlastfoot="0"> +<column alignment="center" valignment="top" leftline="true" rightline="false" width="" special=""> +<column alignment="left" valignment="top" leftline="true" rightline="false" width="" special=""> +<column alignment="center" valignment="top" leftline="true" rightline="false" width="" special=""> +<column alignment="center" valignment="top" leftline="true" rightline="false" width="" special=""> +<column alignment="center" valignment="top" leftline="true" rightline="true" width="" special=""> +<row topline="true" bottomline="true" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Num +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Description +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Expected result +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Pass/Fail +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Comments +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="1" alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Installation procedure (1xxx) +\end_inset +</cell> +<cell multicolumn="2" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="2" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="2" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="2" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +1001 +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Unzip Zabbix release using tar and gzip +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +No error/warning messages +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Pass +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Directory +\emph on +bin/ +\emph default + exists +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Pass +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + + +\emph on +doc/manual.txt +\emph default + exists +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Pass +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + + +\emph on +doc/manual.html +\emph default + exists +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Pass +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + + +\emph on +doc/manual.pdf +\emph default + exists +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Pass +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + + +\emph on +configure +\emph default +exists +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Pass +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +1002 +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Run +\emph on +./configure +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +No error/warning messages +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Pass +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +1003 +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Run +\emph on +./configure --with-mysql +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +No error/warning messages +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Pass +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +1004 +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Run +\emph on +./configure +\emph default + +\emph on +--with-pgsql +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +No error/warning messages +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Pass +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +1005 +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Run +\emph on +./configure --enable-static +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +No error/warning messages +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Pass +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +1006 +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +Run +\emph on +make +\emph default +(after 1002) +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="false" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +<row topline="true" bottomline="true" newpage="false"> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special=""> +\begin_inset Text + +\layout Standard + +\end_inset +</cell> +</row> +</lyxtabular> + +\end_inset + + \the_end diff --git a/frontends/php/alerts.php b/frontends/php/alerts.php index be7fb057..aea93872 100644 --- a/frontends/php/alerts.php +++ b/frontends/php/alerts.php @@ -35,7 +35,7 @@ <FONT COLOR="#000000"> <? - $sql="select a.alertid,a.clock,a.type,a.sendto,a.subject,a.message,ac.triggerid from alerts a,actions ac where a.actionid=ac.actionid order by a.clock desc $limit"; + $sql="select a.alertid,a.clock,a.type,a.sendto,a.subject,a.message,ac.triggerid,a.status,a.retries from alerts a,actions ac where a.actionid=ac.actionid order by a.clock desc $limit"; $result=DBselect($sql); echo "<CENTER>"; @@ -43,6 +43,7 @@ echo "<TR>"; echo "<TD WIDTH=\"10%\"><b>Time</b></TD>"; echo "<TD WIDTH=\"5%\"><b>Type</b></TD>"; + echo "<TD WIDTH=\"5%\"><b>Status</b></TD>"; echo "<TD WIDTH=\"15%\"><b>Send to</b></TD>"; echo "<TD><b>Subject</b></TD>"; echo "<TD><b>Message</b></TD>"; @@ -67,9 +68,29 @@ { echo "<TD>Unknown media type</TD>"; } + if($row["status"] == 1) + { + echo "<TD><font color=\"00AA00\">sent</font></TD>"; + } + else + { + echo "<TD><font color=\"AA0000\">not sent</font></TD>"; + } echo "<TD>".$row["sendto"]."</TD>"; echo "<TD>".$row["subject"]."</TD>"; - echo "<TD>".$row["message"]."</TD>"; + echo "<TD>"; + for($i=0;$i<strlen($row["message"]);$i++) + { + if($row["message"][$i]=="\n") + { + echo "<br>"; + } + else + { + echo $row["message"][$i]; + } + } + echo "</TD>"; echo "</TR>"; } echo "</TABLE>"; diff --git a/frontends/php/config.php b/frontends/php/config.php index c92afd9a..d88f1053 100644 --- a/frontends/php/config.php +++ b/frontends/php/config.php @@ -7,7 +7,7 @@ ?> <? - if(!check_right("Configuration of Zabbix","W",0)) + if(!check_right("Configuration of Zabbix","R",0)) { show_table_header("<font color=\"AA0000\">No permissions !</font >"); diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php index d746b2ad..1682a626 100644 --- a/frontends/php/include/config.inc.php +++ b/frontends/php/include/config.inc.php @@ -1,4 +1,5 @@ <? + include "include/defines.inc.php"; include "include/db.inc.php"; $USER_DETAILS =""; @@ -1289,28 +1290,28 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; return DBexecute($sql); } - function update_service($serviceid,$name,$triggerid,$linktrigger) + function update_service($serviceid,$name,$triggerid,$linktrigger,$algorithm) { if( isset($linktrigger)&&($linktrigger=="on") ) { - $sql="update services set name='$name',triggerid=$triggerid,status=0 where serviceid=$serviceid"; + $sql="update services set name='$name',triggerid=$triggerid,status=0,algorithm=$algorithm where serviceid=$serviceid"; } else { - $sql="update services set name='$name',triggerid=NULL,status=0 where serviceid=$serviceid"; + $sql="update services set name='$name',triggerid=NULL,status=0,algorithm=$algorithm where serviceid=$serviceid"; } return DBexecute($sql); } - function add_service($name,$triggerid,$linktrigger) + function add_service($name,$triggerid,$linktrigger,$algorithm) { if( isset($linktrigger)&&($linktrigger=="on") ) { - $sql="insert into services (serviceid,name,triggerid,status) values (NULL,'$name',$triggerid,0)"; + $sql="insert into services (serviceid,name,triggerid,status,algorithm) values (NULL,'$name',$triggerid,0,$algorithm)"; } else { - $sql="insert into services (serviceid,name,status) values (NULL,'$name',0)"; + $sql="insert into services (serviceid,name,status,algorithm) values (NULL,'$name',0,$algorithm)"; } $result=DBexecute($sql); return DBinsert_id($result,"services","serviceid"); diff --git a/frontends/php/include/defines.inc.php b/frontends/php/include/defines.inc.php new file mode 100644 index 00000000..48ea09c2 --- /dev/null +++ b/frontends/php/include/defines.inc.php @@ -0,0 +1,4 @@ +<? + define("SERVICE_ALGORITHM_NONE",0); + define("SERVICE_ALGORITHM_MAX",1); +?> diff --git a/frontends/php/services.php b/frontends/php/services.php index 067c7b2d..6d8da8bb 100644 --- a/frontends/php/services.php +++ b/frontends/php/services.php @@ -11,12 +11,12 @@ { if($register=="update") { - $result=@update_service($serviceid,$name,$triggerid,$linktrigger); + $result=@update_service($serviceid,$name,$triggerid,$linktrigger,$algorithm); show_messages($result,"Service updated","Cannot update service"); } if($register=="add") { - $result=@add_service($name,$triggerid,$linktrigger); + $result=@add_service($name,$triggerid,$linktrigger,$algorithm); show_messages($result,"Service added","Cannot add service"); } if($register=="add server") @@ -49,16 +49,12 @@ <? show_table_header("IT SERVICES"); - echo "<br>"; - - show_table_header("SERVICES"); -?> -<? $now=time(); - $result=DBselect("select serviceid,name from services order by name"); + $result=DBselect("select serviceid,name,algorithm from services order by name"); echo "<table border=0 width=100% bgcolor='#CCCCCC' cellspacing=1 cellpadding=3>"; echo "<tr>"; echo "<td><b>Service</b></td>"; + echo "<td width=\"20%\"><b>Status calculation</b></td>"; echo "<td width=\"10%\"><b>Actions</b></td>"; echo "</tr>"; @@ -68,6 +64,18 @@ echo "<tr bgcolor=#EEEEEE>"; $service=get_service_by_serviceid($serviceid); echo "<td><b><a href=\"services.php?serviceid=".$service["serviceid"]."#form\">".$service["name"]."</a></b></td>"; + if($service["algorithm"] == SERVICE_ALGORITHM_NONE) + { + echo "<td>none</td>"; + } + else if($service["algorithm"] == SERVICE_ALGORITHM_MAX) + { + echo "<td>MAX of childs</td>"; + } + else + { + echo "<td>unknown</td>"; + } echo "<td><a href=\"services.php?serviceid=".$service["serviceid"]."®ister=delete\">Delete</a></td>"; echo "</tr>"; $col++; @@ -100,6 +108,18 @@ { echo "<td><a href=\"services.php?serviceid=".$row["serviceid"]."#form\">".$row["name"]." [$childs]</a></td>"; } + if($row["algorithm"] == SERVICE_ALGORITHM_NONE) + { + echo "<td>none</td>"; + } + else if($row["algorithm"] == SERVICE_ALGORITHM_MAX) + { + echo "<td>MAX of childs</td>"; + } + else + { + echo "<td>unknown</td>"; + } echo "<td><a href=\"services.php?serviceid=".$row["serviceid"]."®ister=delete\">Delete</a></td>"; echo "</tr>"; } @@ -146,9 +166,10 @@ <? if(isset($serviceid)) { - $result=DBselect("select serviceid,triggerid,name from services where serviceid=$serviceid"); + $result=DBselect("select serviceid,triggerid,name,algorithm from services where serviceid=$serviceid"); $triggerid=DBget_field($result,0,1); $name=DBget_field($result,0,2); + $algorithm=DBget_field($result,0,3); } else { @@ -171,6 +192,31 @@ show_table2_h_delimiter(); echo "<input name=\"name\" value=\"$name\" size=32>"; + show_table2_v_delimiter(); + echo "Status calculation algorithm"; + show_table2_h_delimiter(); + $result=DBselect("select triggerid,description from triggers order by description"); + echo "<select name=\"algorithm\" size=1>"; + if(isset($algorithm)) + { + if($algorithm == SERVICE_ALGORITHM_NONE) + { + echo "<OPTION VALUE='0' SELECTED>Do not calculate"; + echo "<OPTION VALUE='1'>MAX"; + } + if($algorithm == SERVICE_ALGORITHM_MAX) + { + echo "<OPTION VALUE='1'>Do not calculate"; + echo "<OPTION VALUE='0' SELECTED>MAX"; + } + } + else + { + echo "<OPTION VALUE='0' SELECTED>Do not calculate"; + echo "<OPTION VALUE='1'>MAX"; + } + echo "</SELECT>"; + show_table2_v_delimiter(); echo "Link to trigger ?"; show_table2_h_delimiter(); @@ -202,6 +248,7 @@ } } echo "</SELECT>"; + show_table2_v_delimiter2(); echo "<input type=\"submit\" name=\"register\" value=\"add\">"; if(isset($serviceid)) diff --git a/frontends/php/srv_status.php b/frontends/php/srv_status.php index 006f7d62..a7cc716b 100644 --- a/frontends/php/srv_status.php +++ b/frontends/php/srv_status.php @@ -9,11 +9,6 @@ <? show_table_header("IT SERVICES"); - echo "<br>"; - - show_table_header("SERVICES"); -?> -<? $now=time(); $result=DBselect("select serviceid,name,triggerid,status from services order by name"); echo "<table border=0 width=100% bgcolor='#CCCCCC' cellspacing=1 cellpadding=3>"; diff --git a/include/common.h b/include/common.h index fc934949..b2addbcb 100644 --- a/include/common.h +++ b/include/common.h @@ -15,6 +15,9 @@ #define ITEM_TYPE_SNMP 1 #define ITEM_TYPE_TRAPPER 2 +/* Alert types */ +#define ALERT_TYPE_EMAIL "EMAIL" + /* Item statuses */ #define ITEM_STATUS_ACTIVE 0 #define ITEM_STATUS_DISABLED 1 @@ -46,6 +49,10 @@ #define MEDIA_STATUS_ACTIVE 0 #define MEDIA_STATUS_DISABLED 1 +/* Algorithms for service status calculation */ +#define SERVICE_ALGORITHM_NONE 0 +#define SERVICE_ALGORITHM_MAX 1 + #define AGENTD_FORKS 5 #define AGENT_MAX_USER_COMMANDS 512 diff --git a/include/db.c b/include/db.c index c5c4e939..cb8485d6 100644 --- a/include/db.c +++ b/include/db.c @@ -224,6 +224,59 @@ int DBget_function_result(float *result,char *functionid) } /* SUCCEED if latest alarm with triggerid has this status */ +int DBget_prev_trigger_value(int triggerid) +{ + char sql[MAX_STRING_LEN+1]; + int clock; + int value; + + DB_RESULT *result; + + zabbix_log(LOG_LEVEL_DEBUG,"In DBget_prev_trigger_value()"); + + sprintf(sql,"select max(clock) from alarms where triggerid=%d",triggerid); + zabbix_log(LOG_LEVEL_DEBUG,"SQL [%s]",sql); + result = DBselect(sql); + + if(DBis_empty(result) == SUCCEED) + { + zabbix_log(LOG_LEVEL_DEBUG, "Result for MAX is empty" ); + DBfree_result(result); + return TRIGGER_VALUE_UNKNOWN; + } + clock=atoi(DBget_field(result,0,0)); + DBfree_result(result); + + sprintf(sql,"select max(clock) from alarms where triggerid=%d and clock<%d",triggerid,clock); + zabbix_log(LOG_LEVEL_DEBUG,"SQL [%s]",sql); + result = DBselect(sql); + + if(DBis_empty(result) == SUCCEED) + { + zabbix_log(LOG_LEVEL_DEBUG, "Result for MAX is empty" ); + DBfree_result(result); + return TRIGGER_VALUE_UNKNOWN; + } + clock=atoi(DBget_field(result,0,0)); + DBfree_result(result); + + sprintf(sql,"select value from alarms where triggerid=%d and clock=%d",triggerid,clock); + zabbix_log(LOG_LEVEL_DEBUG,"SQL [%s]",sql); + result = DBselect(sql); + + if(DBis_empty(result) == SUCCEED) + { + zabbix_log(LOG_LEVEL_WARNING, "Result of [%s] is empty", sql ); + DBfree_result(result); + return TRIGGER_VALUE_UNKNOWN; + } + value=atoi(DBget_field(result,0,0)); + DBfree_result(result); + + return value; +} + +/* SUCCEED if latest alarm with triggerid has this status */ int latest_alarm(int triggerid, int status) { char sql[MAX_STRING_LEN+1]; @@ -235,12 +288,12 @@ int latest_alarm(int triggerid, int status) zabbix_log(LOG_LEVEL_DEBUG,"In latest_alarm()"); sprintf(sql,"select max(clock) from alarms where triggerid=%d",triggerid); - zabbix_log(LOG_LEVEL_DEBUG,"SQL [%s]",sql); + zabbix_log(LOG_LEVEL_DEBUG,"SQL [%s]",sql); result = DBselect(sql); if(DBis_empty(result) == SUCCEED) { - zabbix_log(LOG_LEVEL_DEBUG, "Result for MIN is empty" ); + zabbix_log(LOG_LEVEL_DEBUG, "Result for MAX is empty" ); ret = FAIL; } else @@ -509,7 +562,7 @@ int DBadd_alert(int actionid, char *type, char *sendto, char *subject, char *mes zabbix_log(LOG_LEVEL_DEBUG,"In add_alert()"); now = time(NULL); - sprintf(sql,"insert into alerts (alertid,actionid,clock,type,sendto,subject,message) values (NULL,%d,%d,'%s','%s','%s','%s')",actionid,now,type,sendto,subject,message); + sprintf(sql,"insert into alerts (alertid,actionid,clock,type,sendto,subject,message,status,retries) values (NULL,%d,%d,'%s','%s','%s','%s',0,0)",actionid,now,type,sendto,subject,message); DBexecute(sql); return SUCCEED; diff --git a/include/db.h b/include/db.h index 19a6e0d5..57600919 100644 --- a/include/db.h +++ b/include/db.h @@ -16,6 +16,7 @@ #define DB_ITEM struct item_type #define DB_TRIGGER struct trigger_type #define DB_ACTION struct action_type +#define DB_ALERT struct alert_type #define DB_FUNCTION struct function_type #define DB_MEDIA struct media_type @@ -100,6 +101,18 @@ DB_ACTION char *message; }; +DB_ALERT +{ + int alertid; + int actionid; + int clock; + char *type; + char *sendto; + char *subject; + char *message; + int status; + int retries; +}; void DBconnect( char *dbname, char *dbuser, char *dbpassword, char *dbsocket); void DBclose(void); @@ -119,6 +132,6 @@ int DBadd_history_str(int itemid, char *value); int DBadd_alarm(int triggerid, int status,int clock); int DBadd_alert(int actionid, char *type, char *sendto, char *subject, char *message); int DBupdate_triggers_status_after_restart(void); - +int DBget_prev_trigger_value(int triggerid); #endif diff --git a/include/functions.c b/include/functions.c index 27523d6c..bf01b2d3 100644 --- a/include/functions.c +++ b/include/functions.c @@ -414,7 +414,7 @@ int send_mail(char *smtp_server,char *smtp_helo,char *smtp_email,char *mailto,ch /* * Send message to user. Message will be sent to all medias registered to given user. */ -void send_to_user(int actionid,int userid,char *smtp_server,char *smtp_helo,char *smtp_email,char *subject,char *message) +void send_to_user(int actionid,int userid,char *subject,char *message) { DB_MEDIA media; char sql[MAX_STRING_LEN+1]; @@ -438,19 +438,7 @@ void send_to_user(int actionid,int userid,char *smtp_server,char *smtp_helo,char media.type=DBget_field(result,i,0); media.sendto=DBget_field(result,i,1); - if(strcmp(media.type,"EMAIL")==0) - { - zabbix_log( LOG_LEVEL_DEBUG, "Email sending to %s %s Subject:%s Message:%s to %d\n", media.type, media.sendto, subject, message, userid ); - if( FAIL == send_mail(smtp_server,smtp_helo,smtp_email,media.sendto,subject,message)) - { - zabbix_log( LOG_LEVEL_ERR, "Error sending email to '%s' Subject:'%s' to userid:%d\n", media.sendto, subject, userid ); - } - DBadd_alert(actionid,media.type,media.sendto,subject,message); - } - else - { - zabbix_log( LOG_LEVEL_WARNING, "Media type %s is not supported yet", media.type ); - } + DBadd_alert(actionid,media.type,media.sendto,subject,message); } DBfree_result(result); } @@ -466,13 +454,11 @@ void apply_actions(int triggerid,int good) char sql[MAX_STRING_LEN+1]; - char smtp_server[MAX_STRING_LEN+1], - smtp_helo[MAX_STRING_LEN+1], - smtp_email[MAX_STRING_LEN+1]; - int i,rows; int now; + zabbix_log( LOG_LEVEL_DEBUG, "In apply_actions()"); + if(good==1) { zabbix_log( LOG_LEVEL_DEBUG, "Check dependencies"); @@ -493,16 +479,6 @@ void apply_actions(int triggerid,int good) zabbix_log( LOG_LEVEL_DEBUG, "Applying actions"); - /* Get smtp_server and smtp_helo from config */ - sprintf(sql,"select smtp_server,smtp_helo,smtp_email from config"); - result = DBselect(sql); - - strncpy(smtp_server,DBget_field(result,0,0), MAX_STRING_LEN); - strncpy(smtp_helo,DBget_field(result,0,1), MAX_STRING_LEN); - strncpy(smtp_email,DBget_field(result,0,2), MAX_STRING_LEN); - - DBfree_result(result); - now = time(NULL); sprintf(sql,"select actionid,userid,delay,subject,message from actions where triggerid=%d and good=%d and nextcheck<=%d",triggerid,good,now); @@ -523,7 +499,7 @@ void apply_actions(int triggerid,int good) substitute_macros(action.message); substitute_macros(action.subject); - send_to_user(action.actionid,action.userid,smtp_server,smtp_helo,smtp_email,action.subject,action.message); + send_to_user(action.actionid,action.userid,action.subject,action.message); now = time(NULL); sprintf(sql,"update actions set nextcheck=%d where actionid=%d",now+action.delay,action.actionid); DBexecute(sql); @@ -532,32 +508,48 @@ void apply_actions(int triggerid,int good) DBfree_result(result); } +/* + * Recursive function! + */ void update_serv(int serviceid) { char sql[MAX_STRING_LEN+1]; int i,j; int status; + int serviceupid, algorithm; DB_RESULT *result,*result2; - sprintf(sql,"select serviceupid from services_links where servicedownid=%d",serviceid); + sprintf(sql,"select l.serviceupid,s.algorithm from services_links l,services s where s.serviceid=l.serviceupid and l.servicedownid=%d",serviceid); result=DBselect(sql); status=0; for(i=0;i<DBnum_rows(result);i++) { - sprintf(sql,"select status from services s,services_links l where l.serviceupid=%d and s.serviceid=l.servicedownid",atoi(DBget_field(result,i,0))); - result2=DBselect(sql); - for(j=0;j<DBnum_rows(result2);j++) + serviceupid=atoi(DBget_field(result,i,0)); + algorithm=atoi(DBget_field(result,i,1)); + if(SERVICE_ALGORITHM_NONE == algorithm) + { +/* Do nothing */ + } + else if(SERVICE_ALGORITHM_MAX == algorithm) { - if(atoi(DBget_field(result2,j,0))>status) + sprintf(sql,"select status from services s,services_links l where l.serviceupid=%d and s.serviceid=l.servicedownid",serviceupid); + result2=DBselect(sql); + for(j=0;j<DBnum_rows(result2);j++) { - status=atoi(DBget_field(result2,j,0)); + if(atoi(DBget_field(result2,j,0))>status) + { + status=atoi(DBget_field(result2,j,0)); + } } + sprintf(sql,"update services set status=%d where serviceid=%d",status,atoi(DBget_field(result,i,0))); + DBexecute(sql); + DBfree_result(result2); + } + else + { + zabbix_log( LOG_LEVEL_ERR, "Unknown calculation algorithm of service status [%d]", algorithm); } - sprintf(sql,"update services set status=%d where serviceid=%d",status,atoi(DBget_field(result,i,0))); - DBexecute(sql); - - DBfree_result(result2); } DBfree_result(result); @@ -570,9 +562,6 @@ void update_serv(int serviceid) DBfree_result(result); } -/* - * Recursive function! - */ void update_services(int triggerid, int status) { char sql[MAX_STRING_LEN+1]; @@ -616,6 +605,7 @@ void update_triggers( int suckers, int flag, int sucker_num, int lastclock ) DB_RESULT *result; int i; + int prevvalue; if(flag == 0) { @@ -651,6 +641,8 @@ void update_triggers( int suckers, int flag, int sucker_num, int lastclock ) continue; } + prevvalue=DBget_prev_trigger_value(trigger.triggerid); + if(b==1) { if(trigger.value != TRIGGER_VALUE_TRUE) @@ -661,7 +653,12 @@ void update_triggers( int suckers, int flag, int sucker_num, int lastclock ) DBadd_alarm(trigger.triggerid, TRIGGER_VALUE_TRUE, now); } - if(trigger.value == TRIGGER_VALUE_FALSE) + if((trigger.value == TRIGGER_VALUE_FALSE) + || + ( + (trigger.value == TRIGGER_VALUE_UNKNOWN) && + (prevvalue == TRIGGER_VALUE_FALSE) + )) { now = time(NULL); apply_actions(trigger.triggerid,1); @@ -684,7 +681,12 @@ void update_triggers( int suckers, int flag, int sucker_num, int lastclock ) DBadd_alarm(trigger.triggerid, TRIGGER_VALUE_FALSE,now); } - if(trigger.value == TRIGGER_VALUE_TRUE) + if((trigger.value == TRIGGER_VALUE_TRUE) + || + ( + (trigger.value == TRIGGER_VALUE_UNKNOWN) && + (prevvalue == TRIGGER_VALUE_TRUE) + )) { apply_actions(trigger.triggerid,0); diff --git a/include/functions.h b/include/functions.h index 8009776d..33052d6a 100644 --- a/include/functions.h +++ b/include/functions.h @@ -7,5 +7,6 @@ void update_triggers (int suckers, int flag,int sucker_num,int lastclock); int get_lastvalue(char *value,char *host,char *key,char *function,char *parameter); int process_data(int sockfd,char *server,char *key, char *value); void process_new_value(DB_ITEM *item,char *value); +int send_mail(char *smtp_server,char *smtp_helo,char *smtp_email,char *mailto,char *mailsubject,char *mailbody); #endif diff --git a/misc/conf/zabbix_suckerd.conf b/misc/conf/zabbix_suckerd.conf index d51e67cc..35a52fd7 100644 --- a/misc/conf/zabbix_suckerd.conf +++ b/misc/conf/zabbix_suckerd.conf @@ -6,7 +6,7 @@ # Number of pre-forked instances of zabbix_suckerd # Default value is 5 -# This parameter must be between 2 and 255 +# This parameter must be between 3 and 255 StartSuckers=5 # How often Zabbix will perform housekeeping procedure @@ -18,6 +18,11 @@ StartSuckers=5 HousekeepingFrequency=1 +# How often Zabbix will try to send unsent alerts +# (in seconds) +# Default value is 30 seconds +SenderFrequency=30 + # Uncomment this line to disable housekeeping procedure #DisableHousekeeping=1 diff --git a/src/zabbix_sucker/zabbix_sucker.c b/src/zabbix_sucker/zabbix_sucker.c index f4dfd02a..6ed3efe0 100644 --- a/src/zabbix_sucker/zabbix_sucker.c +++ b/src/zabbix_sucker/zabbix_sucker.c @@ -44,6 +44,7 @@ static int CONFIG_SUCKERD_FORKS =SUCKER_FORKS; static int CONFIG_NOTIMEWAIT =0; static int CONFIG_TIMEOUT =SUCKER_TIMEOUT; static int CONFIG_HOUSEKEEPING_FREQUENCY = 1; +static int CONFIG_SENDER_FREQUENCY = 30; static int CONFIG_DISABLE_HOUSEKEEPING = 0; static int CONFIG_LOG_LEVEL = LOG_LEVEL_WARNING; static char *CONFIG_PID_FILE = NULL; @@ -201,8 +202,9 @@ void init_config(void) static struct cfg_line cfg[]= { /* PARAMETER ,VAR ,FUNC, TYPE(0i,1s),MANDATORY,MIN,MAX */ - {"StartSuckers",&CONFIG_SUCKERD_FORKS,0,TYPE_INT,PARM_OPT,2,255}, + {"StartSuckers",&CONFIG_SUCKERD_FORKS,0,TYPE_INT,PARM_OPT,3,255}, {"HousekeepingFrequency",&CONFIG_HOUSEKEEPING_FREQUENCY,0,TYPE_INT,PARM_OPT,1,24}, + {"SenderFrequency",&CONFIG_SENDER_FREQUENCY,0,TYPE_INT,PARM_OPT,5,3600}, {"Timeout",&CONFIG_TIMEOUT,0,TYPE_INT,PARM_OPT,1,30}, {"NoTimeWait",&CONFIG_NOTIMEWAIT,0,TYPE_INT,PARM_OPT,0,1}, {"DisableHousekeeping",&CONFIG_DISABLE_HOUSEKEEPING,0,TYPE_INT,PARM_OPT,0,1}, @@ -545,7 +547,7 @@ int get_minnextcheck(int now) /* Host status 0 == MONITORED 1 == NOT MONITORED 2 == UNREACHABLE */ - sprintf(sql,"select count(*),min(nextcheck) from items i,hosts h where i.status=0 and (h.status=0 or (h.status=2 and h.disable_until<%d)) and h.hostid=i.hostid and i.status=0 and i.itemid%%%d=%d",now,CONFIG_SUCKERD_FORKS-1,sucker_num-1); + sprintf(sql,"select count(*),min(nextcheck) from items i,hosts h where i.status=0 and (h.status=0 or (h.status=2 and h.disable_until<%d)) and h.hostid=i.hostid and i.status=0 and i.itemid%%%d=%d",now,CONFIG_SUCKERD_FORKS-2,sucker_num-2); result = DBselect(sql); if( DBis_empty(result) == SUCCEED) @@ -588,7 +590,7 @@ int get_values(void) now = time(NULL); - sprintf(sql,"select i.itemid,i.key_,h.host,h.port,i.delay,i.description,i.nextcheck,i.type,i.snmp_community,i.snmp_oid,h.useip,h.ip,i.history,i.lastvalue,i.prevvalue,i.hostid,h.status,i.value_type from items i,hosts h where i.nextcheck<=%d and i.status=0 and (h.status=0 or (h.status=2 and h.disable_until<=%d)) and h.hostid=i.hostid and i.itemid%%%d=%d order by i.nextcheck", now, now, CONFIG_SUCKERD_FORKS-1,sucker_num-1); + sprintf(sql,"select i.itemid,i.key_,h.host,h.port,i.delay,i.description,i.nextcheck,i.type,i.snmp_community,i.snmp_oid,h.useip,h.ip,i.history,i.lastvalue,i.prevvalue,i.hostid,h.status,i.value_type from items i,hosts h where i.nextcheck<=%d and i.status=0 and (h.status=0 or (h.status=2 and h.disable_until<=%d)) and h.hostid=i.hostid and i.itemid%%%d=%d order by i.nextcheck", now, now, CONFIG_SUCKERD_FORKS-2,sucker_num-2); result = DBselect(sql); if( DBis_empty(result) == SUCCEED) @@ -768,6 +770,76 @@ int housekeeping_alarms(int now) return SUCCEED; } +int main_alerter_loop() +{ + char smtp_server[MAX_STRING_LEN+1]; + char smtp_helo[MAX_STRING_LEN+1]; + char smtp_email[MAX_STRING_LEN+1]; + + char sql[MAX_STRING_LEN+1]; + + int i; + + DB_RESULT *result; + DB_ALERT alert; + + for(;;) + { +#ifdef HAVE_FUNCTION_SETPROCTITLE + setproctitle("connecting to the database"); +#endif + DBconnect(CONFIG_DBNAME, CONFIG_DBUSER, CONFIG_DBPASSWORD, CONFIG_DBSOCKET); + + sprintf(sql,"select smtp_server,smtp_helo,smtp_email from config"); + result = DBselect(sql); + strncpy(smtp_server,DBget_field(result,0,0), MAX_STRING_LEN); + strncpy(smtp_helo,DBget_field(result,0,1), MAX_STRING_LEN); + strncpy(smtp_email,DBget_field(result,0,2), MAX_STRING_LEN); + DBfree_result(result); + + sprintf(sql,"select alertid,type,sendto,subject,message,status,retries from alerts where status=0 and retries<3 order by clock"); + result = DBselect(sql); + + for(i=0;i<DBnum_rows(result);i++) + { + alert.alertid=atoi(DBget_field(result,i,0)); + alert.type=DBget_field(result,i,1); + alert.sendto=DBget_field(result,i,2); + alert.subject=DBget_field(result,i,3); + alert.message=DBget_field(result,i,4); + alert.status=atoi(DBget_field(result,i,5)); + alert.retries=atoi(DBget_field(result,i,6)); + + if(strcmp(alert.type,ALERT_TYPE_EMAIL)==0) + { + if(FAIL == send_mail(smtp_server,smtp_helo,smtp_email,alert.sendto,alert.subject,alert.message)) + { + zabbix_log( LOG_LEVEL_ERR, "Error sending email to '%s' Subject:'%s'", alert.sendto, alert.subject); + sprintf(sql,"update alerts set retries=retries+1 where alertid=%d", alert.alertid); + DBexecute(sql); + } + else + { + sprintf(sql,"update alerts set status=1 where alertid=%d", alert.alertid); + DBexecute(sql); + } + } + else + { + sprintf(sql,"update alerts set retries=3 where alertid=%d", alert.alertid); + DBexecute(sql); + zabbix_log( LOG_LEVEL_ERR, "Unsupported type of alert [%s] Alert ID [%d]", alert.type, alert.alertid ); + } + } + + DBclose(); +#ifdef HAVE_FUNCTION_SETPROCTITLE + setproctitle("sender [sleeping for %d seconds]", CONFIG_SENDER_FREQUENCY); +#endif + sleep(CONFIG_SENDER_FREQUENCY); + } +} + int main_housekeeping_loop() { int now; @@ -901,6 +973,8 @@ int main(int argc, char **argv) create_pid_file(); + zabbix_log( LOG_LEVEL_WARNING, "zabbix_suckerd started"); + /* Need to set trigger status to UNKNOWN since last run */ DBconnect(CONFIG_DBNAME, CONFIG_DBUSER, CONFIG_DBPASSWORD, CONFIG_DBSOCKET); DBupdate_triggers_status_after_restart(); @@ -932,6 +1006,11 @@ int main(int argc, char **argv) /* First instance of zabbix_suckerd does housekeeping procedures */ main_housekeeping_loop(); } + else if(sucker_num == 1) + { +/* Second instance of zabbix_suckerd sends alerts to users */ + main_alerter_loop(); + } else { main_sucker_loop(); diff --git a/upgrades/dbpatches/1.0beta3_to_1.0beta4/mysql/patch.sql b/upgrades/dbpatches/1.0beta3_to_1.0beta4/mysql/patch.sql index 00991240..9436bf03 100644 --- a/upgrades/dbpatches/1.0beta3_to_1.0beta4/mysql/patch.sql +++ b/upgrades/dbpatches/1.0beta3_to_1.0beta4/mysql/patch.sql @@ -6,6 +6,10 @@ update config set alarm_history=alarm_history/(24*3600); alter table triggers add status int(4) DEFAULT '0' NOT NULL; alter table triggers add value int(4) DEFAULT '0' NOT NULL; +alter table alerts add status int(4) DEFAULT '0' NOT NULL; +alter table alerts add retries int(4) DEFAULT '0' NOT NULL; +create index status_retries on alerts (status,retries); + alter table items add trapper_hosts varchar(255) DEFAULT '' NOT NULL; update triggers set status=0 where istrue in (0,1,3); @@ -22,3 +26,5 @@ alter table alarms add value int(4) DEFAULT '0' NOT NULL; update alarms set value=0 where istrue in (0); update alarms set value=1 where istrue in (1); update alarms set value=2 where istrue not in (0,1); + +alter table services add algorithm int(1) DEFAULT '0' NOT NULL; diff --git a/upgrades/dbpatches/1.0beta3_to_1.0beta4/postgresql/patch.sql b/upgrades/dbpatches/1.0beta3_to_1.0beta4/postgresql/patch.sql index eb81b048..25e14093 100644 --- a/upgrades/dbpatches/1.0beta3_to_1.0beta4/postgresql/patch.sql +++ b/upgrades/dbpatches/1.0beta3_to_1.0beta4/postgresql/patch.sql @@ -1,2 +1,4 @@ update config set alert_history=alert_history/(24*3600); update config set alarm_history=alarm_history/(24*3600); + +alter table services add algorithm int4 DEFAULT '0' NOT NULL; |