Title: [opsview-perl] [798] Updated NRD to allow input_delimiter option
Revision
798
Author
tvoon
Date
2013-10-15 14:52:15 +0100 (Tue, 15 Oct 2013)

Log Message

Updated NRD to allow input_delimiter option

Modified Paths


Added Paths

Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES	2013-10-03 12:55:52 UTC (rev 797)
+++ trunk/CHANGES	2013-10-15 13:52:15 UTC (rev 798)
@@ -1,3 +1,6 @@
+4.5.0
+    Updated NRD to include input_delimiter option
+
 4.4.0
     Updated libwww-perl and dependencies to possibly fix LWP issues with activations
     Updated DBD::mysql to 0.423 with patch for memory leak when use_server_side_prepare

Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2013-10-03 12:55:52 UTC (rev 797)
+++ trunk/Makefile	2013-10-15 13:52:15 UTC (rev 798)
@@ -1,4 +1,4 @@
-VERSION = 4.4.0
+VERSION = 4.5.0
 REVISION := $(shell ./tools/get_version | awk '{print $$1}')
 RELEASE=1
 WORKDIR := $(shell pwd)

Added: trunk/patches/NRD-Daemon/03-different-delimiters.patch
===================================================================
--- trunk/patches/NRD-Daemon/03-different-delimiters.patch	                        (rev 0)
+++ trunk/patches/NRD-Daemon/03-different-delimiters.patch	2013-10-15 13:52:15 UTC (rev 798)
@@ -0,0 +1,46 @@
+diff -ur NRD-Daemon-0.04.original//lib/NRD/Serialize.pm NRD-Daemon-0.04/lib/NRD/Serialize.pm
+--- NRD-Daemon-0.04.original//lib/NRD/Serialize.pm	2011-01-13 22:37:18.000000000 +0000
++++ NRD-Daemon-0.04/lib/NRD/Serialize.pm	2013-10-15 13:40:43.000000000 +0000
+@@ -6,20 +6,21 @@
+ sub from_line {
+   my ($self, $line) = @_;
+   my $r = {};
+-  my @parts = split /\t/, $line;
++  my @parts = split $self->{delimiter_re}, $line;
+ 
+   if (scalar(@parts) == 3){
+     ($r->{'host_name'}, $r->{'return_code'}, $r->{'plugin_output'}) = @parts;
+   } elsif(scalar(@parts) == 4) {
+     ($r->{'host_name'}, $r->{'svc_description'}, $r->{'return_code'}, $r->{'plugin_output'}) = @parts;
+   } else {
+-    die "Input in incorrect format. Format hostname<TAB>[svc_description<TAB>]return_code<TAB>plugin_output<NEWLINE>";
++    my $d = $self->{delimiter_help};
++    die "Input in incorrect format. Format hostname${d}[svc_description${d}]return_code${d}plugin_output<NEWLINE>";
+   }
+   return $r;
+ }
+ 
+ sub instance_of {
+-  my (undef, $type, @args) = @_;
++  my (undef, $type, $config) = @_;
+   my $class = 'NRD::Serialize::' . lc($type);
+   {
+    my $file = $class;
+@@ -27,7 +28,16 @@
+    require "$file.pm";
+   }
+ 
+-  return $class->new(@args);
++  if (defined $config->{input_delimiter}) {
++    if ($config->{input_delimiter} eq "doublepipe") {
++      $config->{delimiter_re} = qr/\|\|/;
++      $config->{delimiter_help} = "||";
++    }
++  } else {
++    $config->{delimiter_re} = qr/\t/;
++    $config->{delimiter_help} = "<TAB>";
++  }
++  return $class->new($config);
+ }
+ 
+ #################### main pod documentation begin ###################

Added: trunk/patches/NRD-Daemon/04-net-server-test-fixes.patch
===================================================================
--- trunk/patches/NRD-Daemon/04-net-server-test-fixes.patch	                        (rev 0)
+++ trunk/patches/NRD-Daemon/04-net-server-test-fixes.patch	2013-10-15 13:52:15 UTC (rev 798)
@@ -0,0 +1,72 @@
+diff -ur NRD-Daemon-0.04.original//etc/nrd.conf NRD-Daemon-0.04/etc/nrd.conf
+--- NRD-Daemon-0.04.original//etc/nrd.conf	2011-03-08 22:47:29.000000000 +0000
++++ NRD-Daemon-0.04/etc/nrd.conf	2013-10-15 13:36:54.000000000 +0000
+@@ -26,7 +26,7 @@
+ #cidr_deny   192.0.2.4/30
+ 
+ ### background the process?
+-background  0
++background  1
+ 
+ ### ports to bind (this should bind
+ ### 127.0.0.1:20205 and localhost:20204)
+diff -ur NRD-Daemon-0.04.original//t/nrd_digest.cfg NRD-Daemon-0.04/t/nrd_digest.cfg
+--- NRD-Daemon-0.04.original//t/nrd_digest.cfg	2011-01-15 11:06:01.000000000 +0000
++++ NRD-Daemon-0.04/t/nrd_digest.cfg	2013-10-15 13:36:28.000000000 +0000
+@@ -26,7 +26,7 @@
+ #cidr_deny   192.0.2.4/30
+ 
+ ### background the process?
+-background  0
++background  1
+ 
+ ### ports to bind (this should bind
+ ### 127.0.0.1:20205 and localhost:20204)
+diff -ur NRD-Daemon-0.04.original//t/nrd_encrypt.cfg NRD-Daemon-0.04/t/nrd_encrypt.cfg
+--- NRD-Daemon-0.04.original//t/nrd_encrypt.cfg	2011-01-14 23:30:49.000000000 +0000
++++ NRD-Daemon-0.04/t/nrd_encrypt.cfg	2013-10-15 13:36:38.000000000 +0000
+@@ -26,7 +26,7 @@
+ #cidr_deny   192.0.2.4/30
+ 
+ ### background the process?
+-background  0
++background  1
+ 
+ ### ports to bind (this should bind
+ ### 127.0.0.1:20205 and localhost:20204)
+diff -ur NRD-Daemon-0.04.original//t/nrd_plain.cfg NRD-Daemon-0.04/t/nrd_plain.cfg
+--- NRD-Daemon-0.04.original//t/nrd_plain.cfg	2011-01-15 11:06:32.000000000 +0000
++++ NRD-Daemon-0.04/t/nrd_plain.cfg	2013-10-15 13:36:12.000000000 +0000
+@@ -26,7 +26,7 @@
+ #cidr_deny   192.0.2.4/30
+ 
+ ### background the process?
+-background  0
++background  1
+ 
+ ### ports to bind (this should bind
+ ### 127.0.0.1:20205 and localhost:20204)
+diff -ur NRD-Daemon-0.04.original//t/nrd_resultdir_batched.cfg NRD-Daemon-0.04/t/nrd_resultdir_batched.cfg
+--- NRD-Daemon-0.04.original//t/nrd_resultdir_batched.cfg	2011-01-14 23:30:49.000000000 +0000
++++ NRD-Daemon-0.04/t/nrd_resultdir_batched.cfg	2013-10-15 13:35:07.000000000 +0000
+@@ -26,7 +26,7 @@
+ #cidr_deny   192.0.2.4/30
+ 
+ ### background the process?
+-background  0
++background  1
+ 
+ ### ports to bind (this should bind
+ ### 127.0.0.1:20205 and localhost:20204)
+diff -ur NRD-Daemon-0.04.original//t/nrd_resultdir.cfg NRD-Daemon-0.04/t/nrd_resultdir.cfg
+--- NRD-Daemon-0.04.original//t/nrd_resultdir.cfg	2011-01-14 23:30:49.000000000 +0000
++++ NRD-Daemon-0.04/t/nrd_resultdir.cfg	2013-10-15 13:36:46.000000000 +0000
+@@ -26,7 +26,7 @@
+ #cidr_deny   192.0.2.4/30
+ 
+ ### background the process?
+-background  0
++background  1
+ 
+ ### ports to bind (this should bind
+ ### 127.0.0.1:20205 and localhost:20204)

_______________________________________________
Opsview-checkins mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-checkins

Reply via email to