Package: argus-client
Version: 2.0.6.fixes.1-3
Severity: wishlist
Tags: patch
Hi,
here is a small patch to add
-debug : in case you want to print out debug info
-comment : comments to add on the graph. can take carriage returns in
the string
length of the ip address from 15 to 20
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (990, 'testing'), (600, 'unstable'), (549, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-3-686-smp
Locale: LANG=C, LC_CTYPE=en_US (charmap=ISO-8859-1)
Versions of packages argus-client depends on:
ii libc6 2.3.6-15 GNU C Library: Shared libraries
ii libncurses5 5.5-2 Shared libraries for terminal hand
Versions of packages argus-client recommends:
ii argus-server 1:2.0.6.fixes.1-11 IP network transaction auditing to
-- no debconf information
--- /usr/bin/ragraph 2006-02-22 18:36:23.000000000 -0500
+++ /home/xavier/system/bin/ragraph.2.6 2006-08-02 11:10:24.000000000 -0400
@@ -33,6 +33,7 @@
my @arglist = ();
my $title = "";
+my $comment = "";
my $fill = 1;
my $stack = 1;
my $split = 1;
@@ -81,6 +82,7 @@
my $objects;
my $num = 0;
+my $debug=0;
my ($START, $FRAC, $END, $STEP, $COLUMNS, $PROTOS, $PROBES, $RUNS, $ERROR);
my @line_args;
@@ -99,6 +101,8 @@
s/^-title// && do { $title = shift (@ARGV); next ARG; };
s/^-w// && do { $PNG = shift (@ARGV); next ARG; };
s/^-N// && do { $num = shift (@ARGV); next ARG; };
+ s/^-comment// && do { $comment = shift (@ARGV); next ARG; };
+ s/^-debug// && do { $debug=1; next ARG; };
/^-H/ && do { $histo++; };
s/\(/\\\(/ && do { ; };
s/\)/\\\)/ && do { ; };
@@ -106,22 +110,22 @@
[EMAIL PROTECTED] + 0] = $arg;
}
-print "DEBUG: RagraphProcessArgusData\n";
+print "DEBUG: RagraphProcessArgusData\n" if $debug;
RagraphProcessArgusData ();
-print "DEBUG: RagraphReadInitialValue\n";
+print "DEBUG: RagraphReadInitialValue\n" if $debug;
RagraphReadInitialValues ($tmpfile);
-print "DEBUG: RagraphGenerateRRDParameters\n";
+print "DEBUG: RagraphGenerateRRDParameters\n" if $debug;
RagraphGenerateRRDParameters ($tmpfile);
-print "DEBUG: RagraphGenerateRRD\n";
+print "DEBUG: RagraphGenerateRRD\n" if $debug;
RagraphGenerateRRD ();
-print "DEBUG: RagraphGeneratePNG\n";
+print "DEBUG: RagraphGeneratePNG\n" if $debug;
RagraphGeneratePNG ();
-print "DEBUG: RagraphCleanUp\n";
+print "DEBUG: RagraphCleanUp\n" if $debug;
RagraphCleanUp ();
exit;
@@ -163,7 +167,7 @@
@args = ("rahistogram -p6 -G -s lasttime ", @arglist, "> $tmpfile");
}
- print "EXEC: @args\n";
+ print "EXEC: @args\n" if $debug;
my $input = [EMAIL PROTECTED];
}
@@ -180,11 +184,11 @@
for ($columns[$x]) {
/Time/ and do {$timeindex = $x; };
- /Host/ and do {push @typeobjects, $x; $saddrindex =
$x; $objwidth = 15; };
- /SrcAddr/ and do {push @typeobjects, $x; $saddrindex = $x;
$objwidth = 15; };
- /InAddr/ and do {push @typeobjects, $x; $saddrindex = $x;
$objwidth = 15; };
- /OutAddr/ and do {push @typeobjects, $x; $daddrindex = $x;
$objwidth = 15; };
- /DstAddr/ and do {push @typeobjects, $x; $daddrindex = $x;
$objwidth = 15; };
+ /Host/ and do {push @typeobjects, $x; $saddrindex =
$x; $objwidth = 20; };
+ /SrcAddr/ and do {push @typeobjects, $x; $saddrindex = $x;
$objwidth = 20; };
+ /InAddr/ and do {push @typeobjects, $x; $saddrindex = $x;
$objwidth = 20; };
+ /OutAddr/ and do {push @typeobjects, $x; $daddrindex = $x;
$objwidth = 20; };
+ /DstAddr/ and do {push @typeobjects, $x; $daddrindex = $x;
$objwidth = 20; };
/Type/ and do {push @typeobjects, $x; $protoindex =
$x; $objwidth = 6; };
/ProbeId/ and do {push @typeobjects, $x; $probeindex = $x;
$objwidth = 15; };
/Dport/ and do {push @typeobjects, $x; $dportindex = $x;
$objwidth = 12; };
@@ -427,6 +431,8 @@
}
$line_args[$lineind++] = "COMMENT:$date\\c";
+ my @comments=split (/\n/,$comment) if $comment;
+ foreach (@comments) {$line_args[$lineind++] = "COMMENT:$_\\c"}
$line_args[$lineind++] = "COMMENT:\\s";
if ($fill && $split) {
@@ -774,6 +781,7 @@
my $RRD = shift(@rrd_pngs);
my $PNG = shift(@rrd_pngs);
+ if ($debug){print "RagraphGeneratePNG : RRDs::graph $PNG,\n";foreach(
@rrd_args) {print "$_ "};print "\n";}
my ($graphret,$xs,$ys) = RRDs::graph $PNG, @rrd_args;
if ($ERROR = RRDs::error) {