Netscreen Template Issue
Moderators: Developers, Moderators
Netscreen Template Issue
Hi,
I was able to get the Netscreen Tunnel Interface and Policy Counters templates/scripts working with some minor tweaks. Unfortunately, I am unable to get the Session, Load, and Memory templates working.
The templates imported just fine and SNMP is working. I created the graphs, but nothing is being recorded. The graphs have been blank for over 60 minutes. Do I need to associate a Data Query too (see attached)? I tried using the data query drop down menu, but the other netscreen templates weren't listed.
Anyone know how to fix or troubleshoot this? Thanks!
Rgds,
John
I was able to get the Netscreen Tunnel Interface and Policy Counters templates/scripts working with some minor tweaks. Unfortunately, I am unable to get the Session, Load, and Memory templates working.
The templates imported just fine and SNMP is working. I created the graphs, but nothing is being recorded. The graphs have been blank for over 60 minutes. Do I need to associate a Data Query too (see attached)? I tried using the data query drop down menu, but the other netscreen templates weren't listed.
Anyone know how to fix or troubleshoot this? Thanks!
Rgds,
John
- Attachments
-
- ns-dataqueries.PNG (17.11 KiB) Viewed 3616 times
Yes, a graph template must be fed by a valid data template, which in tern is fed by either a Data Input Method or Data Queries. Do you have those for the Session, Load, and Memory?
| 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 |
Hello,
I have the following:
cacti_data_template_netscreen_stats.xml (imported as template)
cacti_graph_graph_template_netscreen_load_average.xml (imported as template)
cacti_graph_template_netscreen_memory.xml (imported as template)
cacti_graph_template_netscreen_sessions.xml (imported as template)
netscreen_stats.pl (copied to scripts folder)
Netscreen - stats (data template)
No data query for this.
Netscreen - stats (Data Input Method)
I ran an snmpwalk using the info from the *.pl and I did get results back. Do I need to create a Data Query and link it to the Data Input Method? I think I need to add something, unfortunately I don't know what! )
Anyway, any suggestions? Thank you!
John
I have the following:
cacti_data_template_netscreen_stats.xml (imported as template)
cacti_graph_graph_template_netscreen_load_average.xml (imported as template)
cacti_graph_template_netscreen_memory.xml (imported as template)
cacti_graph_template_netscreen_sessions.xml (imported as template)
netscreen_stats.pl (copied to scripts folder)
Netscreen - stats (data template)
No data query for this.
Netscreen - stats (Data Input Method)
I ran an snmpwalk using the info from the *.pl and I did get results back. Do I need to create a Data Query and link it to the Data Input Method? I think I need to add something, unfortunately I don't know what! )
Anyway, any suggestions? Thank you!
John
Hi,
I noticed the following after enabling debug mode:
10/06/2007 08:30:12 PM - CMDPHP: Poller[0] Host[3] DS[64] CMD: /srv/cacti/scripts/netscreen_stats.pl 10.109.4.50 SECRET, output: U
10/06/2007 08:30:12 PM - CMDPHP: Poller[0] Host[3] DS[64] WARNING: Result from CMD not valid. Partial Result:
I have been searching for a fix without any luck. Thanks for your help.
Rgds,
John
I noticed the following after enabling debug mode:
10/06/2007 08:30:12 PM - CMDPHP: Poller[0] Host[3] DS[64] CMD: /srv/cacti/scripts/netscreen_stats.pl 10.109.4.50 SECRET, output: U
10/06/2007 08:30:12 PM - CMDPHP: Poller[0] Host[3] DS[64] WARNING: Result from CMD not valid. Partial Result:
I have been searching for a fix without any luck. Thanks for your help.
Rgds,
John
1) you need to figure out where the graph should be getting its data from.
2) manually run that perl script; does it return data?
2) manually run that perl script; does it return data?
| 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 |
Hi,
It appears to me that the script worked (see below). I also included the contents of the script (see below). Please keep me posted. Thanks for your help.
[root@usnyc1cal01 bin]# ./perl /srv/cacti/scripts/netscreen_stats.pl 10.109.4.50 SECRET
cpu1:7 cpu5:6 cpu15:7 memory_allocated:169505520 memoryAvailable:53033120 memoryFragmented:438 sessionsAllocated:1523 sessionsMaximum:250064 sessionsFailed:0 [root@usnyc1cal01 bin]#
#!/usr/bin/perl
# Copyright - Fletcher Cocquyt - fletch@med.stanford.edu
# 15 January 2004 under the GPL license agreement!
#
# Version 0.1 - PLEASE SEE INSTALL.txt for more information.
#
# USAGE:
#
# perl netscreen_stats.pl <hostname>
#
# <hostname> is optional and can be an IP address or host name.
# If none is given, "localhost" is assumed.
#
my $hostname = $ARGV[0];
my $community = $ARGV[1];
chomp $hostname;
chomp $community;
if ($hostname eq '') {
$hostname = "localhost";
}
$output = `snmpwalk -v 1 -c $community $hostname .1.3.6.1.4.1.3224.16 `;
$output =~ /SNMPv2-SMI::enterprises.3224.16.1.2.0 = INTEGER: (.*)/;
print "cpu1:".$1." ";
$output =~ /SNMPv2-SMI::enterprises.3224.16.1.3.0 = INTEGER: (.*)/;
print "cpu5:".$1." ";
$output =~ /SNMPv2-SMI::enterprises.3224.16.1.4.0 = INTEGER: (.*)/;
print "cpu15:".$1." ";
$output =~ /SNMPv2-SMI::enterprises.3224.16.2.1.0 = INTEGER: (.*)/;
print "memory_allocated:".$1." ";
$output =~ /SNMPv2-SMI::enterprises.3224.16.2.2.0 = INTEGER: (.*)/;
print "memoryAvailable:".$1." ";
$output =~ /SNMPv2-SMI::enterprises.3224.16.2.3.0 = INTEGER: (.*)/;
print "memoryFragmented:".$1." ";
$output =~ /SNMPv2-SMI::enterprises.3224.16.3.2.0 = INTEGER: (.*)/;
print "sessionsAllocated:".$1." ";
$output =~ /SNMPv2-SMI::enterprises.3224.16.3.3.0 = INTEGER: (.*)/;
print "sessionsMaximum:".$1." ";
$output =~ /SNMPv2-SMI::enterprises.3224.16.3.4.0 = INTEGER: (.*)/;
print "sessionsFailed:".$1." ";
Rgds,
John
It appears to me that the script worked (see below). I also included the contents of the script (see below). Please keep me posted. Thanks for your help.
[root@usnyc1cal01 bin]# ./perl /srv/cacti/scripts/netscreen_stats.pl 10.109.4.50 SECRET
cpu1:7 cpu5:6 cpu15:7 memory_allocated:169505520 memoryAvailable:53033120 memoryFragmented:438 sessionsAllocated:1523 sessionsMaximum:250064 sessionsFailed:0 [root@usnyc1cal01 bin]#
#!/usr/bin/perl
# Copyright - Fletcher Cocquyt - fletch@med.stanford.edu
# 15 January 2004 under the GPL license agreement!
#
# Version 0.1 - PLEASE SEE INSTALL.txt for more information.
#
# USAGE:
#
# perl netscreen_stats.pl <hostname>
#
# <hostname> is optional and can be an IP address or host name.
# If none is given, "localhost" is assumed.
#
my $hostname = $ARGV[0];
my $community = $ARGV[1];
chomp $hostname;
chomp $community;
if ($hostname eq '') {
$hostname = "localhost";
}
$output = `snmpwalk -v 1 -c $community $hostname .1.3.6.1.4.1.3224.16 `;
$output =~ /SNMPv2-SMI::enterprises.3224.16.1.2.0 = INTEGER: (.*)/;
print "cpu1:".$1." ";
$output =~ /SNMPv2-SMI::enterprises.3224.16.1.3.0 = INTEGER: (.*)/;
print "cpu5:".$1." ";
$output =~ /SNMPv2-SMI::enterprises.3224.16.1.4.0 = INTEGER: (.*)/;
print "cpu15:".$1." ";
$output =~ /SNMPv2-SMI::enterprises.3224.16.2.1.0 = INTEGER: (.*)/;
print "memory_allocated:".$1." ";
$output =~ /SNMPv2-SMI::enterprises.3224.16.2.2.0 = INTEGER: (.*)/;
print "memoryAvailable:".$1." ";
$output =~ /SNMPv2-SMI::enterprises.3224.16.2.3.0 = INTEGER: (.*)/;
print "memoryFragmented:".$1." ";
$output =~ /SNMPv2-SMI::enterprises.3224.16.3.2.0 = INTEGER: (.*)/;
print "sessionsAllocated:".$1." ";
$output =~ /SNMPv2-SMI::enterprises.3224.16.3.3.0 = INTEGER: (.*)/;
print "sessionsMaximum:".$1." ";
$output =~ /SNMPv2-SMI::enterprises.3224.16.3.4.0 = INTEGER: (.*)/;
print "sessionsFailed:".$1." ";
Rgds,
John
Hmm, well since the script is just doing snmp, you would be a LOT better off if you converted it to a snmp data query for cacti. Much faster and efficient. Read http://docs.cacti.net/node/70 on how to make your own.
| 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 2 guests