Added standby mode on windows agent
This commit is contained in:
parent
ee51114fe8
commit
a0da08e1aa
|
@ -1,6 +1,6 @@
|
||||||
# Base config file for Pandora FMS Windows Agent
|
# Base config file for Pandora FMS Windows Agent
|
||||||
# (c) 2006-2017 Artica Soluciones Tecnologicas
|
# (c) 2006-2017 Artica Soluciones Tecnologicas
|
||||||
# Version 7.0NG.727
|
# Version 7.0NG.727
|
||||||
|
|
||||||
# This program is Free Software, you can redistribute it and/or modify it
|
# This program is Free Software, you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public Licence as published by the Free Software
|
# under the terms of the GNU General Public Licence as published by the Free Software
|
||||||
|
@ -82,6 +82,9 @@ server_port 41121
|
||||||
# Debug mode renames XML in the temp folder and continues running
|
# Debug mode renames XML in the temp folder and continues running
|
||||||
# debug 1
|
# debug 1
|
||||||
|
|
||||||
|
# Default 0, set to 1 to avoid module executions and report to server
|
||||||
|
# standby 1
|
||||||
|
|
||||||
# XML encoding (ISO-8859-1 by default). Most windows servers experience problems when you set to UTF-8. Other special codepages may be specified here.
|
# XML encoding (ISO-8859-1 by default). Most windows servers experience problems when you set to UTF-8. Other special codepages may be specified here.
|
||||||
#encoding ISO-8859-1
|
#encoding ISO-8859-1
|
||||||
|
|
||||||
|
|
|
@ -1869,7 +1869,7 @@ Pandora_Windows_Service::pandora_run_broker (string config) {
|
||||||
|
|
||||||
server_addr = conf->getValue ("server_ip");
|
server_addr = conf->getValue ("server_ip");
|
||||||
|
|
||||||
if (this->broker_modules != NULL) {
|
if (this->broker_modules != NULL && !(conf->getValue ("standby") == "1" && !getPandoraDebug())) {
|
||||||
this->broker_modules->goFirst ();
|
this->broker_modules->goFirst ();
|
||||||
|
|
||||||
while (! this->broker_modules->isLast ()) {
|
while (! this->broker_modules->isLast ()) {
|
||||||
|
@ -1937,7 +1937,7 @@ Pandora_Windows_Service::pandora_run_broker (string config) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data_flag == 1 || this->timestamp + this->interval_sec <= this->run_time) {
|
if ((data_flag == 1 || this->timestamp + this->interval_sec <= this->run_time) && !(conf->getValue ("standby") == "1" && !getPandoraDebug())) {
|
||||||
|
|
||||||
// Send the XML
|
// Send the XML
|
||||||
if (!server_addr.empty ()) {
|
if (!server_addr.empty ()) {
|
||||||
|
@ -1997,7 +1997,7 @@ Pandora_Windows_Service::pandora_run (int forced_run) {
|
||||||
|
|
||||||
execution_number++;
|
execution_number++;
|
||||||
|
|
||||||
if (this->modules != NULL) {
|
if (this->modules != NULL && !(conf->getValue ("standby") == "1" && !getPandoraDebug())) {
|
||||||
this->modules->goFirst ();
|
this->modules->goFirst ();
|
||||||
|
|
||||||
while (! this->modules->isLast ()) {
|
while (! this->modules->isLast ()) {
|
||||||
|
@ -2057,7 +2057,7 @@ Pandora_Windows_Service::pandora_run (int forced_run) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (forced_run == 1 || data_flag == 1 || this->timestamp + this->interval_sec <= this->run_time) {
|
if ((forced_run == 1 || data_flag == 1 || this->timestamp + this->interval_sec <= this->run_time) && !(conf->getValue ("standby") == "1" && !getPandoraDebug())) {
|
||||||
|
|
||||||
// Send the XML
|
// Send the XML
|
||||||
if (!server_addr.empty ()) {
|
if (!server_addr.empty ()) {
|
||||||
|
|
Loading…
Reference in New Issue