SonicWall templates ?

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

Moderators: Developers, Moderators

Post Reply
jlucas
Posts: 7
Joined: Sat Oct 14, 2006 10:11 pm

Thank you wazoqaz ! Uploading the file worked....

Post by jlucas »

Heres the sonicwall_vpn.xml file from wazoqaz:

Code: Select all

<interface> 
        <name>Get Sonicwall VPN SA Statistics</name> 
        <script_path>perl |path_cacti|/scripts/query_sonicwall_vpn.pl</script_path> 
        <arg_index>index</arg_index> 
        <arg_query>query</arg_query> 
        <arg_get>get</arg_get> 
        <arg_num_indexes>num_indexes</arg_num_indexes> 
        <arg_prepend>|host_hostname| |host_snmp_community|</arg_prepend> 
        <output_delimeter>:</output_delimeter> 
        <index_order>swPeerGateway</index_order> 
        <index_order_type>alphabetic</index_order_type> 
        <index_title_format>|chosen_order_field|</index_title_format> 
        <fields> 
                <swPeerGateway> 
                        <name>Peer Gateway Address</name> 
                        <direction>input</direction> 
                        <query_name>peergateway</query_name> 
                </swPeerGateway> 
                <swVPNName> 
                        <name>VPN SA Name</name> 
                        <direction>input</direction> 
                        <query_name>vpnname</query_name> 
                </swVPNName> 
                <swDecryptBytes> 
                        <name>Decrypted-Inbound Byte Count</name> 
                        <direction>output</direction> 
                        <query_name>decryptbytes</query_name> 
                </swDecryptBytes> 
                <swEncryptBytes> 
                        <name>Encrypted-Outbound Byte Count</name> 
                        <direction>output</direction> 
                        <query_name>encryptbytes</query_name> 
                </swEncryptBytes> 
        </fields> 
</interface> 

It works w/o issue on my cacti version 0.8.6i.... Thanks again wazoqaz.
User avatar
icetoad
Cacti User
Posts: 65
Joined: Wed Oct 18, 2006 6:20 pm
Location: Orlando
Contact:

Post by icetoad »

Thanks for sending that! I still have a problem though.. and i think it might be with my configuration. When i paste that in and hit the save button, nothing happens but a page refresh. it doesnt give me an overview of what it imported. I checked my php configuration and the file upload option is on and i have it set a 80 megs. The cacti user has permissions from the main cacti folder down via the chown -R command.

Is there something i am missing?
User avatar
icetoad
Cacti User
Posts: 65
Joined: Wed Oct 18, 2006 6:20 pm
Location: Orlando
Contact:

Post by icetoad »

I created a file off the code you posted and ftped it directly to the directory. Its working now without an issue, but i am still worried about the import issue as it might affect other templates.
User avatar
icetoad
Cacti User
Posts: 65
Joined: Wed Oct 18, 2006 6:20 pm
Location: Orlando
Contact:

Post by icetoad »

