SonicWall templates ?

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

Moderators: Developers, Moderators

Post Reply
bdearlove
Posts: 19
Joined: Thu Jun 09, 2005 8:51 am

Post by bdearlove »

Is the VPN up? It needs to be connected for it to be found.

Also, you can try the query at the command prompt to see if it is visible. Let me know if you need the commands.
bluesk1d
Posts: 15
Joined: Fri Feb 23, 2007 11:14 am
Location: Orange County, CA

Doh!

Post by bluesk1d »

I get this dreaded message too :( I get the same message from both of my Sonicwalls. All other SMTP stuff works fine. CPU/MEM/Interface usage etc.

"This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information."

in the Data Query [Script - Sonicwall VPN] section when i try to create a graph.

If I run the query in debug mode here is the output:
Data Query Debug Information
+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at 'c:/Inetpub/wwwroot/cacti/resource/script_queries/sonicwall_vpn.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl c:\Inetpub\wwwroot\cacti\scripts\query_sonicwall_vpn.pl 192.168.100.1 public index'
+ Executing script query 'perl c:\Inetpub\wwwroot\cacti\scripts\query_sonicwall_vpn.pl 192.168.100.1 public query peergateway'
+ Executing script query 'perl c:\Inetpub\wwwroot\cacti\scripts\query_sonicwall_vpn.pl 192.168.100.1 public query vpnname'
+ Found data query XML file at 'c:/Inetpub/wwwroot/cacti/resource/script_queries/sonicwall_vpn.xml'
+ Found data query XML file at 'c:/Inetpub/wwwroot/cacti/resource/script_queries/sonicwall_vpn.xml'
+ Found data query XML file at 'c:/Inetpub/wwwroot/cacti/resource/script_queries/sonicwall_vpn.xml'
bdearlove
Posts: 19
Joined: Thu Jun 09, 2005 8:51 am

Post by bdearlove »

Log onto the Cacti server and try running this from a DOS prompt
and see if you get a response:

perl c:\Inetpub\wwwroot\cacti\scripts\query_sonicwall_vpn.pl 192.168.100.1 public index

Let me know what you get. I had the same issue but got it working, just forget how but can try and help you.
bluesk1d
Posts: 15
Joined: Fri Feb 23, 2007 11:14 am
Location: Orange County, CA

Post by bluesk1d »

Thanks! Since only IIS knows how to execute perl scripts, running that from a dos prompt only opens the pl file in notepad. I had that idea too =P
bdearlove
Posts: 19
Joined: Thu Jun 09, 2005 8:51 am

Post by bdearlove »

It shouldn't. Do you have perl.exe downloaded and installed? I downloaded and installed it in order for perl to work, then you can run perl.exe to test. It took me a bit to get working but the VPN bandwith is an amazing feature when it gets working.
bluesk1d
Posts: 15
Joined: Fri Feb 23, 2007 11:14 am
Location: Orange County, CA

Post by bluesk1d »

Wow now that you mention it... I dont think Ive used any perl on this system before and it probably isnt even installed... Duh!
tlister
Posts: 6
Joined: Thu Oct 26, 2006 11:30 am

Niceness

Post by tlister »

Hey Wazoqaz thanks a lot for this patch!

I am using 0.8.6j and this is working great for me!

--Tim
ddonohue
Cacti User
Posts: 77
Joined: Mon Jul 10, 2006 10:36 am
Contact:

Post by ddonohue »

Anyone running this on unix if you get a error in regards to NET::SNMP that means you need to install the NET::SNMP module for Perl. This should resolve it. I was getting the error in data query and running it in debug looked like the above.

Donohue
marco114
Posts: 3
Joined: Wed Nov 22, 2006 1:10 pm

SNMP Error

Post by marco114 »

Was wondering what I could be doing wrong. Here's my specs:

SonicOS Enhanced 3.2.3.0-6e
Model: PRO 1260 Enhanced

Everytime I try to add the SonicWall, I get an "SNMP Error". I have enabled SNMP on the SonicWall and I've added a rule to all SNMP but all internal traffic is allowed to access.

If I run the command:
# perl query_sonicwall_vpn.pl 192.168.1.2 public index

I get:
request error: No response from remote host '192.168.1.2' at query_sonicwall_vpn.pl line 51.

I'd really like to get this to work but I'm about ready to give up.

Thanks
Marc
bdearlove
Posts: 19
Joined: Thu Jun 09, 2005 8:51 am

Post by bdearlove »

Download GETIF and see if you can query SNMP results with it to make sure it is/isn't a Cacti issue.

So you have SNMP check marked on your LAN, and if you goto firewall rules for LAN<->LAN there is a rule to allow SNMP?
jkw117@msn.com
Posts: 7
Joined: Tue Jun 26, 2007 12:07 pm
Location: Allentown, PA

SonicWall Template Data query Issues

Post by jkw117@msn.com »

I've been using cacti for awhile here and there. I'm at a new job now setting up a cacti server, and for the 1st time I needed to monitor a sonicwall. So I installed the template, and the perl script. Verified permissions, etc.. I tested the perl script from the command line(I had to load the NET:SNMP module for perl)
I now get the error below whenever I try to do a verbose query on the Sonicwall VPN script.

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

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

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

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

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/lib/data_query.php:98) in /usr/share/cacti/site/host.php on line 79


I also get and error when I go to data queries and the sonicwall VPN it says it loads the XML file. If I click on the associated Graph "Sonicwall VPN Traffic (bits/sec) " or the other one, I get the following error "Warning: Variable passed to each() is not an array or object in /usr/share/cacti/site/data_queries.php on line 356" I get this error on both Data Sources next to Decrypt bytes or encryptbytes.

Any Help would be appreciated.
pcheslock
Posts: 2
Joined: Mon Jul 16, 2007 11:29 am

Also having issues

Post by pcheslock »

Hi everyone, i'm also having some problems with cacti and the vpn script. I'm able to see the script query and see my VPN tunnel, but when i try to create a graph for the host. It 1st reports that the graph was created
"+ Created graph: HSRI - Camp St Sonicwall - VPN Traffic for: |query_swVPNName|"

But the graph is never created, and I see the following in my cacti.log

07/16/2007 01:29:50 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select data_input_fields.type_code, data_input_data.value from (data_input_fields,data_input_data) where data_input_fields.id=data_input_data.data_input_field_id and data_input_data.data_template_data_id= and (data_input_fields.type_code='index_type' or data_input_fields.type_code='index_value' or data_input_fields.type_code='output_type')"


I'm guessing this is creating a graph with the name "|query_swVPNName|" and the SQL server is having issues with the pipes |. I'm running cacti Version 0.8.6j, on a win2k3 server.

Any ideas?
pcheslock
Posts: 2
Joined: Mon Jul 16, 2007 11:29 am

Figured Out

Post by pcheslock »

I actually reimported the template, and it picked up the vpn template as new for some reason, and now when i create the graph, it asks for bytes. All set!
MartinB
Posts: 17
Joined: Mon Feb 13, 2006 8:22 am
Location: Germany, NRW, near Hagen

Post by MartinB »

Thanks for the work on this template.

CPU and connections is working fine, I just can't get the VPN queries to work.

Using cacti 0.8.6h
The sonicwall is a 3060 with firmware SonicOS Enhanced 3.2.3.0-6e

In the device page i see the following at "associated data queries":
Script - Sonicwall VPN (Verbose Query) Uptime Goes Backwards Success [0 Items, 0 Rows]
When running the "verbose query" in cacti I get:
+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/script_queries/sonicwall_vpn.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /srv/www/htdocs/cacti/scripts/query_sonicwall_vpn.pl 172.xx.xx.xx public index'
+ Executing script query 'perl /srv/www/htdocs/cacti/scripts/query_sonicwall_vpn.pl 172.xx.xx.xx public query peergateway'
+ Executing script query 'perl /srv/www/htdocs/cacti/scripts/query_sonicwall_vpn.pl 172.xx.xx.xx public query vpnname'
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/script_queries/sonicwall_vpn.xml'
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/script_queries/sonicwall_vpn.xml'
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/script_queries/sonicwall_vpn.xml'
Running the perl script from the command line:
./query_sonicwall_vpnpl_455.pl 172.xx.xx.xx public index
Scalar value @splits[1] better written as $splits[1] at ./query_sonicwall_vpnpl_455.pl line 63.
Reference found where even-sized list expected at ./query_sonicwall_vpnpl_455.pl line 50.
80.xx.xx.xx
83.xx.xx.xx
24.xx.xx.xx
80.xx.xx.xx
83.xx.xx.xx
83.xx.xx.xx
84.xx.xx.xx
84.xx.xx.xx
24.xx.xx.xx
80.xx.xx.xx
24.xx.xx.xx
84.xx.xx.xx
The IPs match the VPN partners, so it looks like all connections are found.

When running the script with the query option (peergateway or vpnname) I get results too.

As we have 3 VPN connections from the same IP with the same Name (for 3 different internal networks), maybe this could be the cause?

Any ideas on how to get this working?

Martin
MartinB
Posts: 17
Joined: Mon Feb 13, 2006 8:22 am
Location: Germany, NRW, near Hagen

Post by MartinB »

Problem solved, was my fault, sorry for bothering.

When you download the file from this forum it is named query_sonicwall_vpnpl_455.pl but the query is looking for query_sonicwall_vpn.pl

Martin
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests