diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-05-15 18:53:33 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-05-15 18:53:33 +0000 |
| commit | 20ff0332e4cebfb212300f3d9496f14e400a6234 (patch) | |
| tree | 2e0cabe69c9bbc7ffca7d3b9783f788334f3cff2 /frontends/php/include | |
| parent | f11bd43692bbd9c13e94cccad81eea4a92b7b06f (diff) | |
| download | zabbix-20ff0332e4cebfb212300f3d9496f14e400a6234.tar.gz zabbix-20ff0332e4cebfb212300f3d9496f14e400a6234.tar.xz zabbix-20ff0332e4cebfb212300f3d9496f14e400a6234.zip | |
- change copyright to SIA Zabbix (Alexei)
- added basic support for log[*] (Alexei)
- fixed processing of traps having character ':' (Alexei)
- added logfiles.h and logfiles.c (Alexei)
- group level start/stop monitoring (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1774 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
| -rw-r--r-- | frontends/php/include/actions.inc.php | 4 | ||||
| -rw-r--r-- | frontends/php/include/audit.inc.php | 4 | ||||
| -rw-r--r-- | frontends/php/include/classes.inc.php | 4 | ||||
| -rw-r--r-- | frontends/php/include/config.inc.php | 31 | ||||
| -rw-r--r-- | frontends/php/include/db.inc.php | 4 | ||||
| -rw-r--r-- | frontends/php/include/defines.inc.php | 4 | ||||
| -rw-r--r-- | frontends/php/include/forms.inc.php | 6 | ||||
| -rw-r--r-- | frontends/php/include/graphs.inc.php | 4 | ||||
| -rw-r--r-- | frontends/php/include/hosts.inc.php | 30 | ||||
| -rw-r--r-- | frontends/php/include/html.inc.php | 4 | ||||
| -rw-r--r-- | frontends/php/include/items.inc.php | 22 | ||||
| -rw-r--r-- | frontends/php/include/local_en.inc.php | 8 | ||||
| -rw-r--r-- | frontends/php/include/maps.inc.php | 4 | ||||
| -rw-r--r-- | frontends/php/include/screens.inc.php | 4 | ||||
| -rw-r--r-- | frontends/php/include/services.inc.php | 4 | ||||
| -rw-r--r-- | frontends/php/include/triggers.inc.php | 4 | ||||
| -rw-r--r-- | frontends/php/include/users.inc.php | 4 |
17 files changed, 81 insertions, 64 deletions
diff --git a/frontends/php/include/actions.inc.php b/frontends/php/include/actions.inc.php index b808a249..d6e403a1 100644 --- a/frontends/php/include/actions.inc.php +++ b/frontends/php/include/actions.inc.php @@ -1,7 +1,7 @@ <?php /* -** Zabbix -** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/frontends/php/include/audit.inc.php b/frontends/php/include/audit.inc.php index 3f7a6b26..5364e121 100644 --- a/frontends/php/include/audit.inc.php +++ b/frontends/php/include/audit.inc.php @@ -1,7 +1,7 @@ <?php /* -** Zabbix -** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/frontends/php/include/classes.inc.php b/frontends/php/include/classes.inc.php index 1655eea0..e5ce1aaf 100644 --- a/frontends/php/include/classes.inc.php +++ b/frontends/php/include/classes.inc.php @@ -1,7 +1,7 @@ <?php /* -** Zabbix -** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php index a8e41003..01ac0326 100644 --- a/frontends/php/include/config.inc.php +++ b/frontends/php/include/config.inc.php @@ -1,7 +1,7 @@ <?php /* -** Zabbix -** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -1439,31 +1439,6 @@ echo "</head>"; return $exp; } - # Update Host status - - function update_host_status($hostid,$status) - { - if(!check_right("Host","U",0)) - { - error("Insufficient permissions"); - return 0; - } - - $sql="select status from hosts where hostid=$hostid"; - $result=DBselect($sql); - $old_status=DBget_field($result,0,0); - if($status != $old_status) - { - update_trigger_value_to_unknown_by_hostid($hostid); - $sql="update hosts set status=$status where hostid=$hostid and status!=".HOST_STATUS_DELETED; - return DBexecute($sql); - } - else - { - return 1; - } - } - function add_image($name,$imagetype,$files) { if(isset($files)) @@ -2592,7 +2567,7 @@ echo "</head>"; <p> <table class="menu" width="100%" cellspacing=0 cellpadding=5> <tr> -<td class="horizontal_menu" height=24 colspan=9 align=center><b><?php echo "<a href=\"http://www.zabbix.com\" class=\"highlight\">".S_ZABBIX_VER."</a> ".S_COPYRIGHT_BY."<a href=\"mailto:alex@gobbo.caves.lv\" class=\"highlight\">".S_ALEXEI_VLADISHEV."</a>"; ?></b></td> +<td class="horizontal_menu" height=24 colspan=9 align=center><b><?php echo "<a href=\"http://www.zabbix.com\" class=\"highlight\">".S_ZABBIX_VER."</a> ".S_COPYRIGHT_BY."<a href=\"mailto:alex@gobbo.caves.lv\" class=\"highlight\">".S_SIA_ZABBIX."</a>"; ?></b></td> <td class="horizontal_menu" height=24 colspan=9 align=right><b><span class="divider"> | </span><?php echo " ".S_CONNECTED_AS." ".$USER_DETAILS["alias"];?></b></td> </tr> </table> diff --git a/frontends/php/include/db.inc.php b/frontends/php/include/db.inc.php index 694d7de1..2a9dd3da 100644 --- a/frontends/php/include/db.inc.php +++ b/frontends/php/include/db.inc.php @@ -1,7 +1,7 @@ <?php /* -** Zabbix -** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/frontends/php/include/defines.inc.php b/frontends/php/include/defines.inc.php index f294e85c..636bd68c 100644 --- a/frontends/php/include/defines.inc.php +++ b/frontends/php/include/defines.inc.php @@ -1,7 +1,7 @@ <?php /* -** Zabbix -** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php index cb5722ab..fef7db5c 100644 --- a/frontends/php/include/forms.inc.php +++ b/frontends/php/include/forms.inc.php @@ -1,7 +1,7 @@ <?php /* -** Zabbix -** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -607,6 +607,8 @@ { echo "<input class=\"button\" type=\"submit\" name=\"register\" value=\"update group\">"; echo "<input class=\"button\" type=\"submit\" name=\"register\" value=\"delete group\" onClick=\"return Confirm('Delete selected group?');\">"; + echo "<input class=\"button\" type=\"submit\" name=\"register\" value=\"start monitoring\">"; + echo "<input class=\"button\" type=\"submit\" name=\"register\" value=\"stop monitoring\">"; } echo "</form>"; show_table2_header_end(); diff --git a/frontends/php/include/graphs.inc.php b/frontends/php/include/graphs.inc.php index 158d2ac5..7b07bdb3 100644 --- a/frontends/php/include/graphs.inc.php +++ b/frontends/php/include/graphs.inc.php @@ -1,7 +1,7 @@ <?php /* -** Zabbix -** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/frontends/php/include/hosts.inc.php b/frontends/php/include/hosts.inc.php index f1e399f9..67a1bd8a 100644 --- a/frontends/php/include/hosts.inc.php +++ b/frontends/php/include/hosts.inc.php @@ -1,7 +1,7 @@ <?php /* -** Zabbix -** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -199,4 +199,30 @@ } return $host; } + + # Update Host status + + function update_host_status($hostid,$status) + { + if(!check_right("Host","U",0)) + { + error("Insufficient permissions"); + return 0; + } + + $sql="select status,host from hosts where hostid=$hostid"; + $result=DBselect($sql); + $old_status=DBget_field($result,0,0); + if($status != $old_status) + { + update_trigger_value_to_unknown_by_hostid($hostid); + $sql="update hosts set status=$status where hostid=$hostid and status!=".HOST_STATUS_DELETED; + info("Updated status of host ".DBget_field($result,0,1)); + return DBexecute($sql); + } + else + { + return 1; + } + } ?> diff --git a/frontends/php/include/html.inc.php b/frontends/php/include/html.inc.php index 4c1b70d1..b40b10f9 100644 --- a/frontends/php/include/html.inc.php +++ b/frontends/php/include/html.inc.php @@ -1,7 +1,7 @@ <?php /* -** Zabbix -** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/frontends/php/include/items.inc.php b/frontends/php/include/items.inc.php index 652688f2..348f38fd 100644 --- a/frontends/php/include/items.inc.php +++ b/frontends/php/include/items.inc.php @@ -1,7 +1,7 @@ <?php /* -** Zabbix -** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -62,6 +62,10 @@ $sql="insert into items (description,key_,hostid,delay,history,nextcheck,status,type,snmp_community,snmp_oid,value_type,trapper_hosts,snmp_port,units,multiplier,delta,snmpv3_securityname,snmpv3_securitylevel,snmpv3_authpassphrase,snmpv3_privpassphrase,formula,trends) values ('$description','$key',$hostid,$delay,$history,0,$status,$type,'$snmp_community','$snmp_oid',$value_type,'$trapper_hosts',$snmp_port,'$units',$multiplier,$delta,'$snmpv3_securityname',$snmpv3_securitylevel,'$snmpv3_authpassphrase','$snmpv3_privpassphrase','$formula',$trends)"; $result=DBexecute($sql); + if($result) + { + info("Added new item $key"); + } return DBinsert_id($result,"items","itemid"); } @@ -115,7 +119,12 @@ $snmpv3_privpassphrase=addslashes($snmpv3_privpassphrase); $sql="update items set description='$description',key_='$key',hostid=$hostid,delay=$delay,history=$history,nextcheck=0,status=$status,type=$type,snmp_community='$snmp_community',snmp_oid='$snmp_oid',value_type=$value_type,trapper_hosts='$trapper_hosts',snmp_port=$snmp_port,units='$units',multiplier=$multiplier,delta=$delta,snmpv3_securityname='$snmpv3_securityname',snmpv3_securitylevel=$snmpv3_securitylevel,snmpv3_authpassphrase='$snmpv3_authpassphrase',snmpv3_privpassphrase='$snmpv3_privpassphrase',formula='$formula',trends=$trends where itemid=$itemid"; - return DBexecute($sql); + $result=DBexecute($sql); + if($result) + { + info("Item $key updated"); + } + return $result; } # Add item to hardlinked hosts @@ -253,6 +262,11 @@ return $result; } $sql="delete from items where itemid=$itemid"; - return DBexecute($sql); + $result=DBexecute($sql); + if($result) + { + info("Item $key deleted"); + } + return $result; } ?> diff --git a/frontends/php/include/local_en.inc.php b/frontends/php/include/local_en.inc.php index bfc1b702..9bd60943 100644 --- a/frontends/php/include/local_en.inc.php +++ b/frontends/php/include/local_en.inc.php @@ -1,7 +1,7 @@ <?php /* -** Zabbix -** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -195,7 +195,7 @@ define("S_ZABBIX_VER", "ZABBIX 1.1alpha8"); define("S_COPYRIGHT_BY", "Copyright 2001-2005 by "); define("S_CONNECTED_AS", "Connected as"); - define("S_ALEXEI_VLADISHEV", "Alexei Vladishev"); + define("S_SIA_ZABBIX", "SIA Zabbix"); // graph.php define("S_CONFIGURATION_OF_GRAPH", "Configuration of graph"); @@ -237,7 +237,7 @@ define("S_VALUES_OF_LAST_HOUR", "Values of last hour"); define("S_VALUES_OF_SPECIFIED_PERIOD", "Values of specified period"); define("S_VALUES_IN_PLAIN_TEXT_FORMAT", "Values in plain text format"); - define("S_CLOCK", "Clock"); + define("S_TIMESTAMP", "Timestamp"); // hosts.php define("S_HOSTS", "Hosts"); diff --git a/frontends/php/include/maps.inc.php b/frontends/php/include/maps.inc.php index 0b0a758a..08fdc2c8 100644 --- a/frontends/php/include/maps.inc.php +++ b/frontends/php/include/maps.inc.php @@ -1,7 +1,7 @@ <?php /* -** Zabbix -** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/frontends/php/include/screens.inc.php b/frontends/php/include/screens.inc.php index 688e950b..1439e45e 100644 --- a/frontends/php/include/screens.inc.php +++ b/frontends/php/include/screens.inc.php @@ -1,7 +1,7 @@ <?php /* -** Zabbix -** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/frontends/php/include/services.inc.php b/frontends/php/include/services.inc.php index 9c9af979..23e68379 100644 --- a/frontends/php/include/services.inc.php +++ b/frontends/php/include/services.inc.php @@ -1,7 +1,7 @@ <?php /* -** Zabbix -** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/frontends/php/include/triggers.inc.php b/frontends/php/include/triggers.inc.php index 415c5cf9..f316517a 100644 --- a/frontends/php/include/triggers.inc.php +++ b/frontends/php/include/triggers.inc.php @@ -1,7 +1,7 @@ <?php /* -** Zabbix -** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/frontends/php/include/users.inc.php b/frontends/php/include/users.inc.php index a6495424..9012f2de 100644 --- a/frontends/php/include/users.inc.php +++ b/frontends/php/include/users.inc.php @@ -1,7 +1,7 @@ <?php /* -** Zabbix -** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by |
