2013-08-26 Miguel de Dios <miguel.dedios@artica.es>

* pandoradb.data.postgreSQL.sql, pandoradb.data.oracle.sql,
	pandoradb_data.sql: fixed the id_alert_command for restart the
	agent set 11 (before it was 10).

2013-08-26 Miguel de Dios <miguel.dedios@artica.es>
	
	* extensions/update_manager/lib/xmlrpc/xmlrpc.inc: fixed the timeout
	for to check packages of pandora update manager.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8697 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-08-26 13:44:44 +00:00
parent f52ce3d71d
commit 8431fa82f9
5 changed files with 29 additions and 9 deletions

View File

@ -1,3 +1,14 @@
2013-08-26 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.data.postgreSQL.sql, pandoradb.data.oracle.sql,
pandoradb_data.sql: fixed the id_alert_command for restart the
agent set 11 (before it was 10).
2013-08-26 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/lib/xmlrpc/xmlrpc.inc: fixed the timeout
for to check packages of pandora update manager.
2013-08-26 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/module_manager_editor.php,

View File

@ -1273,6 +1273,7 @@
$username='', $password='', $authtype=1, $proxyhost='',
$proxyport=0, $proxyusername='', $proxypassword='', $proxyauthtype=1)
{
if($port==0)
{
$port=80;
@ -1401,7 +1402,8 @@
// let the client see this now in case http times out...
flush();
}
if($timeout>0)
{
$fp=@fsockopen($connectserver, $connectport, $this->errno, $this->errstr, $timeout);
@ -1410,29 +1412,30 @@
{
$fp=@fsockopen($connectserver, $connectport, $this->errno, $this->errstr);
}
if($fp)
{
{
if($timeout>0 && function_exists('stream_set_timeout'))
{
stream_set_timeout($fp, $timeout);
}
}
else
{
{
$this->errstr='Connect error: '.$this->errstr;
$r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr . ' (' . $this->errno . ')');
return $r;
}
if(!fputs($fp, $op, strlen($op)))
{
{
fclose($fp);
$this->errstr='Write error';
$r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr);
return $r;
}
else
{
{
// reset errno and errstr on succesful socket connection
$this->errstr = '';
}
@ -1444,6 +1447,11 @@
// shall we check for $data === FALSE?
// as per the manual, it signals an error
$ipd.=fread($fp, 32768);
$info = stream_get_meta_data($fp);
if ($info['timed_out']) {
break;
}
} while(!feof($fp));
fclose($fp);
@ -1491,6 +1499,7 @@
$proxyhost='', $proxyport=0, $proxyusername='', $proxypassword='', $proxyauthtype=1,
$keepalive=false, $key='', $keypass='')
{
$r =& $this->sendPayloadCURL($msg, $server, $port, $timeout, $username,
$password, $authtype, $cert, $certpass, $cacert, $cacertdir, $proxyhost, $proxyport,
$proxyusername, $proxypassword, $proxyauthtype, 'https', $keepalive, $key, $keypass);

View File

@ -1121,7 +1121,7 @@ END;;
BEGIN
LOCK TABLE talert_actions IN EXCLUSIVE MODE;
INSERT INTO talert_actions (id, name, id_alert_command, field1, field2, field3, id_group, action_threshold) VALUES (1,'Mail&#x20;to&#x20;XXX',1,'yourmail@domain.es','[PANDORA] Alert from agent _agent_ on module _module_','',0,0);
INSERT INTO talert_actions (id, name, id_alert_command, field1, field2, field3, id_group, action_threshold) VALUES (2,'Restart&#x20;agent',10,'REFRESH AGENT *','','',0,0);
INSERT INTO talert_actions (id, name, id_alert_command, field1, field2, field3, id_group, action_threshold) VALUES (2,'Restart&#x20;agent',11,'REFRESH AGENT *','','',0,0);
INSERT INTO talert_actions (id, name, id_alert_command, field1, field2, field3, id_group, action_threshold) VALUES (3,'Pandora&#x20;FMS&#x20;Event',3,'Event&#x20;generated&#x20;by&#x20;alert','alert_fired','',0,0);
COMMIT;
END;;

View File

@ -1036,7 +1036,7 @@ INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal
SELECT setval('talert_commands_id_seq', (SELECT (SELECT MAX(id) FROM talert_commands)));
INSERT INTO "talert_actions" ("id", "name", "id_alert_command", "field1", "field2", "field3", "id_group", "action_threshold") VALUES (1,'Mail&#x20;to&#x20;XXX',1,'yourmail@domain.es','[PANDORA] Alert from agent _agent_ on module _module_','',0,0);
INSERT INTO "talert_actions" ("id", "name", "id_alert_command", "field1", "field2", "field3", "id_group", "action_threshold") VALUES (2,'Restart&#x20;agent',10,'REFRESH AGENT *','','',0,0);
INSERT INTO "talert_actions" ("id", "name", "id_alert_command", "field1", "field2", "field3", "id_group", "action_threshold") VALUES (2,'Restart&#x20;agent',11,'REFRESH AGENT *','','',0,0);
INSERT INTO "talert_actions" ("id", "name", "id_alert_command", "field1", "field2", "field3", "id_group", "action_threshold") VALUES (3,'Pandora&#x20;FMS&#x20;Event',3,'Event&#x20;generated&#x20;by&#x20;alert','alert_fired','',0,0);
SELECT setval('talert_actions_id_seq', (SELECT (SELECT MAX(id) FROM talert_actions)));

View File

@ -981,7 +981,7 @@ INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal
INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `id_group`, `action_threshold`) VALUES (1,'Mail&#x20;to&#x20;XXX',1,'yourmail@domain.es','[PANDORA] Alert from agent _agent_ on module _module_','',0,0);
INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `id_group`, `action_threshold`) VALUES (2,'Restart&#x20;agent',10,'REFRESH AGENT *','','',0,0);
INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `id_group`, `action_threshold`) VALUES (2,'Restart&#x20;agent',11,'REFRESH AGENT *','','',0,0);
INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `id_group`, `action_threshold`) VALUES (3,'Pandora&#x20;FMS&#x20;Event',3,'Event&#x20;generated&#x20;by&#x20;alert','alert_fired','',0,0);