SonicWall templates ?

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
jvandenbroek
Posts: 1
Joined: Tue Dec 11, 2007 10:37 am
Location: Haarlem, the Netherlands

Post by jvandenbroek »

I got exactly the same problem as jkw117@msn.com described above. Running PHP 4.4.4-8+etch4 and Apache 2.2.3-4+etch1. Any help would be appreciated!
edb
Posts: 5
Joined: Thu Apr 03, 2008 3:17 pm

Help

Post by edb »

I have this same issue that many other have had and have followed everything in this thread but to no avail.

Code: Select all

+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/opt/cacti/resource/script_queries/sonicwall_vpn.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /opt/cacti/scripts/query_sonicwall_vpn.pl 192.168.10.88 public index'
+ Executing script query 'perl /opt/cacti/scripts/query_sonicwall_vpn.pl 192.168.10.88 public query peergateway'
+ Executing script query 'perl /opt/cacti/scripts/query_sonicwall_vpn.pl 192.168.10.88 public query vpnname'
+ Found data query XML file at '/opt/cacti/resource/script_queries/sonicwall_vpn.xml'
+ Found data query XML file at '/opt/cacti/resource/script_queries/sonicwall_vpn.xml'
+ Found data query XML file at '/opt/cacti/resource/script_queries/sonicwall_vpn.xml'
I downloaded the files and uploaded them to my Linux server into the /cacti/scripts folder as well as renaming the file from query_sonicwall_vpnpl_455.txt to query_sonicwall_vpn.pl then taking the cacti_host_template_sonicwall_749.xml file copying it to /cacti/resource/script_queries and renaming it to sonicwall_vpn.xml but it doesn't seem to work.
Interface - Traffic (bytes/sec, Total Bandwidth) graph works fine.

I can monitor the SNMP-interface ststistics but not the Script - Sonicwall VPN as it just returns Success [0 Items, 0 Rows].

Appreciate any help. Being able to monitor the VPNs would be great.

Thanks

edb
edb
Posts: 5
Joined: Thu Apr 03, 2008 3:17 pm

Post by edb »

Here is the error I get when I try to run the script from the Linux server console:

Code: Select all

[root@defcon1 ~]# perl /opt/cacti/scripts/query_sonicwall_vpn.pl
192.168.10.88
public index
Can't locate Net/SNMP.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.5/
i386-linux-thread-multi/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5
.8.5/i386-linux-thread-multi/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thr
ead-multi/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thre
ad-multi/5.8.4 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/5.8.3 /usr
/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/5.8.2 /usr/lib/perl5/site_per
l/5.8.5/i386-linux-thread-multi/5.8.1 /usr/lib/perl5/site_perl/5.8.5/i386-linux-
thread-multi/5.8.0 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/l
ib/perl5/site_perl/5.8.5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/
5.8.5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl
5/site_perl/5.8.5/5.8.4 /usr/lib/perl5/site_perl/5.8.5/5.8.3 /usr/lib/perl5/site
_perl/5.8.5/5.8.2 /usr/lib/perl5/site_perl/5.8.5/5.8.1 /usr/lib/perl5/site_perl/
5.8.5/5.8.0 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.5/i386
-linux-thread-multi/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8
.5/i386-linux-thread-multi/5.8.5 /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thr
ead-multi/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-th
read-multi/5.8.4 /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/5.8.3
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/5.8.2 /usr/lib/perl5/ve
ndor_perl/5.8.5/i386-linux-thread-multi/5.8.1 /usr/lib/perl5/vendor_perl/5.8.5/i
386-linux-thread-multi/5.8.0 /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-
multi /usr/lib/perl5/vendor_perl/5.8.5/5.8.5/i386-linux-thread-multi /usr/lib/pe
rl5/vendor_perl/5.8.5/5.8.5 /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-m
ulti /usr/lib/perl5/vendor_perl/5.8.5/5.8.4 /usr/lib/perl5/vendor_perl/5.8.5/5.8
.3 /usr/lib/perl5/vendor_perl/5.8.5/5.8.2 /usr/lib/perl5/vendor_perl/5.8.5/5.8.1
/usr/lib/perl5/vendor_perl/5.8.5/5.8.0 /usr/lib/perl5/vendor_perl/5.8.5 /usr/li
b/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_p
erl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i386-linux-thre
ad-multi /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/s
ite_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1/i386-linux
-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/pe
rl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.
3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/s
ite_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i386-li
nux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/l
ib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.
8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-m
ulti /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/ven
dor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3
/usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl
5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at /opt/cacti/scripts/query_so
nicwall_vpn.pl line 20.
BEGIN failed--compilation aborted at /opt/cacti/scripts/query_sonicwall_vpn.pl l
ine 20.
[root@defcon1 ~]#

