(RADAR) Some observations/suggestions about radar
Mike McCauley
mikem at open.com.au
Fri Apr 5 07:25:15 CST 2002
Hello Romain ,
thanks for taking the time to tell us about these items.
On Fri, 5 Apr 2002 22:57, Romain Vergniol wrote:
> Hi all,
>
> I've tested radar this week, here are some observations/suggestions :
>
> - I use 'ClientListSQL' and it's impossible to expand the Client list in
> the left part. So it's impossible to plot statistics for each NAS.
OK, I have attached a new version of ClientListSQL.pm that should fix this
problem. The Clients imported from SQL should appear in the Client list
on the left side now. Please let me know if its OK for you.
>
> - It would be useful to load datas from 'StatsLog SQL' and visualize them
> for a given period of time.
We see this as being the role of some other softeware.
>
> - Since radar only keeps last 500 values, it would be useful to save/export
> graphs.
I will look at this one for the next release.
I wonder what export format would be best?
>
> - Suggestion : the possibility to enter manually the value for the 'Y
> scale' for the plot statistics (the variation between each value is too
> big).
Hmmm, I wonder if we should provide a larger choice of scale items?
Cheers.
>
>
> Cheers
>
> Romain VERGNIOL
--
Mike McCauley mikem at open.com.au
Open System Consultants Pty. Ltd Unix, Perl, Motif, C++, WWW
24 Bateman St Hampton, VIC 3188 Australia http://www.open.com.au
Phone +61 3 9598-0985 Fax +61 3 9598-0955
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory etc etc
on Unix, Win95/8, 2000, NT, MacOS 9, MacOS X etc etc
-------------- next part --------------
# ClientListSQL.pm
#
# Implement a Client list in an SQL database
# Having the Client database externally allows us to administer
# the Client list from something like RAdmin and/or Nets
#
# The default key for the SQL table is Nas-IP-Address
#
# Author: Mike McCauley (mikem at open.com.au)
# Copyright (C) 1997 Open System Consultants
# $Id: ClientListSQL.pm,v 1.11 2002/03/24 23:07:49 mikem Exp mikem $
package Radius::ClientListSQL;
@ISA = qw(Radius::SqlDb);
use Radius::SqlDb;
use Radius::Client;
use strict;
%Radius::ClientListSQL::ConfigKeywords =
('GetClientQuery' => 'string',
'Client' => 'objectlist'
);
#####################################################################
# Contruct a new Client list database handler
sub new
{
my ($class, @args) = @_;
my $self = $class->SUPER::new(@args);
$self->clientCreate();
return $self;
}
#####################################################################
# Do per-instance default initialization
# This is called by Configurable during Configurable::new before
# the config file is parsed. Its a good place initialize instance
# variables
# that might get overridden when the config file is parsed.
# Do per-instance default initialization. This is called after
# construction is complete
sub initialize
{
my ($self) = @_;
$self->SUPER::initialize;
$self->{GetClientQuery} = "select
NASIDENTIFIER,
SECRET,
IGNOREACCTSIGNATURE,
DUPINTERVAL,
DEFAULTREALM,
NASTYPE,
SNMPCOMMUNITY,
LIVINGSTONOFFS,
LIVINGSTONHOLE,
FRAMEDGROUPBASEADDRESS,
FRAMEDGROUPMAXPORTSPERCLASSC,
REWRITEUSERNAME,
NOIGNOREDUPLICATES,
PREHANDLERHOOK from RADCLIENTLIST";
}
#####################################################################
sub clientCreate
{
my ($self) = @_;
# (Re)-connect to the database if necessary,
return undef unless $self->reconnect;
$self->log($main::LOG_DEBUG, "Adding Clients from SQL database");
# Re-format query from config file
my $q = &Radius::Util::format_special($self->{GetClientQuery});
# Execute the query
my $sth = $self->prepareAndExecute($q);
my @row;
# Loop through the rows, creating a new Client from each one
while (@row = $sth->fetchrow())
{
my $client = Radius::Client->new(undef, $row[0], Secret => $row[1]);
$client->{IgnoreAcctSignature} = $row[2] if defined $row[2];
$client->{DupInterval} = $row[3] if defined $row[3];
$client->{DefaultRealm} = $row[4] if defined $row[4];
$client->{NasType} = $row[5] if defined $row[5];
$client->{SNMPCommunity} = $row[6] if defined $row[6];
$client->{LivingstonOffs} = $row[7] if defined $row[7];
$client->{LivingstoneHole} = $row[8] if defined $row[8];
push @{$client->{FramedGroupBaseAddress}}, split(/[,\s]+/, $row[9]) if defined $row[9];
$client->{FramedGroupMaxPortsPerClassC} = $row[10] if defined $row[10];
push @{$client->{RewriteUsername}}, $row[11] if defined $row[11];
%{$client->{NoIgnoreDuplicates}} = map(($_, 1), split(/\s+/, $row[12]))
if defined $row[12];
$client->{PreHandlerHook} = $row[13] if defined $row[13];
$client->{Identifier} = $row[14] if defined $row[14];
$client->{DefaultReply} = $row[15] if defined $row[15];
$client->{FramedGroup} = $row[16] if defined $row[16];
$client->{StripFromReply} = $row[17] if defined $row[17];
$client->{AllowInReply} = $row[18] if defined $row[18];
$client->{AddToReply} = $row[19] if defined $row[19];
$client->{AddToReplyIfNotExist} = $row[20] if defined $row[20];
$client->{DynamicReply} = $row[21] if defined $row[21];
# Add to the main list of clients, so we can see them in Radar etc
push(@{$main::config->{Client}}, $client);
}
$sth->finish();
}
1;
More information about the radar
mailing list