ok, when i said it was working.. i should of said it found the script i manually added, however the device status shows as down and i gather because of that i have no graphs :(

-Sad Panda
Last edited by icetoad on Mon Oct 23, 2006 9:09 am, edited 2 times in total.
User avatar
icetoad
Cacti User
Posts: 65
Joined: Wed Oct 18, 2006 6:20 pm
Location: Orlando
Contact:

Post by icetoad »

ok its graphing now, i had to change the check host function to snmp only.. not sure why as i can ping the sonicwall from any computer/server/router.

Course the cpu graph isnt showing me anything.. but i am going to sit on that for a minute or two.. might not be anything to show yet as i just got it going.

----

Just an update, everything is working.
tlister
Posts: 6
Joined: Thu Oct 26, 2006 11:30 am

Niceness

Post by tlister »

Hey Wazoqaz that is an awesome template! Thanks!

One issue I am having though is with the VPN Query, while attempted to create a new graph I am prompted with the message:

Data Query [Script - Sonicwall VPN]

Error in data query.

And am unable to create graphs for VPN related information.

Also if I go to "Data Queries> Script - Sonicwall VPN" I get the message: "Successfully located XML file"

If I SSH to the box and do an "ls -l" here is the output for that file:

-rwxr-xr-x 1 apache root 4850 Sep 25 15:49 sonicwall_vpn.xml


Any suggestions?

Thanks,
wazoqaz
Posts: 15
Joined: Wed May 24, 2006 9:40 am
Location: md, us
Contact:

Post by wazoqaz »

tlister,

I really don't have any idea. I built this in 0.8.6h so if you are running the new version 0.8.6i that might be an issue. I have yet to upgrade, but when I do I'll see if this makes a difference.

In response to your file size. Here are mine:

Code: Select all

-rw-r--r--    1 root     root         1165 Sep 18 16:45 ./resource/snmp_queries/sonicwall_vpn.xml

-rw-r--r--    1 root     root         1240 Sep 20 15:36 ./resource/script_queries/sonicwall_vpn.xml
Note there are two different XML files. I'll see what I can do to figure this out, but I wouldn't hold my breath if I were you.
tlister
Posts: 6
Joined: Thu Oct 26, 2006 11:30 am

Post by tlister »

haha no worries,

thanks XD
bigcitymike
Posts: 14
Joined: Mon Oct 30, 2006 12:55 pm

Post by bigcitymike »

Hello noob here..

I have a sonicwall 4060 with SonicOS Enhanced firmware. I just starting out with Cacti and the localhost is reporting values corectly. I wish to collect data on the sonicwall so I tried the template. I d/l the xml and txt file. I see where to create a new host and I uploaded the xml file w/o issue.

See following PIC

It show snmp error.

I only uploaded the xml. I'm not sure where the .txt (script??) is supposed to go. It looks like it may need to be renamed to query_sonicwall_vpn.pl???? But i'm not sure where to place that?

Thanks in advance for any help,

Michael
User avatar
icetoad
Cacti User
Posts: 65
Joined: Wed Oct 18, 2006 6:20 pm
Location: Orlando
Contact:

Post by icetoad »

The sonicwall xml file: sonicwall_vpn.xml, should go into the /cacti/resource/script_queries folder. ( this should be created automatically when you import the original xml template, if it doesnt then you have to create the file manually from the code posted above and save it there ).

The script file: query_sonicwall_vpn.pl should go into the /cacti/scripts folder.
Quote from Bash.org: "I was once thrown out of barnes and noble for moving the bibles to the fiction section."
bigcitymike
Posts: 14
Joined: Mon Oct 30, 2006 12:55 pm

Post by bigcitymike »

icetoad wrote:The sonicwall xml file: sonicwall_vpn.xml, should go into the /cacti/resource/script_queries folder. ( this should be created automatically when you import the original xml template, if it doesnt then you have to create the file manually from the code posted above and save it there ).

The script file: query_sonicwall_vpn.pl should go into the /cacti/scripts folder.
Thank you. I think I have a polling issue with the sonicwall. I tried getif and it failed to connect.
User avatar
icetoad
Cacti User
Posts: 65
Joined: Wed Oct 18, 2006 6:20 pm
Location: Orlando
Contact:

Post by icetoad »

You have to enable snmp on the sonicwall and then on the interface you want to connect to on the sonicwall in the sonicwall web configuration page.

If thats all running and the host is still "down", you have to change the way cacti verifies the sonicwall is alive in the cacti settings.
Quote from Bash.org: "I was once thrown out of barnes and noble for moving the bibles to the fiction section."
bigcitymike
Posts: 14
Joined: Mon Oct 30, 2006 12:55 pm

Post by bigcitymike »

Ok well i fix the snmp issue with sonicwall, and it's talking to cacti.

Problem is when I try to draw a graph i get:

Data Query [Script - Sonicwall VPN] Reload Associated Query


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.

So i do, and:

+ Running data query [11].
+ 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.77.1 public index'
+ Executing script query 'perl c:\Inetpub\wwwroot\cacti\scripts\query_sonicwall_vpn.pl 192.168.77.1 public query peergateway'
+ Executing script query 'perl c:\Inetpub\wwwroot\cacti\scripts\query_sonicwall_vpn.pl 192.168.77.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'

is the result.

It seems to studder on the last line
bigcitymike
Posts: 14
Joined: Mon Oct 30, 2006 12:55 pm

Post by bigcitymike »

icetoad wrote:You have to enable snmp on the sonicwall and then on the interface you want to connect to on the sonicwall in the sonicwall web configuration page.

If thats all running and the host is still "down", you have to change the way cacti verifies the sonicwall is alive in the cacti settings.
I had to enable SNMP traffic on the lan side...

Still having issues with the graph drawing..
User avatar
icetoad
Cacti User
Posts: 65
Joined: Wed Oct 18, 2006 6:20 pm
Location: Orlando
Contact:

Post by icetoad »

Do you have the newest version of the sonicwall enhanced OS installed?
Quote from Bash.org: "I was once thrown out of barnes and noble for moving the bibles to the fiction section."
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests