SonicWall templates ?
Moderators: Developers, Moderators
SonicWall templates ?
Anyone got a data, host or graph template for SonicWall products ? We would like to graph VPN status and utilization.
Thanks in advance.
Thanks in advance.
-
- Posts: 25
- Joined: Thu Nov 10, 2005 12:00 am
-
- Posts: 4
- Joined: Wed Nov 23, 2005 9:23 am
Sonicwall Templates for VPN Usage, CPU, Memory & Connect
I have created the following templates and scripts for monitoring your Sonicwall firewall. The template includes graphs for CPU Utilization, Memory Usage, Current Connections Cache, and most importantly VPN utilization on a tunnel-by-tunnel basis as well as the basic interface stats.
If you are running SonicOS Enhanced then you be able to graph everything, if you are running SonicOS Standard or the older the 6.X firmware, then you will only get the VPN monitoring as the other stats are unavailable via SNMP.
The script portion (written is PERL) queries the firewall and returns the list of currently active tunnels (by the IP address on the Peer Gateway) as well as the tunnel name and decrypted (received) bytes and encrypted (transmitted) bytes. Because the tunnels are renegotiated (by default every 8 hours) you will experience spikes in your graph unless you follow the installation instructions.
Also because the firewall does not always return the VPN tunnel name you must renegotiate each tunnel prior to creating the graphs the first time in order for it to correctly pull in the name. You may need to do this a couple of times being sure to press the green O button in cacti before they will all show up.
Installation Instructions
1. Download query_sonicwall_vpn.pl.txt and copy and rename to your <path_cacti>/scripts/query_sonicwall_vpn.pl
2. Import the Template cacti_host_template_sonicwall.xml
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.
Hopefully this works for you, please let me know. I know the script is less than optimal, but I'm not really a programmer so I'd appreciate any feedback. Additionally, the basis for the script came from Dan Brummer in this post.
--wazoqaz
If you are running SonicOS Enhanced then you be able to graph everything, if you are running SonicOS Standard or the older the 6.X firmware, then you will only get the VPN monitoring as the other stats are unavailable via SNMP.
The script portion (written is PERL) queries the firewall and returns the list of currently active tunnels (by the IP address on the Peer Gateway) as well as the tunnel name and decrypted (received) bytes and encrypted (transmitted) bytes. Because the tunnels are renegotiated (by default every 8 hours) you will experience spikes in your graph unless you follow the installation instructions.
Also because the firewall does not always return the VPN tunnel name you must renegotiate each tunnel prior to creating the graphs the first time in order for it to correctly pull in the name. You may need to do this a couple of times being sure to press the green O button in cacti before they will all show up.
Installation Instructions
1. Download query_sonicwall_vpn.pl.txt and copy and rename to your <path_cacti>/scripts/query_sonicwall_vpn.pl
2. Import the Template cacti_host_template_sonicwall.xml
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.
Hopefully this works for you, please let me know. I know the script is less than optimal, but I'm not really a programmer so I'd appreciate any feedback. Additionally, the basis for the script came from Dan Brummer in this post.
--wazoqaz
- Attachments
-
- query_sonicwall_vpn.pl.txt
- Copy to your <path_cacti>/scripts/ directory and rename without .txt
- (4.74 KiB) Downloaded 9746 times
-
- cacti_host_template_sonicwall.xml
- Template for CPU, Memory, Connections, and VPN Usage for Sonicwall Firewall
- (44.99 KiB) Downloaded 13046 times
jond3rd:
I had the exact same problem, I was running the Sonic Enhanced and still only got the connections graph. Upgrading to the most recent version fixed this, and now everything works perfectly.
I wish I had thought to write down the old version number...
[Edit]
By the way, thanks for the great set of templates. I really appreciate it.
[/Edit]
I had the exact same problem, I was running the Sonic Enhanced and still only got the connections graph. Upgrading to the most recent version fixed this, and now everything works perfectly.
I wish I had thought to write down the old version number...
[Edit]
By the way, thanks for the great set of templates. I really appreciate it.
[/Edit]
jond3rd,
I developed and tested the scripts against our new Sonicwall Pro 4060 running SonicOS Enhanced 3.2.0.3-54e, which I believe is the latest firmware release.
I don't have any older boxes to test against sorry, and seeing as how this one is in production I can't monkey too much with. So all I can say at this point is to update to lastest version and see if you get anything then.
Just as an aside though my memory graph has been completely flat for the last 2 weeks at 25%.
jcheney,
My pleasure. It is finally nice to be able to give back to the community.
--wazoqaz
I developed and tested the scripts against our new Sonicwall Pro 4060 running SonicOS Enhanced 3.2.0.3-54e, which I believe is the latest firmware release.
I don't have any older boxes to test against sorry, and seeing as how this one is in production I can't monkey too much with. So all I can say at this point is to update to lastest version and see if you get anything then.
Just as an aside though my memory graph has been completely flat for the last 2 weeks at 25%.
jcheney,
My pleasure. It is finally nice to be able to give back to the community.
--wazoqaz
jond3rd:
I am pretty sure that upgrading to the latest firmware will solve your problem. I think that the version I was using that didn't work was 3.1.something, and once I upgraded to 3.2.0.3-54e, it worked perfectly.
If the upgraded firmware doesn't work, then we can start taking a look at everything else.
I am pretty sure that upgrading to the latest firmware will solve your problem. I think that the version I was using that didn't work was 3.1.something, and once I upgraded to 3.2.0.3-54e, it worked perfectly.
If the upgraded firmware doesn't work, then we can start taking a look at everything else.
Strange error... xml file not dreated on import
Thanks wazoqaz for creating the scripts im looking forward to getting them working. I have a small issue with the data query. It appears the sonicwall_vpn.xml file never gets created. Im on version 0.8.6h of cacti. Running a verbose query :
__________________________________
Data Query Debug Information
+ Running data query [18].
+ Found type = '4 '[script query].
+ Could not find data query XML file at '/var/www/html/cacti/resource/script_queries/sonicwall_vpn.xml'
+ Error parsing XML file into an array.
+ Could not find data query XML file at '/var/www/html/cacti/resource/script_queries/sonicwall_vpn.xml'
+ Could not find data query XML file at '/var/www/html/cacti/resource/script_queries/sonicwall_vpn.xml'
+ Could not find data query XML file at '/var/www/html/cacti/resource/script_queries/sonicwall_vpn.xml'
_________________________________
the file sonicwall_vpn is not created after the import of cacti_host_template_sonicwall_749.xml
Any one have an idea? can someone post the file sonicwall_vpn.xml so I can simply drop it in this directory?
Thanks all.
__________________________________
Data Query Debug Information
+ Running data query [18].
+ Found type = '4 '[script query].
+ Could not find data query XML file at '/var/www/html/cacti/resource/script_queries/sonicwall_vpn.xml'
+ Error parsing XML file into an array.
+ Could not find data query XML file at '/var/www/html/cacti/resource/script_queries/sonicwall_vpn.xml'
+ Could not find data query XML file at '/var/www/html/cacti/resource/script_queries/sonicwall_vpn.xml'
+ Could not find data query XML file at '/var/www/html/cacti/resource/script_queries/sonicwall_vpn.xml'
_________________________________
the file sonicwall_vpn is not created after the import of cacti_host_template_sonicwall_749.xml
Any one have an idea? can someone post the file sonicwall_vpn.xml so I can simply drop it in this directory?
Thanks all.
I should add
I should add ...this is the result I get from xml template import
Import Results
Cacti has imported the following items:
Round Robin Archive
[success] Daily (5 Minute Average) [update]
[success] Weekly (30 Minute Average) [update]
[success] Monthly (2 Hour Average) [update]
[success] Yearly (1 Day Average) [update]
CDEF
[success] Turn Bytes into Bits [update]
GPRINT Preset
[success] Normal [update]
Data Input Method
[success] Get SNMP Data [update]
[success] Get Script Data (Indexed) [update]
Data Template
[success] Sonicwall CPU Usage [update]
[success] Sonicwall Memory Usage [update]
[success] Sonicwall Connection Cache [update]
[success] Sonicwall VPN - Traffic [update]
Graph Template
[success] Sonicwall CPU Usage [update]
[success] Sonicwall Memory Usage [update]
[success] Sonicwall Connection Cache [update]
[success] Sonicwall VPN Traffic (bits/sec) [update]
[success] Sonicwall VPN Traffic (bits/sec, Total Bandwidth) [update]
Data Query
[success] Script - Sonicwall VPN [update]
Host Template
[success] Sonicwall [update]
Import Results
Cacti has imported the following items:
Round Robin Archive
[success] Daily (5 Minute Average) [update]
[success] Weekly (30 Minute Average) [update]
[success] Monthly (2 Hour Average) [update]
[success] Yearly (1 Day Average) [update]
CDEF
[success] Turn Bytes into Bits [update]
GPRINT Preset
[success] Normal [update]
Data Input Method
[success] Get SNMP Data [update]
[success] Get Script Data (Indexed) [update]
Data Template
[success] Sonicwall CPU Usage [update]
[success] Sonicwall Memory Usage [update]
[success] Sonicwall Connection Cache [update]
[success] Sonicwall VPN - Traffic [update]
Graph Template
[success] Sonicwall CPU Usage [update]
[success] Sonicwall Memory Usage [update]
[success] Sonicwall Connection Cache [update]
[success] Sonicwall VPN Traffic (bits/sec) [update]
[success] Sonicwall VPN Traffic (bits/sec, Total Bandwidth) [update]
Data Query
[success] Script - Sonicwall VPN [update]
Host Template
[success] Sonicwall [update]
Who is online
Users browsing this forum: No registered users and 1 guest