|
|
| Author |
Message |
bdearlove
Joined: 09 Jun 2005 Posts: 14
|
Posted: Mon Jan 29, 2007 9:44 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
bluesk1d
Joined: 23 Feb 2007 Posts: 15 Location: Orange County, CA
|
Posted: Fri Feb 23, 2007 3:25 pm Post subject: Doh! |
|
|
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' |
|
| Back to top |
|
 |
bdearlove
Joined: 09 Jun 2005 Posts: 14
|
Posted: Fri Feb 23, 2007 3:59 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
bluesk1d
Joined: 23 Feb 2007 Posts: 15 Location: Orange County, CA
|
Posted: Fri Feb 23, 2007 10:23 pm Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
bdearlove
Joined: 09 Jun 2005 Posts: 14
|
Posted: Fri Mar 02, 2007 2:35 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
bluesk1d
Joined: 23 Feb 2007 Posts: 15 Location: Orange County, CA
|
Posted: Fri Mar 02, 2007 9:35 pm Post subject: |
|
|
| Wow now that you mention it... I dont think Ive used any perl on this system before and it probably isnt even installed... Duh! |
|
| Back to top |
|
 |
tlister
Joined: 26 Oct 2006 Posts: 6
|
Posted: Mon Apr 16, 2007 3:18 pm Post subject: Niceness |
|
|
Hey Wazoqaz thanks a lot for this patch!
I am using 0.8.6j and this is working great for me!
--Tim |
|
| Back to top |
|
 |
ddonohue Cacti User
Joined: 10 Jul 2006 Posts: 75
|
Posted: Tue Apr 17, 2007 5:06 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
marco114
Joined: 22 Nov 2006 Posts: 3
|
Posted: Sat Jun 23, 2007 7:25 am Post subject: SNMP Error |
|
|
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 |
|
| Back to top |
|
 |
bdearlove
Joined: 09 Jun 2005 Posts: 14
|
Posted: Mon Jun 25, 2007 1:58 pm Post subject: |
|
|
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? |
|
| Back to top |
|
 |
jkw117@msn.com
Joined: 26 Jun 2007 Posts: 1 Location: Allentown, PA
|
Posted: Tue Jun 26, 2007 12:14 pm Post subject: SonicWall Template Data query Issues |
|
|
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. |
|
| Back to top |
|
 |
pcheslock
Joined: 16 Jul 2007 Posts: 2
|
Posted: Mon Jul 16, 2007 12:33 pm Post subject: Also having issues |
|
|
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? |
|
| Back to top |
|
 |
pcheslock
Joined: 16 Jul 2007 Posts: 2
|
Posted: Mon Jul 16, 2007 1:26 pm Post subject: Figured Out |
|
|
| 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! |
|
| Back to top |
|
 |
MartinB
Joined: 13 Feb 2006 Posts: 17 Location: Germany, NRW, near Hagen
|
Posted: Wed Sep 26, 2007 3:26 am Post subject: |
|
|
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":
| Quote: |
Script - Sonicwall VPN (Verbose Query) Uptime Goes Backwards Success [0 Items, 0 Rows]
|
When running the "verbose query" in cacti I get:
| Quote: |
+ 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:
| Quote: |
./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 |
|
| Back to top |
|
 |
MartinB
Joined: 13 Feb 2006 Posts: 17 Location: Germany, NRW, near Hagen
|
Posted: Wed Sep 26, 2007 7:06 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
|