SonicWall templates ?

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

Moderators: Developers, Moderators

Post Reply
mickoskimiki
Posts: 1
Joined: Tue Mar 10, 2015 4:44 am

Re:

Post by mickoskimiki »

Hello,

After some troubleshooting I managed to get working solution for monitoring my VPN IpSec Tunnels on Sonicwall. But huge spikes are there and I can't solve that. Spikes are randomly there in PB. I tried to solve with:

3. When creating graphs you will be prompted to enter a maximum value for decrypt/encrypt bytes. You MUST enter a value equal to the fast connection of any of the tunnels being monitored from this device. Otherwise you will see huge spikes every 8 hours.

I enter maximums for two fields "maximum decrypt/encrypt" with values from provided formula but I got the graphics with 8kbps up/down with a lot of interruptions which are not valid.

Any suggestions? My VPN traffic is 30Mbps synchronous.
bdearlove wrote:Sorry if I sound like a N00b. Have a question. I have everything working great, but the 1 part I didn't know what to answer:

3. When creating graphs you will be prompted to enter a maximum value for decrypt/encrypt bytes. You MUST enter a value equal to the fast connection of any of the tunnels being monitored from this device. Otherwise you will see huge spikes every 8 hours.

What is fast connection? I have been noticing the spikes but do not know what to enter there,

Also, BigCityMike, it looks like you have the same issue as I did. Make sure you have Perl Installed, and Net-SNMP for Perl. The Windows Installer does not include it and I was running into the same issue until installed this.
User avatar
MoonDogg
Posts: 32
Joined: Thu Mar 16, 2017 8:43 am

Re: SonicWall templates ?

Post by MoonDogg »

Can anyone help with getting this working properly? I have Cacti 1.06 and have installed this template which works except the VPN's. I have 7 SW routers 1 NSA2600 1 TZ400, 3 TZ300, and 2 SOHO. I can monitor all the interfaces, CPU, Memory, and connections with no issues. Just the VPN script not working. Any help would be appreciated.

This is the Verbose Query info :

Code: Select all

Data Query Debug Information Hide
Total: 0, Delta: 0, Running data query [10].
Total: 0, Delta: 0, Found type = '4' [Script Query].
Total: 0, Delta: 0, Found data query XML file at '/var/www/html/cacti/resource/script_queries/sonicwall_vpn.xml'
Total: 0, Delta: 0, XML file parsed ok.
Total: 0.01, Delta: 0, Executing script for num of indexes 'perl /var/www/html/cacti/scripts/query_sonicwall_vpn.pl 192.168.13.1 public num_indexes'
Total: 0.01, Delta: 0, Executing script for list of indexes 'perl /var/www/html/cacti/scripts/query_sonicwall_vpn.pl 192.168.13.1 public index' Index Count: 0
Click to show data query output for 'index'
Click to show data query output for field 'swPeerGateway'
Executing script query 'perl /var/www/html/cacti/scripts/query_sonicwall_vpn.pl 192.168.13.1 public query peergateway'
Click to show data query output for field 'swVPNName'
Executing script query 'perl /var/www/html/cacti/scripts/query_sonicwall_vpn.pl 192.168.13.1 public query vpnname'
Total: 0.02, Delta: 0.01, Update data query sort cache complete
Total: 0.02, Delta: 0, Updated data query index ordering
Total: 0.03, Delta: 0.01, Update re-index cache complete
Total: 0.03, Delta: 0, Update graph data query cache complete
Total: 0.03, Delta: 0, Update data source data query cache complete
Total: 0.03, Delta: 0, Update data query cache complete
Total: 0.03, Delta: 0, Update poller cache from query complete
Total: 0.03, Delta: 0, Automation execute data query complete
Total: 0.03, Delta: 0, Plugin hooks complete
Ubuntu 16.04.2 LTS
Cacti 1.1.17
Spine 1.1.17
RRDtool 1.5.5
PHP 7.0.18
mysql 14.14 (5.7.19)
Cycle 4.0
Monitor 2.1
Gexport 1.0
Thold 1.02
PHP Weathermap 0.98a
User avatar
MoonDogg
Posts: 32
Joined: Thu Mar 16, 2017 8:43 am

Re: SonicWall templates ?

Post by MoonDogg »

Update I tried running the command on the server and found out I did not have net::snmp installed. Got that installed and now getting this error.

Code: Select all

Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at query_sonicwall_vpn.pl line 51.
This is what is at line 51

Code: Select all

die "request error: ".$session->error unless (defined %result);
I have tried to take out various things and got various errors. I took line 51 out completely and it gives no errors but no results either.

Any help would be appreciated.

Cacti = 1.1.2
Ubuntu 16.04.2 LTS
Perl 5.22.1-9
Ubuntu 16.04.2 LTS
Cacti 1.1.17
Spine 1.1.17
RRDtool 1.5.5
PHP 7.0.18
mysql 14.14 (5.7.19)
Cycle 4.0
Monitor 2.1
Gexport 1.0
Thold 1.02
PHP Weathermap 0.98a
User avatar
MoonDogg
Posts: 32
Joined: Thu Mar 16, 2017 8:43 am

Re: SonicWall templates ?

Post by MoonDogg »

I wanted to sum up everything I had to do to get this working. This is all the things I had to change in the script from things I found in this post and through google. Hopefully I will save someone else all the trouble.

This is my current setup:
Server = Ubuntu 16.04.2 LTS
Cacti = 1.1.5
Perl = Perl 5.22.1-9


(Complements to mcmuffin)
First you need to make sure you have everything you need installed. (ie. Net::SNMP)

Code: Select all

sudo apt-get install libcrypt-des-perl libcrypt-des-ede3-perl libnet-snmp-perl
(Complements to ck1)
This :

Code: Select all

Set OID variables
$sonicSAStatPeerGateway = "1.3.6.1.4.1.8741.1.3.2.1.1.1.2.";
$sonicSAStatDecryptByteCount = "1.3.6.1.4.1.8741.1.3.2.1.1.1.11.";
$sonicSAStatEncryptByteCount = "1.3.6.1.4.1.8741.1.3.2.1.1.1.9.";
$sonicSAStatUserName = "1.3.6.1.4.1.8741.1.3.2.1.1.1.14.";
Needs to be changed to this:

Code: Select all

Set OID variables
$sonicSAStatPeerGateway = "1.3.6.1.4.1.8741.1.3.2.1.1.1.2";
$sonicSAStatDecryptByteCount = "1.3.6.1.4.1.8741.1.3.2.1.1.1.11";
$sonicSAStatEncryptByteCount = "1.3.6.1.4.1.8741.1.3.2.1.1.1.9";
$sonicSAStatUserName = "1.3.6.1.4.1.8741.1.3.2.1.1.1.14";

(Complements to google)
This on line 51:

Code: Select all

die "request error: ".$session->error unless (defined %result);
Needs to be changed to this:

Code: Select all

die "request error: ".$session->error unless (%result);
Ubuntu 16.04.2 LTS
Cacti 1.1.17
Spine 1.1.17
RRDtool 1.5.5
PHP 7.0.18
mysql 14.14 (5.7.19)
Cycle 4.0
Monitor 2.1
Gexport 1.0
Thold 1.02
PHP Weathermap 0.98a
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests