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/hosts.php | |
| 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/hosts.php')
| -rw-r--r-- | frontends/php/hosts.php | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/frontends/php/hosts.php b/frontends/php/hosts.php index 9af83aba..9ef49f42 100644 --- a/frontends/php/hosts.php +++ b/frontends/php/hosts.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 @@ -173,6 +173,32 @@ $result=update_host_group($_GET["groupid"], $_GET["name"], $_GET["hosts"]); show_messages($result, S_GROUP_UPDATED, _S_CANNOT_UPDATE_GROUP); } + if($_GET["register"]=="start monitoring") + { + $result=DBselect("select hostid from hosts_groups where groupid=".$_GET["groupid"]); + while($row=DBfetch($result)) + { + $res=update_host_status($row["hostid"],HOST_STATUS_MONITORED); + if($res) + { + add_audit(AUDIT_ACTION_UPDATE,AUDIT_RESOURCE_HOST,"New status [".HOST_STATUS_MONITORED."]"); + } + } + show_messages(1,S_HOST_STATUS_UPDATED,S_CANNOT_UPDATE_HOST_STATUS); + } + if($_GET["register"]=="stop monitoring") + { + $result=DBselect("select hostid from hosts_groups where groupid=".$_GET["groupid"]); + while($row=DBfetch($result)) + { + $res=update_host_status($row["hostid"],HOST_STATUS_NOT_MONITORED); + if($res) + { + add_audit(AUDIT_ACTION_UPDATE,AUDIT_RESOURCE_HOST,"New status [".HOST_STATUS_NOT_MONITORED."]"); + } + } + show_messages(1,S_HOST_STATUS_UPDATED,S_CANNOT_UPDATE_HOST_STATUS); + } } ?> |
