Because the netscreen doesn't provide over SNMP In/Out traffic details, the graph contains only total traffic.
Installation:
copy netscreen_policy_traffic.php to /scripts/
copy netscreen_policy_traffic.xml to /resources/script_queries
import cacti_data_query_netscreen_-_policy_total_traffic.xml
Edit:
Small php bugfix
Netscreen Policy Total Traffic
Moderators: Developers, Moderators
Netscreen Policy Total Traffic
- Attachments
-
- netscreen_policy_traffic.zip
- Query Template
- (4.79 KiB) Downloaded 900 times
Re: Netscreen Policy Total Traffic
I import xml,but there's error said "Error: XML: Hash version does not exist."zomps wrote:Because the netscreen doesn't provide over SNMP In/Out traffic details, the graph contains only total traffic.
Installation:
copy netscreen_policy_traffic.php to /scripts/
copy netscreen_policy_traffic.xml to /resources/script_queries
import cacti_data_query_netscreen_-_policy_total_traffic.xml
Edit:
Small php bugfix
how to fix it?
http://forums.cacti.net/about10309.html
Graph are exported from 0.8.7a
Graph are exported from 0.8.7a
Dear Sir :
I use your template and get some error ~~~
why output : U ??
SCRIPT: /usr/bin/php -q /var/www/html/cacti/scripts/netscreen_policy_traffic.php 192.168.5.110 public 1 get bytes 16, output: U
Server Info :
====================
Cacti Version 0.8.7a
Plugin Architecture 1.4
Poller Type Cactid v
Server Info Linux 2.6.9-42.EL
Web Server Apache/2.0.52 (CentOS)
PHP Version 4.3.9
PHP Extensions yp, xml, wddx, tokenizer, sysvshm, sysvsem, standard, sockets, shmop, session, pspell, posix, pcre, overload, mime_magic, iconv, gmp, gettext, ftp, exif, dio, dbx, dba, curl, ctype, calendar, bz2, bcmath, zlib, openssl, apache2handler, gd, ldap, mysql, odbc, pgsql, snmp
MySQL Version 4.1.20
RRDTool Version 1.0.50
SNMP Version 5.1.2
Plugins Host Info (hostinfo - v0.2)
Device Monitoring (monitor - v0.8.2)
Update Checker (update - v0.4)
Network Tools (tools - v0.2)
Global Plugin Settings (settings - v0.3)
Thresholds (thold - v0.3.9)
PHP Network Managing (manage - v0.5.1)
PHP Network Weathermap (weathermap - v0.941)
RRD File Cleaner (RRD Cleaner - v0.32)
I use your template and get some error ~~~
why output : U ??
SCRIPT: /usr/bin/php -q /var/www/html/cacti/scripts/netscreen_policy_traffic.php 192.168.5.110 public 1 get bytes 16, output: U
Server Info :
====================
Cacti Version 0.8.7a
Plugin Architecture 1.4
Poller Type Cactid v
Server Info Linux 2.6.9-42.EL
Web Server Apache/2.0.52 (CentOS)
PHP Version 4.3.9
PHP Extensions yp, xml, wddx, tokenizer, sysvshm, sysvsem, standard, sockets, shmop, session, pspell, posix, pcre, overload, mime_magic, iconv, gmp, gettext, ftp, exif, dio, dbx, dba, curl, ctype, calendar, bz2, bcmath, zlib, openssl, apache2handler, gd, ldap, mysql, odbc, pgsql, snmp
MySQL Version 4.1.20
RRDTool Version 1.0.50
SNMP Version 5.1.2
Plugins Host Info (hostinfo - v0.2)
Device Monitoring (monitor - v0.8.2)
Update Checker (update - v0.4)
Network Tools (tools - v0.2)
Global Plugin Settings (settings - v0.3)
Thresholds (thold - v0.3.9)
PHP Network Managing (manage - v0.5.1)
PHP Network Weathermap (weathermap - v0.941)
RRD File Cleaner (RRD Cleaner - v0.32)
I enabled counting on the policies I want to watch and they show no results via snmpbulkwalk. They are being hit based upon logging to syslog
[root@monitor tmp]# snmpbulkwalk firewall -c PRIVATE -v 2c .1.3.6.1.4.1.3224.10.2.1.3
SNMPv2-SMI::enterprises.3224.10.2.1.3.1.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.2.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.3.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.4.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.5.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.8.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.10.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.15.0 = INTEGER: 0
[root@monitor tmp]# snmpbulkwalk firewall -c PRIVATE -v 2c .1.3.6.1.4.1.3224.10.2.1.6
SNMPv2-SMI::enterprises.3224.10.2.1.6.1.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.2.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.3.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.4.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.5.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.8.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.10.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.15.0 = INTEGER: 0
What am I doing wrong in the netscreen?
[root@monitor tmp]# snmpbulkwalk firewall -c PRIVATE -v 2c .1.3.6.1.4.1.3224.10.2.1.3
SNMPv2-SMI::enterprises.3224.10.2.1.3.1.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.2.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.3.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.4.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.5.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.8.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.10.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.15.0 = INTEGER: 0
[root@monitor tmp]# snmpbulkwalk firewall -c PRIVATE -v 2c .1.3.6.1.4.1.3224.10.2.1.6
SNMPv2-SMI::enterprises.3224.10.2.1.6.1.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.2.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.3.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.4.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.5.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.8.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.10.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.15.0 = INTEGER: 0
What am I doing wrong in the netscreen?
I know its been a long time since any one has answered this... but is SNMP turned on under the interface? This one caught me out before!
[quote="empoweri"]I enabled counting on the policies I want to watch and they show no results via snmpbulkwalk. They are being hit based upon logging to syslog
[root@monitor tmp]# snmpbulkwalk firewall -c PRIVATE -v 2c .1.3.6.1.4.1.3224.10.2.1.3
SNMPv2-SMI::enterprises.3224.10.2.1.3.1.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.2.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.3.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.4.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.5.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.8.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.10.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.15.0 = INTEGER: 0
[root@monitor tmp]# snmpbulkwalk firewall -c PRIVATE -v 2c .1.3.6.1.4.1.3224.10.2.1.6
SNMPv2-SMI::enterprises.3224.10.2.1.6.1.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.2.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.3.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.4.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.5.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.8.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.10.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.15.0 = INTEGER: 0
What am I doing wrong in the netscreen?[/quote]
[quote="empoweri"]I enabled counting on the policies I want to watch and they show no results via snmpbulkwalk. They are being hit based upon logging to syslog
[root@monitor tmp]# snmpbulkwalk firewall -c PRIVATE -v 2c .1.3.6.1.4.1.3224.10.2.1.3
SNMPv2-SMI::enterprises.3224.10.2.1.3.1.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.2.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.3.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.4.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.5.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.8.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.10.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.3.15.0 = INTEGER: 0
[root@monitor tmp]# snmpbulkwalk firewall -c PRIVATE -v 2c .1.3.6.1.4.1.3224.10.2.1.6
SNMPv2-SMI::enterprises.3224.10.2.1.6.1.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.2.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.3.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.4.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.5.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.8.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.10.0 = INTEGER: 0
SNMPv2-SMI::enterprises.3224.10.2.1.6.15.0 = INTEGER: 0
What am I doing wrong in the netscreen?[/quote]
I think I have successfully added this add-on to Cacti Version 0.8.7b.
When I go to add a graph to a device all the policies show up together with their description and i can create the graphs no problem...
However the graphs are empty - eg they show zero traffic!
The php script is working and the netscreen is OK as MRTG plots file - its an issue with cacti and this add-on... here is the output from the PHP
GGCWCacti01:/usr/share/cacti/site# php scripts/netscreen_policy_traffic.php 10.1.2.141 public 1 get usage 30
1320
GGCWCacti01:/usr/share/cacti/site# php scripts/netscreen_policy_traffic.php 10.1.2.141 public 1 get usage 30
1138
Now firstly the PHP script is using OID 1.3.6.1.4.1.3224.10.2.1.6.<POLICY#> which is wrong IMO... it should be 1.3.6.1.4.1.3224.10.2.1.8.<POLICY#>.0...
.6 returns the Bytes/Sec at that exact moment in time... if every time Cacti does its check there is zero traffic, of course the graph will always plot zero...
So i threw a load of data through the policy and checked this (MRTG saw it fine) but cacti still plotted Zero.
So i have changed the php script to use .8 (Total Bytes transferred) and adjusted the Data Template to be COUNTER instead of GAUGE but with no luck - php now looks like:
GGCWCacti01:/usr/share/cacti/site# php scripts/netscreen_policy_traffic.php 10.1.2.141 public 1 get usage 30
539734532
GGCWCacti01:/usr/share/cacti/site# php scripts/netscreen_policy_traffic.php 10.1.2.141 public 1 get usage 30
539735784
But still the graphs are showing zero data... please HELP! Have I missed something totally here?
Please help!
Thanks
Chris
When I go to add a graph to a device all the policies show up together with their description and i can create the graphs no problem...
However the graphs are empty - eg they show zero traffic!
The php script is working and the netscreen is OK as MRTG plots file - its an issue with cacti and this add-on... here is the output from the PHP
GGCWCacti01:/usr/share/cacti/site# php scripts/netscreen_policy_traffic.php 10.1.2.141 public 1 get usage 30
1320
GGCWCacti01:/usr/share/cacti/site# php scripts/netscreen_policy_traffic.php 10.1.2.141 public 1 get usage 30
1138
Now firstly the PHP script is using OID 1.3.6.1.4.1.3224.10.2.1.6.<POLICY#> which is wrong IMO... it should be 1.3.6.1.4.1.3224.10.2.1.8.<POLICY#>.0...
.6 returns the Bytes/Sec at that exact moment in time... if every time Cacti does its check there is zero traffic, of course the graph will always plot zero...
So i threw a load of data through the policy and checked this (MRTG saw it fine) but cacti still plotted Zero.
So i have changed the php script to use .8 (Total Bytes transferred) and adjusted the Data Template to be COUNTER instead of GAUGE but with no luck - php now looks like:
GGCWCacti01:/usr/share/cacti/site# php scripts/netscreen_policy_traffic.php 10.1.2.141 public 1 get usage 30
539734532
GGCWCacti01:/usr/share/cacti/site# php scripts/netscreen_policy_traffic.php 10.1.2.141 public 1 get usage 30
539735784
But still the graphs are showing zero data... please HELP! Have I missed something totally here?
Please help!
Thanks
Chris
Who is online
Users browsing this forum: No registered users and 5 guests