+ better management

+ Fix openssl infos
This commit is contained in:
Quentin Garnier 2014-10-29 11:30:30 +01:00
parent 291e2b878f
commit 8c2ed7124f
4 changed files with 29 additions and 17 deletions

View File

@ -71,7 +71,7 @@ It is possible to get this kind of errors in the « logs » of « centreon-es
...SOAP request error - possibly a protocol issue: read failed: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac...
VMWare Perl SDK sometimes generates this error that does not alter the behaviour of the connector.
VMWare Perl SDK sometimes generates this error that does not alter the behaviour of the connector. The bug comes from OpenSSL. It should be fix in OpenSSL 1.0.1h (CVE-2010-5298).
It is necessary to create an incident in case there are too many connections error between the daemon and the VirtualCenter.

View File

@ -72,7 +72,7 @@ Il est possible de retrouver des erreurs de ce type dans les « logs » de «
...SOAP request error - possibly a protocol issue: read failed: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac...
Le SDK Perl VMWare génère cette erreur de temps en temps mais ne bloque pas le fonctionnement du connecteur.
Le SDK Perl VMWare génère cette erreur de temps en temps mais ne bloque pas le fonctionnement du connecteur. Le bug provient d'OpenSSL. Il devrait être fix dans la version 1.0.1h (CVE-2010-5298).
Il est nécessaire de remonter un problème dans le cas d'un trop grand nombres de déconnexion du daemon au VirtualCenter.

View File

@ -93,6 +93,32 @@ sub connect_vsphere {
return 0;
}
sub heartbeat {
my (%options) = @_;
my $stime;
eval {
$stime = $options{connector}->{session1}->get_service_instance()->CurrentTime();
$options{connector}->{keeper_session_time} = time();
};
if ($@) {
$options{connector}->{logger}->writeLogError("$@");
# Try a second time
eval {
$stime = $options{connector}->{session1}->get_service_instance()->CurrentTime();
$options{connector}->{keeper_session_time} = time();
};
if ($@) {
$options{connector}->{logger}->writeLogError("$@");
$options{connector}->{logger}->writeLogError("'" . $options{connector}->{whoaim} . "' Ask a new connection");
# Ask a new connection
$options{connector}->{last_time_check} = time();
}
}
$options{connector}->{logger}->writeLogInfo("'" . $options{connector}->{whoaim} . "' Get current time = " . Data::Dumper::Dumper($stime));
}
sub simplify_number {
my ($number, $cnt) = @_;
$cnt = 2 if (!defined($cnt));

View File

@ -1,4 +1,3 @@
#!/usr/bin/perl -w
package centreon::esxd::connector;
@ -271,20 +270,7 @@ sub run {
###
if (defined($connector->{keeper_session_time}) &&
(time() - $connector->{keeper_session_time}) > ($connector->{config_vsphere_session_heartbeat} * 60)) {
my $stime;
eval {
$stime = $connector->{session1}->get_service_instance()->CurrentTime();
$connector->{keeper_session_time} = time();
};
if ($@) {
$connector->{logger}->writeLogError("$@");
$connector->{logger}->writeLogError("'" . $connector->{whoaim} . "' Ask a new connection");
# Ask a new connection
$connector->{last_time_check} = time();
} else {
$connector->{logger}->writeLogInfo("'" . $connector->{whoaim} . "' Get current time = " . Data::Dumper::Dumper($stime));
}
centreon::esxd::common::heartbeat(connector => $connector);
}
my $data_element;