From 305dfa441d77031a73accdd8de5bdd2c7592bbc2 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Tue, 22 Oct 2019 14:03:24 +0200 Subject: [PATCH] Minor fix applied --- pandora_server/lib/PandoraFMS/Core.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 280bdb2158..7d03d5da07 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -5273,9 +5273,10 @@ sub pandora_sample_agent ($) { logger($pa_config, "Sample agent activated.", 1); my $utimestamp = time (); my $timestamp = strftime ("%Y-%m-%d %H:%M:%S", localtime()); - # First line - my $xml_output = "{'version'} . "' agent_name='".$pa_config->{'servername'} . "' agent_alias='".$pa_config->{'servername'} . "' interval='".$pa_config->{"self_monitoring_interval"}."' timestamp='".$timestamp."' >"; + my $xml_output = "\n"; + # Header + $xml_output = "\n"; # Boolean_True -> generic_proc siempre a 1 $xml_output .= xml_module_template ("Siempre a uno", "generic_proc","1"); # Boolean_MostlyTrue -> generic_proc un 80% de veces a 1 @@ -5312,7 +5313,7 @@ sub pandora_sample_agent ($) { $xml_output .= xml_module_template ("Random text", "generic_string", $sample_random_text); # End of xml $xml_output .= ""; - # File definition + # File path definition my $filename = $pa_config->{"incomingdir"}."/".$pa_config->{'servername'}.".sample.".$utimestamp.".data"; # Opening, Writing and closing of XML open (my $xmlfile, ">", $filename) or die "[FATAL] Could not open sample XML file for deploying monitorization at '$filename'";