Skip to content

Commit

Permalink
New architecture | New options | Improvements | Corrections
Browse files Browse the repository at this point in the history
The following changes were made:
 - Change in project architecture.
 - New option for automatic error reporting. Using RSA encryption.
 - New service filter option.
 - Now DebugInfo is able to show all the services of a host
 - Improvements in some functions.
 - Corrections in translations.
 - Version update.

CAUTION: Due to architectural change, it is not recommended when updating simple overwriting of files. Because it can cause duplicate files and configuration problems.
  • Loading branch information
jocafamaka committed Aug 22, 2018
1 parent 4839482 commit 59bd03d
Show file tree
Hide file tree
Showing 50 changed files with 1,783 additions and 659 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
config.php
keys.txt
47 changes: 31 additions & 16 deletions config.php.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@
$nagios_cfg_file = "/usr/local/nagios/etc/nagios.cfg";
$nagios_status_dat_file = "/usr/local/nagios/var/status.dat";

// Hostgroup filter - only show hosts from this hotgroup
// Leave empty for not filtering
$nagMapR_FilterHostgroup = '';

// Use this only to generate extra information for support - this will add a lot of information
// into the rendered index file
// Use Debug?
// Use this only to generate extra information for support.
// 1 = YES.
// 0 = NO.
$nagMapR_Debug = 0;

//Define if the monitoring system is nagios, if it does not hide some specific information.
// Define if the monitoring system is nagios, if it does not hide some specific information.
// 1 = YES, the monitoring system is Nagios.
// 0 = NO, the monitoring system is not Nagios.
$nagMapR_IsNagios = 1;
Expand All @@ -39,8 +35,8 @@ $nagMapR_MapZoom = 6.2;
// TERRAIN
$nagMapR_MapType = 'ROADMAP';

//Enter your private API key here
//See here how to get an API private key: (https://developers.google.com/maps/documentation/javascript/get-api-key)
// Enter your private API key here
// See here how to get an API private key: (https://developers.google.com/maps/documentation/javascript/get-api-key)
$nagMapR_Mapkey = '';

####################################################################################################
Expand All @@ -52,12 +48,26 @@ $nagMapR_Mapkey = '';
// necessary changes.
$nagMapR_Lang = 'en-US';

//Custom styles
//If used, this option overlaps the map type defined in ($nagMapR_MapType)
//This option should contain the name of the .json file in the styles folder.
//Custom styles can be created in: (https://mapstyle.withgoogle.com/)
//Look in the styles folder, for ready styles.
//Leave empty if you do not want to use custom style.
// Hostgroup filter - only show hosts from this hostgroup
// Leave empty for not filtering
$nagMapR_FilterHostgroup = '';

// Service filter - Use the status of a specific service as the primary. The service that will be used
// to set the status on the map. Useful when there is more than one service per host.
// More than one service can be used in the filter (using ';' as a separator), as long a single host
// does not contain more than one of the filtered services.
// It is not necessary to indicate the full name of the service, but a single part that sets it apart
// from others is enough.
// Services are filtered by service_description.
// Leave empty for not filtering
$nagMapR_FilterService = '';

// Custom styles
// If used, this option overlaps the map type defined in ($nagMapR_MapType)
// This option should contain the name of the .json file in the styles folder.
// Custom styles can be created in: (https://mapstyle.withgoogle.com/)
// Look in the styles folder, for ready styles.
// Leave empty if you do not want to use custom style.
$nagMapR_Style = ''; //For example: ($nagMapR_Style = 'Dark';) To use de Dark.json style.

// Show ChangesBar? (Bar with information about the hosts)
Expand Down Expand Up @@ -102,9 +112,14 @@ $nagMapR_Lines = 1;
// Time in seconds, to update the hosts status. (use only numbers)
$nagMapR_TimeUpdate = 10;

// Allow automatic errors reporting?
// 1 = YES.
// 0 = NO.
$nagMapR_Reporting = 1;

####################################################################################################
# SECURITY INFORMATION #
####################################################################################################
// Security key to protect data from external requests (use only letters and numbers)
$nagMapR_key = '4T4whvqi9wthrvGXhzas21JTrCpUcSd5Nc6PWct6QOQuGKtRp2';
$nagMapR_key = 'JFJQPLyCqcEnTOe7ReWJUzYO7QA9Tq9v9XOhTQfEvLe3dUiQLdoVVny2PI9gdcJ0R8TWadF6m8j8iqPKpqCFZBr2XnCaVFyWGTlND5BG2C58qvMr3AjYfv01T7qoPmoh';
?>
126 changes: 126 additions & 0 deletions config.php.example_pt-BR
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<?php
####################################################################################################
# CONFIGURAÇÕES GERAIS #
####################################################################################################
// Defina essa duas linhas, elas sao extremamente importantes
// No linux execute `updatedb`, `locate nagios.cfg` e `locate status.dat` para encontrar esses arquivos
// Eles geralmente ficam em: /usr/local/nagios/etc/nagios.cfg e /usr/local/nagios/var/status.dat
$nagios_cfg_file = "/usr/local/nagios/etc/nagios.cfg";
$nagios_status_dat_file = "/usr/local/nagios/var/status.dat";

