Also had this:+ Running data query [14].
+ Found type = '4 '[script query].
+ Found data query XML file at 'C:/inetpub/cacti/resource/script_queries/sonicwall_vpn.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl C:\inetpub\cacti\scripts\query_sonicwall_vpn.pl xxxxxxxx public index'
+ Executing script query 'perl C:\inetpub\cacti\scripts\query_sonicwall_vpn.pl xxxxxxxx public query peergateway'
+ Executing script query 'perl C:\inetpub\cacti\scripts\query_sonicwall_vpn.pl xxxxxxxx public query vpnname'
+ Found data query XML file at 'C:/inetpub/cacti/resource/script_queries/sonicwall_vpn.xml'
+ Found data query XML file at 'C:/inetpub/cacti/resource/script_queries/sonicwall_vpn.xml'
+ Found data query XML file at 'C:/inetpub/cacti/resource/script_queries/sonicwall_vpn.xml'
Here's how I solved mine. I'm a cacti noob so don't expect me to be able to solve yours....I'm just showing you how I did mine.When I execute "perl c:/inetpub/cacti/scripts/query_sonicwall_vpn.pl 10.1.118.170 public index", Cacti gives this error:
Code:
Can't locate Net/SNMP.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .)
at /inetpub/cacti/scripts/query_sonicwall_vpn.pl line 20.
BEGIN failed--compilation aborted at /inetpub/cacti/scripts/query_sonicwall_vpn.
pl line 20.
I imagine if you're getting this, you're like me and running it on a Windows server. At first, I was missing Perl. At this point, I didn't even get the "Can't locate Net/SNMP.pm" part in the above error. So I installed Perl from www.activestate.com.
I ran it and then received the above error.
After using the Perl Package Manager that comes with ActiveState Perl, I installed the Net-SNMP and Crypt-DES packages (it's a dependency thing).
After that, manually running the perl command from command line gave results where there were none before.
Now, you need to fix your Windows Apache server to run pl scripts with the newly installed Perl. I just followed the directions listed http://www.thesitewizard.com/archive/ad ... ache.shtml.
Specifically, these are the changes I made.
There....that's how I did it. Maybe you can apply the same logic to your setup. If you're using Linux, look for that Net SNMP Perl module.1. Running Perl Scripts in a CGI directory
You can configure Apache to treat any file in a particular directory as a CGI script. Typically, web hosts call such a directory the cgi-bin directory.
To configure Apache to treat a particular directory as your script directory, search for the following line in your "httpd.conf" file.
For those who have forgotten where the "httpd.conf" file can be found, try looking for it in the "conf" directory of your Apache folder. If you used the default directories supplied by the Apache installer, it would be "c:\Program Files\Apache Group\Apache\conf\httpd.conf".
ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache/cgi-bin/"
If it has been commented out, that is, if there is a hash mark ("#") before the line, remove the hash character to enable it. If it has not been commented out, it means that your Apache is already configured to run CGI scripts in that directory. You can change the directory to another directory if you wish.
2. Running CGI scripts anywhere in your domain
If you don't want to be restricted to running CGI scripts within the ScriptAlias directory in your domain, and want CGI scripts to run anywhere in your domain, add the following line to your "httpd.conf" file.
AddHandler cgi-script .cgi
You can add it yourself manually, but since the default httpd.conf file that is supplied by Apache already comes with that line commented out, the simplest thing would be to search for that string in your existing file, and remove the preceding comment character, that is, remove the "#".
If you want the .pl extension recognised as a CGI script as well, simply append the extension to the list, as follows:
AddHandler cgi-script .cgi .pl
Next, search for the line that says "<Directory /> in the file. It should look something like this:
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
Add "+ExecCGI" to the options list. The line now looks like this:
Options FollowSymLinks +ExecCGI
3. Making a CGI Script Your Default Page <didn't do this>
If you want to make your CGI script execute as the default page for a directory, you have to add another line to the Apache configuration file (httpd.conf). Simply search for the line in the file that begins with a "DirectoryIndex" and add "index.cgi" to the list of files on that line. For example, if the line used to be:
DirectoryIndex index.html
change it to
DirectoryIndex index.cgi index.html
The next time you access "http://localhost/" or "http://localhost/directory/" without any filename specified, Apache will run "index.cgi" if available or deliver "index.html" if it cannot find "index.cgi". If you have both "index.cgi" and "index.html" in the directory, "index.cgi" is used since it's listed first.
You are not limited to the above two files. For example, I have set up Apache on my computer with the following line:
DirectoryIndex index.php index.cgi index.shtml index.html
If you have also installed PHP support and enabled server side includes in Apache, the directive will instruct Apache to look first for an index.php file, or failing that an index.cgi file, or if that could not be found, an index.shtml file, and finally an index.html file if all else fails.
That's it. Your Apache server now supports the execution of CGI scripts. You will have to restart the server before the new configuration comes into effect. The work's not ended however - read on.
Modifying Your CGI Script
As it stands, if your CGI script is a Windows executable, it would be executed by Apache correctly. However, if it's a script that relies on an interpreter such as Perl or Python, you will have to modify the first line of the script.
Your Perl script will typically contain an initial line of
#!/usr/bin/perl
or some such thing. This tells a Unix-based kernel to look for an interpreter at the path "/usr/bin/perl" and invoke it to interpret the instructions in the file.
Since the script now runs on Windows, and it is unlikely that you installed your Perl interpreter in a /usr/bin directory, you will need to change that first line to point to the real location of your Perl interpreter.
For example, on my Windows box, I have to change the first line of my Perl scripts to:
#!c:/perl/bin/perl.exe
Good luck.