[ previous ] [ next ] [ threads ]
 From:  "Bernie O'Connor" <Bernie dot OConnor at sas dot com>
 To:  "Brad Shows" <bshows at americablejapan dot com>, <m0n0wall at lists dot m0n0 dot ch>
 Subject:  RE: [m0n0wall] How can I gather user data per day on how many, people access the captive portal?
 Date:  Wed, 19 Jul 2006 14:17:05 -0400
I was briefly looking into this but got sidetracked.  This approach isn't trivial but perhaps this
will spark some discussion.  Perhaps snmpd should be built with extensions for the next release? 
There may be a simpler way...  (like grabbing the /var/db/captiveportal.db file periodically and
processing it for your information).

If you would like to use snmp, you have to rebuild snmpd with extensions support and get your
version installed on your m0n0wall development system:

./configure  --without-openssl --disable-debugging --enable-static --enable-mini-agent
--disable-privacy --disable-testing-code --disable-shared-version --disable-shared --disable-ipv6
'--with-out-transports=TCP Unix' '--with-mib-modules=mibII/interfaces mibII/var_route
ucd-snmp/extensible '
Install your snmpd module on test m0n0wall system
Add configuration update to snmpd.conf on test m0n0wall system:
exec portalusers /bin/sh /usr/local/bin/count_portal_users.sh
Install shell script to count the users from /var/db/captiveportal.db (this is just a sample, I
wouldn't use it for production  -- locate in /usr/local/bin on your test m0n0wall system):
# /usr/local/bin/count_portal_users.sh
# I'm not a shell programmer so don't laugh :) 
[ ! -f $file ] && exit $numlines;
while read line
        done <$file
exit $numlines
Snmpwalk -c {snmp-community} -v 1 {ip-address-m0n0wall} ucd

Sample snmp output:
UCD-SNMP-MIB::extIndex.1 = INTEGER: 1
UCD-SNMP-MIB::extNames.1 = STRING: portalusers
UCD-SNMP-MIB::extCommand.1 = STRING: /bin/sh /usr/local/bin/count_portal_users.sh
UCD-SNMP-MIB::extResult.1 = INTEGER: 3
UCD-SNMP-MIB::extOutput.1 = STRING:
UCD-SNMP-MIB::extErrFix.1 = INTEGER: 0
UCD-SNMP-MIB::extErrFixCmd.1 = STRING:

-----Original Message-----
From: Brad Shows [mailto:bshows at americablejapan dot com] 
Sent: Tuesday, July 18, 2006 10:58 PM
To: m0n0wall at lists dot m0n0 dot ch
Subject: Re: [m0n0wall] How can I gather user data per day on how many, people access the captive

We are not running a RADIUS server.  We are running this as an open captive portal with no logins,
just a user agreement acceptance and go.


SDamron wrote:
> Radius logs...  Radius is an AAA protocol, AAA stands for 
> authentication, authorization and accounting.  Accounting being the 
> major portion you are looking for.  Use your Radius logs for this type 
> of thing.  There are plenty of scripts around to parse through them 
> for specific attributes.
> On 7/18/06, Brad Shows <bshows at americablejapan dot com> wrote:
>> Is there a way to capture SNMP information on how many PCs are 
>> connected to the WRAP PowerG8? I can gather SNMP data about interface 
>> traffic using MRTG just fine, but I need a way to gather user data 
>> per day on how many people access the captive portal.
>> Thank you in advance for the information.
>> Regards,
>> Brad Shows
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: m0n0wall dash unsubscribe at lists dot m0n0 dot ch
>> For additional commands, e-mail: m0n0wall dash help at lists dot m0n0 dot ch