// Ativar Debug?
// Use somente para gerar informacoes extras para suporte e acessar a pagina Debug Info.
// 1 = SIM.
// 0 = NAO.
$nagMapR_Debug = 0;

// Define se o sistema de monitoramento e o Nagios, caso nao, esconde algumas informacoes especificas.
// 1 = SIM, o sistema de monitoramento e o Nagios.
// 0 = NAO, o sistema de monitoramento nao e o Nagios.
$nagMapR_IsNagios = 1;

####################################################################################################
# PREFERENCIAS DO MAPA #
####################################################################################################
// Defina o centro do mapa (latitude, longitude)
$nagMapR_MapCentre = '-4.018935, -52.607260';

// Nivel padrao de zoom no mapa.
$nagMapR_MapZoom = 6.2;

// Qual tipo de mapa?
// ROADMAP
// SATELLITE
// HYBRID
// TERRAIN
$nagMapR_MapType = 'ROADMAP';

// Insira sua chave privada de API.
// Veja aqui como conseguir uma chave privada de API (EM INGLES):
// https://developers.google.com/maps/documentation/javascript/get-api-key
$nagMapR_Mapkey = '';

####################################################################################################
# CARACTERISTICAS DO NAGMAP REBORN #
####################################################################################################
// Define o nome do arquivo de traducao.
// Veja na pasta 'langs' as traducoes disponiveis.
// Voce pode criar sua propria traducao, basta somente copiar e renomear um dos arquivos existentes
// e fazer as mudanças necessarias
$nagMapR_Lang = 'pt-BR';

// Filtro de Hostgroup, mostra somente os host pertecentes a esse hostgroup.
// Deixe em branco para não filtrar.
$nagMapR_FilterHostgroup = '';

// Filtro de servicos - Usa o status de um servico especifico como primario. O servico que sera
// usado para definir o status no mapa. Util quando existem mais de um servico por host.
// Pode ser utilizado mais de um servico no filtro (utilizando ';' como separador), desde que um
// um unico host nao contenha mais de um dos servicos filtrados.
// Nao e necessario informar o nome completo do servico, mas uma parte unica que diferencie o servico
// dos demais ja e o suficiente.
// Os servicos sao filtrados pelo service_description.
// Deixe em branco para não filtrar.
$nagMapR_FilterService = '';

// Estilos personalizados
// Se utilizado, essa opcao sobrepoem o tipo de mapa definido em ($nagMapR_MapType)
// Essa opcao deve conter o nome do arquivo .json presente na pasta 'styles'.
// Estilos personalizados podem ser criados aqui: (https://mapstyle.withgoogle.com/)
// Veja na pasta 'styles' os estilos prontos para uso.
// Deixe em branco para nao utilizar estilos personalizados.
$nagMapR_Style = ''; //Por exemplo: ($nagMapR_Style = 'Dark';) Para usar o estilo Dark.json

// Exibir ChangesBar? (Barra com informãcoes sobre os hosts)
// 1 = SIM.
// 0 = NAO.
$nagMapR_ChangesBar = 1;

// Seelecione o modo de operacao da ChangesBar
// 1 = Modo historico mode. (Exibe todas as ocorrencias de forma sequencial com a data e hora)
// 2 = Modo alerta. (Exibe somente os hosts que estao DOWN, CRITICAL ou em WARNING, com o tempo decorrido)
$nagMapR_ChangesBarMode = 2;

// Tamanho em porcentagem ocupado pela ChangesBar na tela. (use somente numeros)
$nagMapR_ChangesBarSize = 15;

// Tamanho da fonte em pixel usado na ChangesBar. (use somente numeros)
$nagMapR_FontSize = 15;

// Define o formato de data utilizado na ChangesBar.
// 1 = DD/MM/YYYY
// 2 = MM/DD/YYYY
// 3 = YYYY/MM/DD
$nagMapR_DateFormat = 1;

// Tocar um alerta sonoro quando o status de um host mudar para down?
// Para mudar o alerta tocado, basta somente substituir o arquivo 'Beep.mp3' na pasta do NagMap Reborn.
// 1 = SIM.
// 0 = NAO.
$nagMapR_PlaySound = 1;

// Escolha o estilo dos icones no mapa.
// 0 = Icone original.
// 1 = Sem bordas com sombra.
// 2 = Com bordas sem sombra.
$nagMapR_IconStyle = 1;

// Mostrar linha entre hosts e seus parentes?.
// 1 = SIM.
// 0 = NAO.
$nagMapR_Lines = 1;

// Tempo em segundos, para atualização do status dos hosts. (use somente numeros)
$nagMapR_TimeUpdate = 10;

// Reportar erros automaticamente?
// 1 = SIM.
// 0 = NAO.
$nagMapR_Reporting = 1;

####################################################################################################
# INFORMACAO DE SEGURANCA #
####################################################################################################
// Chave de seguranca, protege de requisicoes externas. (use somente numeros e letras)
$nagMapR_key = 'JFJQPLyCqcEnTOe7ReWJUzYO7QA9Tq9v9XOhTQfEvLe3dUiQLdoVVny2PI9gdcJ0R8TWadF6m8j8iqPKpqCFZBr2XnCaVFyWGTlND5BG2C58qvMr3AjYfv01T7qoPmoh';
?>
Loading

0 comments on commit 59bd03d

Please sign in to comment.