ZyXEL Statistics - CPU/Firewall/NAT - Updated Oct 20 2006
Moderators: Developers, Moderators
ZyXEL Statistics - CPU/Firewall/NAT - Updated Oct 20 2006
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.
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
-
- Zyxel_stats.zip
- Instructions, scripts, template
- (67.4 KiB) Downloaded 2851 times
-
- Sample output.
- zyxel_stats_sample.png (53.58 KiB) Viewed 33280 times
Last edited by BSOD2600 on Thu Oct 04, 2007 6:32 pm, edited 3 times in total.
| 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 |
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..
Attached the modified zyxel_nat.php file..
- Attachments
-
- zyxel_nat.zip
- (1.02 KiB) Downloaded 1449 times
Bump.
Updated the templates and script. No longer php based and now is Perl.
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 |
-
- Posts: 2
- Joined: Fri Feb 09, 2007 8:16 am
problem
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
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
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.
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 |
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 |
ok, thx.
when i execute the zyxel_stats.pl i get this output:
how can i fix that?
thx
andre
when i execute the zyxel_stats.pl i get this output:
Code: Select all
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.
thx
andre
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 |
-
- Posts: 2
- Joined: Fri Feb 09, 2007 8:16 am
Thanks
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.
Thanks again.
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.
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 |
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 |
Who is online
Users browsing this forum: No registered users and 4 guests