I do have net snmp installed ...

Code: Select all

[root@defcon1 ~]# rpm -q net-snmp-perl
net-snmp-perl-5.1.2-11.el4_6.11.2
I don't know and getting frustrated ...

edb
edb
Posts: 5
Joined: Thu Apr 03, 2008 3:17 pm

Post by edb »

OK for anyone else using this script on Linux CentOS here is what I had to do:

Code: Select all

wget http://dag.wieers.com/rpm/packages/perl-Net-SNMP/perl-Net-SNMP-5.2.0-1.2.el4.rf.noarch.rpm

wget http://dag.wieers.com/rpm/packages/perl-Crypt-DES/perl-Crypt-DES-2.05-3.2.el4.rf.i386.rpm

rpm -ivh perl-Crypt-DES-2.05-3.2.el4.rf.i386.rpm perl-Net-SNMP-5.2.0-1.2.el4.rf.noarch.rpm
Now I'm able to get the data and create the graphs. Thank goodness!

edb
jefframsey
Posts: 11
Joined: Mon Aug 25, 2008 6:24 pm

Post by jefframsey »

I am having some trouble with the figures for encryptbytes and decryptbytes.

First, the preliminaries: I am using Cacti 0.8.7bUbuntu on Ubuntu 8.04LTS. My Sonicwall is a Pro 4060. I am using the latest firmware which is 4.0.0.8 enhanced. All graphs work fine except for the VPN graphs.

I have two site-2-site VPN tunnels over a 2.3Mb SDSL connection. I used the formula in the earlier post, and came up with the following:

(2411724.8 / 8) * (1 + 1.05) = 618004.48

Since this is a synchronous connection, I used this number for both encryptbytes and decryptbytes.

When I setup the graphs, I get 'nan' for every value in the VPN graphs, and when I check the cacti log I find the following two lines for each graph:

Code: Select all

09/03/2008 10:08:10 AM - CMDPHP: Poller[0] Host[62] DS[832] CMD: perl /usr/share/cacti/site/scripts/query_sonicwall_vpn.pl fw1.tmifp.com COMMUNITY get decryptbytes VPNPEERTUNNEL, output: 03058035064592185554752469524695005589900
09/03/2008 10:08:10 AM - CMDPHP: Poller[0] Host[62] DS[832] CMD: perl /usr/share/cacti/site/scripts/query_sonicwall_vpn.pl fw1.tmifp.com COMMUNITY get encryptbytes VPNPEERTUNNEL, output: 1128083980536021070303173301074817189310748718371830
So what I have done is changed encryptbytes and decryptbytes to a number that is higher than the largest number that I can see here, and that is giving me data in my graphs, but it is telling me that my current stream is 20 petabytes at times.

If I leave the numbers in there from the formula in this thread, I never see any data in my VPN graphs at all.

Any ideas?
Robbin
Posts: 2
Joined: Wed Oct 29, 2008 5:04 am

Post by Robbin »

I have tried to download this template.
and use the sonicwall_vpn.xml file said before.

But it doesnt work.

i get this error:

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="192.168.1.1 - Connections" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="connections" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/lib/cacti/rra/robbin_-_sonicwall_sonicwall_connects_39.rrd":sonicwall_connects:AVERAGE \
AREA:a#35962BFF:"Connections"  \
GPRINT:a:LAST:"Current%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average%8.2lf %s"  \
GPRINT:a:MIN:"Minimum%8.2lf %s"  \
GPRINT:a:MAX:"Maximum%8.2lf %s" 
RRDTool Says:

ERROR: opening '/var/lib/cacti/rra/robbin_-_sonicwall_sonicwall_connects_39.rrd': No such file or directory

I looked in the cacti rra directory and the rrd file is not created.
If i assign the ping latency template it works fine.
i think i do somthing wrong.

cacti version: 0.8.7b
i dont know how i can see with version of the rrd tool i used.
in the cacti control panel version 1.3.x is selected.
on ubuntu 8.04 server
Robbin
Posts: 2
Joined: Wed Oct 29, 2008 5:04 am

Post by Robbin »

forgot my question i have solved it... i has not enabled snmp on the host....
Mischa
Posts: 1
Joined: Mon Dec 01, 2008 4:50 pm

Executing script for list of indexes ' '

Post by Mischa »

I have a few Sonicwalls I want to moniter for VPN traffic. A colleague told me about Cacti and by googling I came out here.

