Commit fb14f40fc6e4a19d4f3d6c1f20580c193c1eedfc

Authored by Starlone Passos
1 parent 2230caa6

Indicador 22 - Coletando e enviando versao do Solr

Showing 1 changed file with 22 additions and 8 deletions   Show diff stats
rn/MdEstatisticasColetarRN.php
... ... @@ -19,20 +19,21 @@ class MdEstatisticasColetarRN extends InfraRN {
19 19 $indicadores = array(
20 20 'seiVersao' => $this->obterVersaoSEI(),
21 21 'phpVersao' => $this->obterVersaoPHP(),
  22 + 'memcachedVersao' => $this->obterVersaoMemcached(),
  23 + 'solrVersao' => $this->obterVersaoSolr(),
22 24 'protocolo' => $this->obterProtocolo(),
23 25 'quantidadeUnidades' => $this->obterQuantidadeUnidades(),
24 26 'quantidadeProcedimentos' => $this->obterQuantidadeProcessosAdministrativos(),
25 27 'quantidadeUsuarios' => $this->obterQuantidadeUsuarios(),
26   - 'navegadores' => $this->obterNavegadores(),
27   - 'modulos' => $this->obterPlugins(),
28   - 'tamanhoFilesystem' => $this->obterTamanhoFileSystem(),
29   - 'bancoSei' => $this->obterTipoSGBD(),
30 28 'quantidadeDocumentosInternos' => $this->obterQuantidadeDocumentosInternos(),
31 29 'quantidadeDocumentosExternos' => $this->obterQuantidadeDocumentosExternos(),
32   - 'extensoes' => $this->obterQuantidadeDocumentosExternosPorExtensao(),
33 30 'estrategiaCessao' => $this->obterEstrategiaCessao(),
34   - 'versaoMemcached' => $this->obterVersaoMemcached(),
35   - 'tamanhoDatabase' => $this->obterTamanoDataBase()
  31 + 'tamanhoDatabase' => $this->obterTamanoDataBase(),
  32 + 'bancoSei' => $this->obterTipoSGBD(),
  33 + 'navegadores' => $this->obterNavegadores(),
  34 + 'modulos' => $this->obterPlugins(),
  35 + 'tamanhoFilesystem' => $this->obterTamanhoFileSystem(),
  36 + 'extensoes' => $this->obterQuantidadeDocumentosExternosPorExtensao()
36 37 );
37 38  
38 39 return $indicadores;
... ... @@ -242,7 +243,20 @@ class MdEstatisticasColetarRN extends InfraRN {
242 243 InfraDebug::getInstance()->gravar('SEI03 - Tamanho do SGBD: ' . $tamanho, InfraLog::$INFORMACAO);
243 244 return $tamanho;
244 245 }
245   -
  246 + private function obterVersaoSolr(){
  247 + $objConfiguracaoSEI = ConfiguracaoSEI::getInstance();
  248 + $url = $objConfiguracaoSEI->getValor('Solr','Servidor', false, 'http://localhost:8983/solr');
  249 + $url = $url . '/admin/info/system?wt=json';
  250 +
  251 + $ch = curl_init();
  252 + curl_setopt($ch, CURLOPT_URL, $url);
  253 + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  254 + $output = curl_exec($ch);
  255 + $json = json_decode($output, true);
  256 + $versao = $json['lucene']['lucene-spec-version'];
  257 + InfraDebug::getInstance()->gravar('SEI22 - Versao Solr: ' . $versao, InfraLog::$INFORMACAO);
  258 + return $versao;
  259 + }
246 260  
247 261 }
248 262 ?>
... ...