Skip to content

Commit e76b6a3

Browse files
authored
Release v1.6.3 stable.
Merge pull request #17 from jocafamaka/developing
2 parents b4dfdd1 + 34bc091 commit e76b6a3

26 files changed

+914
-607
lines changed

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
config.php
22
migrate.php
3+
random.php
34
keys.txt
4-
random*
5-
tests/*
6-
features/*
5+
check.php
6+
tests/
7+
features/

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@ NagMap Reborn is based on NagMap project developed by [Marcel Hecko](https://git
3030
* ChangesBar mode.
3131
* History.
3232
* Alert.
33-
* Alert lite. <sup>(NEW)</sup>
33+
* Alert lite.
3434
* Show content filter.
3535
* Use system of sound warning.
3636
* Show lines between hosts and their parents.
3737
* Time to update hosts status.
3838
* Icons style.
39-
* Which API to use.
39+
* Which API to use.
40+
* Use or not access control. <sup>(NEW)</sup>
4041

4142
## Compatibility
4243

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.6.2
1+
1.6.3

config.php.example

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ $nagMapR_IsNagios = 1;
2828
$nagMapR_MapAPI = 1;
2929

3030
// Set to the centre of your map (lat,long)
31-
$nagMapR_MapCentre = '-6.469293, -50.913464';
31+
$nagMapR_MapCentre = "-6.469293, -50.913464";
3232

3333
// Default zoom level of the map
3434
$nagMapR_MapZoom = 6.2;
@@ -45,7 +45,8 @@ $nagMapR_MapZoom = 6.2;
4545
// How to use the Mapbox styles:
4646
// https://github.com/jocafamaka/nagmapReborn/wiki/How-to-use-the-Mapbox-styles%3F
4747
// Leave blank to use the default.
48-
$nagMapR_LeafletStyle = ''; //For example: https://cartodb-basemaps-{s}.global.ssl.fastly.net/dark_nolabels/{z}/{x}/{y}{r}.png
48+
// For example: https://cartodb-basemaps-{s}.global.ssl.fastly.net/dark_nolabels/{z}/{x}/{y}{r}.png
49+
$nagMapR_LeafletStyle = "";
4950

5051
########################################################
5152
# IF USING GOOGLE MAPS API #
@@ -55,43 +56,44 @@ $nagMapR_LeafletStyle = ''; //For example: https://cartodb-basemaps-{s}.global.
5556
// SATELLITE
5657
// HYBRID
5758
// TERRAIN
58-
$nagMapR_MapType = 'ROADMAP';
59+
$nagMapR_MapType = "ROADMAP";
5960

6061
// Enter your private Google Maps API key here
6162
// See here how to get an API private key:
6263
// (https://developers.google.com/maps/documentation/javascript/get-api-key)
63-
$nagMapR_Mapkey = '';
64+
$nagMapR_Mapkey = "";
6465

6566
// Google Maps custom styles
6667
// If used, this option overlaps the map type defined in ($nagMapR_MapType)
6768
// This option should contain the name of the .json file in the styles folder.
6869
// Custom styles can be created in: (https://mapstyle.withgoogle.com/)
6970
// Look in the styles folder, for ready styles.
7071
// Leave empty if you do not want to use custom style.
71-
$nagMapR_Style = ''; //For example: ($nagMapR_Style = 'Dark';) To use de Dark.json style.
72+
// For example: ($nagMapR_Style = "Dark";) To use de Dark.json style.
73+
$nagMapR_Style = "";
7274

7375
####################################################################################################
7476
# NAGMAP REBORN FEATURES #
7577
####################################################################################################
7678
// Sets the translation file name.
77-
// See the folder 'langs' for available translations.
79+
// See the folder "langs" for available translations.
7880
// You can create your own translation by copying and renaming one of the files and making the
7981
// necessary changes.
80-
$nagMapR_Lang = 'en-US';
82+
$nagMapR_Lang = "en-US";
8183

8284
// Hostgroup filter - only show hosts from this hostgroup
8385
// Leave empty for not filtering
84-
$nagMapR_FilterHostgroup = '';
86+
$nagMapR_FilterHostgroup = "";
8587

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

9698
// Show ChangesBar? (Bar with information about the hosts)
9799
// 1 = YES.
@@ -125,7 +127,7 @@ $nagMapR_BarFilter = 1;
125127
$nagMapR_DateFormat = 1;
126128

127129
// Play alert when a server's status changes to down?
128-
// To change the alert sound, simply replace the file 'Beep.mp3' in the resources folder
130+
// To change the alert sound, simply replace the file "Beep.mp3" in the resources folder
129131
// In some browsers it is necessary for user to interact with the page before it emits a sound,
130132
// so an initial interaction is required for the alert to be played.
131133
// 1 = YES.
@@ -155,11 +157,16 @@ $nagMapR_Reporting = 1;
155157
# SECURITY INFORMATION #
156158
####################################################################################################
157159
// Security key to protect data from external requests (use only letters and numbers)
158-
$nagMapR_key = 'O9CJ16er3XsjI5Bj1CHmGnS6Yv4xQuBuGhx3h9fa2ZU0SuOkhBIVR8MtkLhyG0SiMJr3YCG98hz1eh99vVLZ0b3NbTUKLs4M';
160+
$nagMapR_key = "AHgRux3iIEMLnh60v7CMUlHlYqM2AtFsHausnSUn63NJEtp7glX3ClkHS12Mc7ASiVu5wqePXNNAwzYAE0pOcfnRvbn4zClb";
161+
162+
// Request authentication when accessing the page?
163+
// 1 = YES (Strongly recommended).
164+
// 0 = NO.
165+
$nagMapR_useAuth = 1;
159166

160167
// User used for authentication.
161168
$nagMapR_User = "ngradmin";
162169

163170
// Password used for authentication.
164171
$nagMapR_UserKey = "ngradmin";
165-
?>
172+
?>

config.php.example_pt-BR

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ $nagMapR_IsNagios = 1;
2828
$nagMapR_MapAPI = 1;
2929

3030
// Defina o centro do mapa (latitude, longitude)
31-
$nagMapR_MapCentre = '-4.018935, -52.607260';
31+
$nagMapR_MapCentre = "-4.018935, -52.607260";
3232

3333
// Nivel padrao de zoom no mapa.
3434
$nagMapR_MapZoom = 6.2;
@@ -45,7 +45,8 @@ $nagMapR_MapZoom = 6.2;
4545
// Como usar o estilos do Mapbox:
4646
// https://github.com/jocafamaka/nagmapReborn/wiki/Como-usar-o-estilos-do-Mapbox%3F
4747
// Deixe em branco para utilizar o padrão.
48-
$nagMapR_LeafletStyle = ''; //Por exemplo: https://cartodb-basemaps-{s}.global.ssl.fastly.net/dark_nolabels/{z}/{x}/{y}{r}.png
48+
// Por exemplo: https://cartodb-basemaps-{s}.global.ssl.fastly.net/dark_nolabels/{z}/{x}/{y}{r}.png
49+
$nagMapR_LeafletStyle = "";
4950

5051
########################################################
5152
# SE UTILIZANDO GOOGLE MAPS API #
@@ -55,43 +56,44 @@ $nagMapR_LeafletStyle = ''; //Por exemplo: https://cartodb-basemaps-{s}.global.
5556
// SATELLITE
5657
// HYBRID
5758
// TERRAIN
58-
$nagMapR_MapType = 'ROADMAP';
59+
$nagMapR_MapType = "ROADMAP";
5960

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

6566
// Estilos personalizados do Google Maps
6667
// Se utilizado, essa opcao sobrepoem o tipo de mapa definido em ($nagMapR_MapType)
67-
// Essa opcao deve conter o nome do arquivo .json presente na pasta 'styles'.
68+
// Essa opcao deve conter o nome do arquivo .json presente na pasta "styles".
6869
// Estilos personalizados podem ser criados aqui: (https://mapstyle.withgoogle.com/)
69-
// Veja na pasta 'styles' os estilos prontos para uso.
70+
// Veja na pasta "styles" os estilos prontos para uso.
7071
// Deixe em branco para nao utilizar estilos personalizados.
71-
$nagMapR_Style = ''; //Por exemplo: ($nagMapR_Style = 'Dark';) Para usar o estilo Dark.json
72+
//Por exemplo: ($nagMapR_Style = "Dark";) Para usar o estilo Dark.json
73+
$nagMapR_Style = "";
7274

7375
####################################################################################################
7476
# CARACTERISTICAS DO NAGMAP REBORN #
7577
####################################################################################################
7678
// Define o nome do arquivo de traducao.
77-
// Veja na pasta 'langs' as traducoes disponiveis.
79+
// Veja na pasta "langs" as traducoes disponiveis.
7880
// Voce pode criar sua propria traducao, basta somente copiar e renomear um dos arquivos existentes
7981
// e fazer as mudanças necessarias
80-
$nagMapR_Lang = 'pt-BR';
82+
$nagMapR_Lang = "pt-BR";
8183

8284
// Filtro de Hostgroup, mostra somente os host pertecentes a esse hostgroup.
8385
// Deixe em branco para não filtrar.
84-
$nagMapR_FilterHostgroup = '';
86+
$nagMapR_FilterHostgroup = "";
8587

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

9698
// Exibir ChangesBar? (Barra com informãcoes sobre os hosts)
9799
// 1 = SIM.
@@ -125,7 +127,7 @@ $nagMapR_DateFormat = 1;
125127
$nagMapR_BarFilter = 1;
126128

127129
// Tocar um alerta sonoro quando o status de um host mudar para down?
128-
// Para mudar o alerta tocado, basta somente substituir o arquivo 'Beep.mp3' na pasta resources.
130+
// Para mudar o alerta tocado, basta somente substituir o arquivo "Beep.mp3" na pasta resources.
129131
// Em alguns browsers e necessario que usuario interaja com a pagina antes que ela emita algum som,
130132
// sendo assim e necessario uma interacao inicial para que o alerta seja tocado.
131133
// 1 = SIM.
@@ -155,11 +157,16 @@ $nagMapR_Reporting = 1;
155157
# INFORMACAO DE SEGURANCA #
156158
####################################################################################################
157159
// Chave de seguranca, protege de requisicoes externas. (use somente numeros e letras)
158-
$nagMapR_key = 'O9CJ16er3XsjI5Bj1CHmGnS6Yv4xQuBuGhx3h9fa2ZU0SuOkhBIVR8MtkLhyG0SiMJr3YCG98hz1eh99vVLZ0b3NbTUKLs4M';
160+
$nagMapR_key = "AHgRux3iIEMLnh60v7CMUlHlYqM2AtFsHausnSUn63NJEtp7glX3ClkHS12Mc7ASiVu5wqePXNNAwzYAE0pOcfnRvbn4zClb";
161+
162+
// Solicitar autenticacao para acessar a pagina?
163+
// 1 = SIM (Fortemente recomendado).
164+
// 0 = NAO.
165+
$nagMapR_useAuth = 1;
159166

160167
// Usuario utilizado na autenticacao.
161168
$nagMapR_User = "ngradmin";
162169

163170
// Senha utilizada na autenticacao.
164171
$nagMapR_UserKey = "ngradmin";
165-
?>
172+
?>

debugInfo/debugInfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
include('../config.php');
77
include("../langs/$nagMapR_Lang.php");
88

9-
if($key == $nagMapR_key){
9+
if($key == $nagMapR_key && $nagMapR_Debug == 1){
1010
if (!file_exists($nagios_status_dat_file)) {
1111
die("</script>$nagios_status_dat_file $file_not_find_error");
1212
}

0 commit comments

Comments
 (0)