mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
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:
parent
3409440c40
commit
805ae2d670
@ -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>
|
2013-08-26 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* godmode/agentes/module_manager_editor.php,
|
* godmode/agentes/module_manager_editor.php,
|
||||||
|
@ -1273,6 +1273,7 @@
|
|||||||
$username='', $password='', $authtype=1, $proxyhost='',
|
$username='', $password='', $authtype=1, $proxyhost='',
|
||||||
$proxyport=0, $proxyusername='', $proxypassword='', $proxyauthtype=1)
|
$proxyport=0, $proxyusername='', $proxypassword='', $proxyauthtype=1)
|
||||||
{
|
{
|
||||||
|
|
||||||
if($port==0)
|
if($port==0)
|
||||||
{
|
{
|
||||||
$port=80;
|
$port=80;
|
||||||
@ -1401,7 +1402,8 @@
|
|||||||
// let the client see this now in case http times out...
|
// let the client see this now in case http times out...
|
||||||
flush();
|
flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($timeout>0)
|
if($timeout>0)
|
||||||
{
|
{
|
||||||
$fp=@fsockopen($connectserver, $connectport, $this->errno, $this->errstr, $timeout);
|
$fp=@fsockopen($connectserver, $connectport, $this->errno, $this->errstr, $timeout);
|
||||||
@ -1410,29 +1412,30 @@
|
|||||||
{
|
{
|
||||||
$fp=@fsockopen($connectserver, $connectport, $this->errno, $this->errstr);
|
$fp=@fsockopen($connectserver, $connectport, $this->errno, $this->errstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($fp)
|
if($fp)
|
||||||
{
|
{
|
||||||
if($timeout>0 && function_exists('stream_set_timeout'))
|
if($timeout>0 && function_exists('stream_set_timeout'))
|
||||||
{
|
{
|
||||||
stream_set_timeout($fp, $timeout);
|
stream_set_timeout($fp, $timeout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->errstr='Connect error: '.$this->errstr;
|
$this->errstr='Connect error: '.$this->errstr;
|
||||||
$r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr . ' (' . $this->errno . ')');
|
$r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr . ' (' . $this->errno . ')');
|
||||||
return $r;
|
return $r;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!fputs($fp, $op, strlen($op)))
|
if(!fputs($fp, $op, strlen($op)))
|
||||||
{
|
{
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
$this->errstr='Write error';
|
$this->errstr='Write error';
|
||||||
$r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr);
|
$r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr);
|
||||||
return $r;
|
return $r;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// reset errno and errstr on succesful socket connection
|
// reset errno and errstr on succesful socket connection
|
||||||
$this->errstr = '';
|
$this->errstr = '';
|
||||||
}
|
}
|
||||||
@ -1444,6 +1447,11 @@
|
|||||||
// shall we check for $data === FALSE?
|
// shall we check for $data === FALSE?
|
||||||
// as per the manual, it signals an error
|
// as per the manual, it signals an error
|
||||||
$ipd.=fread($fp, 32768);
|
$ipd.=fread($fp, 32768);
|
||||||
|
$info = stream_get_meta_data($fp);
|
||||||
|
|
||||||
|
if ($info['timed_out']) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
} while(!feof($fp));
|
} while(!feof($fp));
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
@ -1491,6 +1499,7 @@
|
|||||||
$proxyhost='', $proxyport=0, $proxyusername='', $proxypassword='', $proxyauthtype=1,
|
$proxyhost='', $proxyport=0, $proxyusername='', $proxypassword='', $proxyauthtype=1,
|
||||||
$keepalive=false, $key='', $keypass='')
|
$keepalive=false, $key='', $keypass='')
|
||||||
{
|
{
|
||||||
|
|
||||||
$r =& $this->sendPayloadCURL($msg, $server, $port, $timeout, $username,
|
$r =& $this->sendPayloadCURL($msg, $server, $port, $timeout, $username,
|
||||||
$password, $authtype, $cert, $certpass, $cacert, $cacertdir, $proxyhost, $proxyport,
|
$password, $authtype, $cert, $certpass, $cacert, $cacertdir, $proxyhost, $proxyport,
|
||||||
$proxyusername, $proxypassword, $proxyauthtype, 'https', $keepalive, $key, $keypass);
|
$proxyusername, $proxypassword, $proxyauthtype, 'https', $keepalive, $key, $keypass);
|
||||||
|
@ -1121,7 +1121,7 @@ END;;
|
|||||||
BEGIN
|
BEGIN
|
||||||
LOCK TABLE talert_actions IN EXCLUSIVE MODE;
|
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 to 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 (1,'Mail to 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 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 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 FMS Event',3,'Event generated by alert','alert_fired','',0,0);
|
INSERT INTO talert_actions (id, name, id_alert_command, field1, field2, field3, id_group, action_threshold) VALUES (3,'Pandora FMS Event',3,'Event generated by alert','alert_fired','',0,0);
|
||||||
COMMIT;
|
COMMIT;
|
||||||
END;;
|
END;;
|
||||||
|
@ -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)));
|
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 to 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 (1,'Mail to 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 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 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 FMS Event',3,'Event generated by alert','alert_fired','',0,0);
|
INSERT INTO "talert_actions" ("id", "name", "id_alert_command", "field1", "field2", "field3", "id_group", "action_threshold") VALUES (3,'Pandora FMS Event',3,'Event generated by alert','alert_fired','',0,0);
|
||||||
SELECT setval('talert_actions_id_seq', (SELECT (SELECT MAX(id) FROM talert_actions)));
|
SELECT setval('talert_actions_id_seq', (SELECT (SELECT MAX(id) FROM talert_actions)));
|
||||||
|
|
||||||
|
@ -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 to 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 (1,'Mail to 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 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 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 FMS Event',3,'Event generated by alert','alert_fired','',0,0);
|
INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `id_group`, `action_threshold`) VALUES (3,'Pandora FMS Event',3,'Event generated by alert','alert_fired','',0,0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user