I'm having some trouble with the script, here's the verbose output:

Code: Select all

+ Running data query [13].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/opt/apache/htdocs/cacti/resource/script_queries/sonicwall_vpn.xml'
+ XML file parsed ok.
+ Executing script for list of indexes ' '
+ Found data query XML file at '/usr/opt/apache/htdocs/cacti/resource/script_queries/sonicwall_vpn.xml'
+ Found data query XML file at '/usr/opt/apache/htdocs/cacti/resource/script_queries/sonicwall_vpn.xml'
+ Found data query XML file at '/usr/opt/apache/htdocs/cacti/resource/script_queries/sonicwall_vpn.xml'
The XML was not created when I did the import so I manually created it. The XML and script file are owned by www, just like the rest of the scripts.

When I execute "perl query_sonicwall_vpn.pl 10.0.0.1 public index" from the console I get a list of public IP's, so it's net the Net/SNMP issue.

Can anyone help me with this?

I'm running Cacti 0.8.6j on FreeBSD 6.2.
nosoroze
Posts: 4
Joined: Wed Feb 25, 2009 11:14 am
Location: NY

Post by nosoroze »

Hi all,

I am trying to get this working, unsuccessfully.

I am running Cacti Version 0.8.7b on ubuntu-8.04.1-server-i386
Sonicwall PRO 4100 - SonicOS Enhanced 4.0.0.5-1e

Here is what I did:
- I copied the "query_sonicwall_vpn.pl" file to /usr/share/cacti/site/scripts/
- I copied the "sonicwall_vpn.xml" file to /usr/share/cacti/site/resource/script_queries/
- I added the Sonicwall firewall host and nothing is graphing:

I get:
- 1) Script - Sonicwall VPN (Verbose Query) Uptime Goes Backwards Success [0 Items, 0 Rows]
- When I run "perl query_sonicwall_vpn.pl x.x.x.x public index" I get "Requested table is empty or does not exist at query_sonicwall_vpn.pl line 51"
- Data Query [Script - Sonicwall VPN] Reload Associated Query
Error in data query.

Notice: Undefined variable: column_counter in /usr/share/cacti/site/graphs_new.php on line 876


Nothing is graphing and I'm not sure what to do next.

Any help is appreciated.

Thank you.
nosoroze
Posts: 4
Joined: Wed Feb 25, 2009 11:14 am
Location: NY

Post by nosoroze »

After triple checking everything I noticed that the XML file I imported had some undesirable characters in it. I reimported the xml template and now I'm getting 3 graphs (CPU, MEM and Connections).

Unfortunatly I now get some other erros trying to fraph VPN info:


Notice: Undefined index: arg_index in /usr/share/cacti/site/lib/data_query.php on line 96

Notice: Undefined index: script_path in /usr/share/cacti/site/lib/data_query.php on line 96

Warning: Variable passed to each() is not an array or object in /usr/share/cacti/site/lib/data_query.php on line 105

Warning: Variable passed to each() is not an array or object in /usr/share/cacti/site/lib/data_query.php on line 539

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/lib/data_query.php:96) in /usr/share/cacti/site/host.php on line 77
rmil4760
Posts: 4
Joined: Tue Mar 03, 2009 5:15 pm

Exact same computer configuration and issue as Nosoroze

Post by rmil4760 »

Anybody find any ideas on why this is happening?

Notice: Undefined index: arg_index in /usr/share/cacti/site/lib/data_query.php on line 96

Notice: Undefined index: script_path in /usr/share/cacti/site/lib/data_query.php on line 96

Warning: Variable passed to each() is not an array or object in /usr/share/cacti/site/lib/data_query.php on line 105

Warning: Variable passed to each() is not an array or object in /usr/share/cacti/site/lib/data_query.php on line 539

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/lib/data_query.php:96) in /usr/share/cacti/site/host.php on line 77
espaniol
Posts: 8
Joined: Tue Mar 10, 2009 7:23 am

Post by espaniol »

Hello,

I am running Cacti Version 0.8.7b on Debian 5
and the machine is a SonicWALL Version: 9.0.1-006 Aventail VPN with debian_version 3.1 .

I did this same as nosoroze:
- I copied the "query_sonicwall_vpnpl_455.pl" file to /usr/share/cacti/site/scripts/.
- I copied the "sonicwall_vpn.xml" file to /usr/share/cacti/resource/script_queries.
- I added the Sonicwall firewall host and nothing is graphing.

I get:
- 1) Script - Sonicwall VPN (Verbose Query) Uptime Goes Backwards Success [0 Items, 0 Rows]
The graphic is in white...

Verbose query is:

