X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=contrib%2Fexec-nagios.px;h=b26981fb32c7687507ae1690a53ceefa29ca6984;hb=f558b0dae60f18b6596d596cdcebb913756ce9f1;hp=938721fc55624977fa89d5ea3a1d289531573b6d;hpb=c18f7cbb2645e67765f9aa7e15f59a556735706c;p=collectd.git diff --git a/contrib/exec-nagios.px b/contrib/exec-nagios.px index 938721fc..b26981fb 100755 --- a/contrib/exec-nagios.px +++ b/contrib/exec-nagios.px @@ -235,6 +235,7 @@ sub handle_performance_data my $type = shift; my $time = shift; my $line = shift; + my $ident = "$host/$plugin-$pinst/$type-$tinst"; my $tinst; my $value; @@ -250,7 +251,9 @@ sub handle_performance_data return; } - print "PUTVAL $host/$plugin-$pinst/$type-$tinst interval=$Interval ${time}:$value\n"; + $ident =~ s/"/\\"/g; + + print qq(PUTVAL "$ident" interval=$Interval ${time}:$value\n); } sub execute_script