Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat May 25, 2019 12:13 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: ZyXEL Statistics - CPU/Firewall/NAT - Updated Oct 20 2006
PostPosted: Fri Jan 20, 2006 6:24 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12158
Location: USA
I am no longer supporting this script, since ZyXEL's Telnet feature is buggy, resulting in the router rebooting frequently. ZyXEL will not fix the problem.

I've rewritten the existing PHP script I had to collect NAT statistics from my ZyXEL P334W router. Now it collects CPU usage, firewall stats and NAT stats. See the attached pics below for examples. This script should work with most ZyXEL routers, since they all allow telnet access to the ZyNOS (aka OS).

The CPU usage graph is simply the 'fire cpu usage' script found here on the forum; I didn't make it.

The script, templates and readme are in the zip file. Templates were exported with Cacti 0.8.6i, so you'll need that to successfully import.


Attachments:
File comment: Instructions, scripts, template
Zyxel_stats.zip [67.4 KiB]
Downloaded 2647 times
File comment: Sample output.
zyxel_stats_sample.png
zyxel_stats_sample.png [ 53.58 KiB | Viewed 30547 times ]

_________________

| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |


Last edited by BSOD2600 on Thu Oct 04, 2007 6:32 pm, edited 3 times in total.
Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 11, 2006 4:04 am 
Offline

Joined: Sat Feb 11, 2006 3:59 am
Posts: 1
Location: Düsseldorf, Germany
I have a Prestige 650 HW-37; for that one I had to adapt the interface to say wanif0, and the values that are read are broader than searched for by the script (can be up to 7 or maybe more?).

Attached the modified zyxel_nat.php file..


Attachments:
zyxel_nat.zip [1.02 KiB]
Downloaded 1292 times
Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 20, 2006 8:10 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12158
Location: USA
Bump.

Updated the templates and script. No longer php based and now is Perl.

_________________

| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |


Top
 Profile  
 
 Post subject: problem
PostPosted: Fri Feb 09, 2007 9:02 am 
Offline

Joined: Fri Feb 09, 2007 8:16 am
Posts: 2
Hello I seem to be having a problem getting this to work,

When i import the graph templates i get this error:

[success] ZyXEL - NAT Statistics [new]
+ Unmet Dependency: (Data Template Item) allocated
+ Unmet Dependency: (CDEF) Make Per 5 Minutes
+ Unmet Dependency: (GPRINT Preset) Normal
+ Unmet Dependency: (Data Template Item) expired
+ Unmet Dependency: (Data Template Item) freed
+ Unmet Dependency: (Data Template Item) Cachehit
+ Unmet Dependency: (Data Template Item) full

This is after importing the data template and i get these errors on all the graph templates that i import.

when i run the perl script from the console i get these reults:

C:\Inetpub\wwwroot\cacti\scripts>perl zyxel_stats.pl IPADDRESS PASSWORD

Tablesize: Allocated: Freed: Full: Expired: Cachehit: cpu:2.430 ICMPIdle:47 UDPI
dle:2878 TCPIdle:11 TCPSYNIdle:94 TCPFINIdle:71 LandAttack:0 IPSpoof:5 ICMPEchoAttack:0 ICMPAttack:0 NetBIOSAttack:0 TraceRouteAttack:0 TearDropAttack:0 SynFloodAttack:0 SMTPAttack:0

i guess that its communicating correctly with the router.... but i cant seem to get the graphs to show and data.

I am using cacti-0.8.6i as specified.

Any ideas?

Thanks

Bart


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 09, 2007 12:46 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12158
Location: USA
Hmm, I can try to re-export the graph templates and see if that fixes anything.

Actually, I stopped using this script because it would lockup my ZyXEL P334W after several days of polling. ZyXEL tech support from Taiwan said the CLI wasn't meant for collecting data so it's not something they're going to fix.

_________________

| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 09, 2007 3:56 pm 
Offline

Joined: Sun Dec 31, 2006 6:57 am
Posts: 8
hi,

could this template work for a linux cacti?

thx


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 09, 2007 5:07 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12158
Location: USA
Yes, it's not OS specific -- its router specific.

_________________

| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 10, 2007 9:11 am 
Offline

Joined: Sun Dec 31, 2006 6:57 am
Posts: 8
ok, thx.

when i execute the zyxel_stats.pl i get this output:

Code:
Can't locate Net/Telnet.pm in @INC (@INC contains: /usr/lib/perl5/5.8.8/i586-linux-thread-multi /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl .) at zyxel_stats.pl line 38.
BEGIN failed--compilation aborted at zyxel_stats.pl line 38.


how can i fix that?

thx
andre


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 11, 2007 2:47 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12158
Location: USA
You didn't read the included readme.txt file.

_________________

| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |


Top
 Profile  
 
 Post subject: Thanks
PostPosted: Mon Feb 12, 2007 4:54 am 
Offline

Joined: Fri Feb 09, 2007 8:16 am
Posts: 2
Hello thanks for the response. I think ill give it a miss, my router is as a tad touchy and seems to crash alot, there for this may be a bad idea for its already odd nature.

Thanks again.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 10:45 am 
Offline

Joined: Sun Dec 31, 2006 6:57 am
Posts: 8
hi,

sorry, i hate reading the manuals 8) :D

ok, i installed net/telnet.

but what do you mean with

Quote:
Replace all instances of P334W with your routers command prompt


hostname from the router?

does this script work with an zyxel zywall 35?

thx
Andre


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 11:29 am 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12158
Location: USA
I mean, you must edit the perl file, find everywhere where it has 'P334W' and replace it with the commandline prompt for your router (logon to the commandline and look what yours uses).

I have no idea if this script works with your router. But the fact that ZyXEL won't fix the problems in mine, means I'm not using this script anymore.

_________________

| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 12:11 pm 
Offline

Joined: Sun Dec 31, 2006 6:57 am
Posts: 8
ok thx.

i think it would not work. my router has a webinterface for configuration and yours is fully managed.

but, thanks a lot for your help!

best regards from germany

Andre


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 5:18 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12158
Location: USA
Try telnetting into it...

_________________

| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Bing [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group