Code: Select all

+ Running data query [15].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/sonicwall_vpn.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /usr/share/cacti/site/scripts/query_sonicwall_vpn.pl 10.1.118.170 public index'
+ Executing script query 'perl /usr/share/cacti/site/scripts/query_sonicwall_vpn.pl 10.1.118.170 public query peergateway'
+ Executing script query 'perl /usr/share/cacti/site/scripts/query_sonicwall_vpn.pl 10.1.118.170 public query vpnname'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/sonicwall_vpn.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/sonicwall_vpn.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/sonicwall_vpn.xml'
When I execute "perl /usr/share/cacti/site/scripts/query_sonicwall_vpn.pl 10.1.118.170 public index", Cacti gives this error:

Code: Select all

Can't locate Net/SNMP.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/share/cacti/site/scripts/query_sonicwall_vpn.pl line 20.
BEGIN failed--compilation aborted at /usr/share/cacti/site/scripts/query_sonicwall_vpn.pl line 20.

Any help?
francois_j
Posts: 5
Joined: Sun Jan 18, 2009 5:54 pm
Location: Montreal

Post by francois_j »

I just imported the files with success. No file reported errors on import.

That been said, on the Data Query section, it reports there is no XML file located. It's looking at "<path_cacti>/resource/script_queries/sonicwall_vpn.xml"

The quety_sonicwall_vpn.pl script is in "<path_cacti>/scripts" and is executable by the cacti user.

Where do I go from here?

Thanks
linebacker2
Posts: 28
Joined: Fri May 08, 2009 11:34 am

SonicWall Template half working!!

Post by linebacker2 »

Hi,

I am running Cacti Version 0.8.7d on windows Server 2003
SonicWALL PRO 3060

I am getting the same outcome as listed above

I took the following steps:

- I copied the "query_sonicwall_vpn.pl_455.pl" file to ...cacti/site/scripts/ and renamed to "query_sonicwall_vpn.pl".
- I copied the "sonicwall_vpn.xml" file to ...cacti/resource/script_queries.
- I added the Sonicwall firewall host and I can only graph CPU, Connections, and Memory Usgae but nothing else.

I get:
- Script - Sonicwall VPN (Verbose Query) Uptime Goes Backwards Success [0 Items, 0 Rows]

Verbose query is:
Code:
+ Running data query [14].
+ Found type = '4 '[script query].
+ Found data query XML file at 'C:/inetpub/cacti/resource/script_queries/sonicwall_vpn.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl C:\inetpub\cacti\scripts\query_sonicwall_vpn.pl 172.17.100.5 public index'
+ Executing script query 'perl C:\inetpub\cacti\scripts\query_sonicwall_vpn.pl 172.17.100.5 public query peergateway'
+ Executing script query 'perl C:\inetpub\cacti\scripts\query_sonicwall_vpn.pl 172.17.100.5 public query vpnname'
+ Found data query XML file at 'C:/inetpub/cacti/resource/script_queries/sonicwall_vpn.xml'
+ Found data query XML file at 'C:/inetpub/cacti/resource/script_queries/sonicwall_vpn.xml'
+ Found data query XML file at 'C:/inetpub/cacti/resource/script_queries/sonicwall_vpn.xml'


When I execute "perl c:/inetpub/cacti/scripts/query_sonicwall_vpn.pl 10.1.118.170 public index", Cacti gives this error:
Code:

Can't locate Net/SNMP.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .)
at /inetpub/cacti/scripts/query_sonicwall_vpn.pl line 20.
BEGIN failed--compilation aborted at /inetpub/cacti/scripts/query_sonicwall_vpn.
pl line 20.


I have been combing the forums with no resolution?? All other graphs/templates are fully functioning....
mcmuffin
Posts: 1
Joined: Thu Aug 06, 2009 10:34 am

Post by mcmuffin »

Initially had a few problems with this template. Took about 5 minutes to get things working. I performed these steps AFTER following the initial instructions and AFTER adding my sonicwall as a device. This is an ubuntu server.:
  • sudo apt-get install libcrypt-des-perl libcrypt-des-ede3-perl libnet-snmp-perl
  • Copy the attached file to cacti/resource/script_queries/sonicwall_vpn.xml
  • Browse to your Sonicwall device, select "Create Graphs for This Host" and then click the green "Reload Associated Query" circle-button. The page should reload and all of your VPNs should be listed.
If I forgot any steps, my bad!

Now, has anyone figured out how to graph the actual WAN interfaces?
Attachments
sonicwall_vpn.xml
(1.57 KiB) Downloaded 1062 times
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests