Added standby mode on windows agent
This commit is contained in:
parent
ee51114fe8
commit
a0da08e1aa
|
@ -82,6 +82,9 @@ server_port 41121
|
|||
# Debug mode renames XML in the temp folder and continues running
|
||||
# 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.
|
||||
#encoding ISO-8859-1
|
||||
|
||||
|
|
|
@ -1869,7 +1869,7 @@ Pandora_Windows_Service::pandora_run_broker (string config) {
|
|||
|
||||
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 ();
|
||||
|
||||
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
|
||||
if (!server_addr.empty ()) {
|
||||
|
@ -1997,7 +1997,7 @@ Pandora_Windows_Service::pandora_run (int forced_run) {
|
|||
|
||||
execution_number++;
|
||||
|
||||
if (this->modules != NULL) {
|
||||
if (this->modules != NULL && !(conf->getValue ("standby") == "1" && !getPandoraDebug())) {
|
||||
this->modules->goFirst ();
|
||||
|
||||
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
|
||||
if (!server_addr.empty ()) {
|
||||
|
|
Loading…
Reference in New Issue