2013-09-05 Miguel de Dios <miguel.dedios@artica.es>

* lib/PandoraFMS/PluginServer.pm: fixed the lost decode html
	entities for the value in the macros.
	
	* util/plugin/dummy_plugin.pl: added tiny plugin server with only
	purpose to testing.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8744 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-09-05 09:57:40 +00:00
parent 14cd85bd03
commit 172fc500ec
3 changed files with 32 additions and 6 deletions

View File

@ -1,3 +1,11 @@
2013-09-05 Miguel de Dios <miguel.dedios@artica.es>
* lib/PandoraFMS/PluginServer.pm: fixed the lost decode html
entities for the value in the macros.
* util/plugin/dummy_plugin.pl: added tiny plugin server with only
purpose to testing.
2013-09-04 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Core.pm,

View File

@ -182,7 +182,9 @@ sub data_consumer ($$) {
if(ref($macros) eq "HASH") {
foreach my $macro_id (keys(%macros))
{
$parameters =~ s/$macros{$macro_id}{'macro'}/$macros{$macro_id}{'value'}/g;
my $macro_value = safe_output($macros{$macro_id}{'value'});
$parameters =~ s/$macros{$macro_id}{'macro'}/$macro_value/g;
}
}
}
@ -215,7 +217,7 @@ sub data_consumer ($$) {
$command .= ' ' . $parameters;
$command = decode_entities($command);
$command = safe_output($command);
logger ($pa_config, "Executing AM # $module_id plugin command '$command'", 9);

View File

@ -0,0 +1,16 @@
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
open STDOUT, '>', "/var/log/pandora/pandora_server.log";
print "------------INIT DUMMY PLUGIN------------------\n";
print Dumper(@ARGV) . "\n";
print "------------END DUMMY PLUGIN------------------\n";
close(STDOUT);
exit 1;