| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 | 1 | 2 | 3 | 4 |
Zenus - The Zen ADSL Usage Monitor
Submitted by Falken on Sun, 01/07/2007 - 16:46
Zenus is a Perl interface to the Zen ADSL usage web service.
It features:
- A Perl module (zenUsage.pm) to handle the actual communication to the web service that can also be used to build your own custom interfaces
- Two example front ends to the module - the main zenus.pl script and a debugging client
Zenus is ideal if you want to integrate 3rd party monitoring systems like Cacti (which used Zenus to produce the attached graph) or if you run Linux and don't or can't make use of the cross-platform Firefox plug-in.
Note that Zen treat every run of the client as a login to the portal, so the last login time you see there will include 'real' logins as well as when the client runs.
| Attachment | Size |
|---|---|
| graph_image.php_.png | 29.45 KB |
| cacti_graph_template_zen_broadband_usage_v1.xml_.txt | 13.73 KB |
| zenus_2.1.5.tar.bzip2 | 12.98 KB |

Zenus and Munin
Hi.
Am preparing a simple script based on your work for use with Munin and as part of this, Munin calls a version of your Perl script zenus.pl via a soft link.
I get an answer but seem to have unlocked some warning messages from SOAP::Lite.pm and I also found one (corrected) in Zenus.pm.
Error strings are:
martin@mended-drum:/usr/local/lib/site_perl$ munin-run zenin
Use of uninitialized value $name in substitution (s///) at /usr/local/share/perl/5.10.0/SOAP/Lite.pm line 1055.
Use of uninitialized value $name in exists at /usr/local/share/perl/5.10.0/SOAP/Lite.pm line 1056.
Use of uninitialized value $name in hash element at /usr/local/share/perl/5.10.0/SOAP/Lite.pm line 1056.
Use of uninitialized value $name in hash element at /usr/local/share/perl/5.10.0/SOAP/Lite.pm line 1060.
Use of uninitialized value $name in hash element at /usr/local/share/perl/5.10.0/SOAP/Lite.pm line 1060.
[...]
But I do get the right answer at the end:
Available.value 26.3388671875
Remaining.value 12.9140625
Used.value 13.4248046875
The 'correction' in zenus.pm was on line 336. I believe the code snippet
print "accounts $1 $2 $3 ... \n" unless $hideDebug;
my $result;
push @result,$1;
push @result,$2;
should read
print "accounts $1 $2 $3 ... \n" unless $hideDebug;
my @result; <-- correction made here
push @result,$1;
push @result,$2;
Any chance you can point me in the right direction here? Happy to share code and stuff - and to contribute my code and set up instructions to your site if it all works.
Best Regards
Martin
Good spot on the $result
Good spot on the $result mistake :-)
At a guess, your code is running using 'perl -w' which will spit out all sorts of warnings. Remove the -w to stop them appearing.
Tom
Error using zenus.pl
Just installed zenus and all required modules, but I get this error message when I run zenus.pl with my portal username and password:
500 Can't connect to webservices.zen.co.uk:443 (Illegal seek) at zenus.pm line 141
How to fix this?
Thanks
Odd error that
Odd error that.
Please let me have the output of using 'debug.pl', your Linux distribution name and version and your Perl version.
(edit the following Monday)Fixed by making sure Crypt::SSLeay is installed. README updated.
Tom
Cacti
I'm actually slowly getting it to work with Cacti and I now have it logging everything into Cacti and drawing a pretty graph. I'd quite like to get it packaged into a template for Cacti though - have you thought about doing that? I might package mine and release it... might go nicely with Zenus...
I'd certainly take a look
I'd certainly take a look and maybe add it to the Zenus distribution / web page.
I've been meaning to do it myself (to show you how to go from the Perl to the graph on this page), but I've not got round to putting all the zenus.pl output's into the data source yet.
Send me what you have ;-)
Tom
I'll send over later
Yep, sure thing, I'll send it over later. Where do you want me to send it to?
I've got mine logging usage, available, estimated current month and total cap at the moment. It's simple to add in the structure for the other variables which come from Zenus.
My email address is in the
My email address is in the README file in the distribution, or use my username (or name from the footer of comments) @ the domain of this web page (minus the www., if present).
Tom
Good work! Cacti?
Hey!
Amazing work here - EXACTLY what I was looking for since switching to the Zen 8000 Active package yesterday!
I've also just started using Cacti on my router. Is there any chance you could guide me as to how you attached it to using Zenus?
Great work!
Matt