Guys I’m trying to flesh out whether there is a way to extract the current connection table via SOAP and or some other method.
Ideally I would like to do this remotely by issuing a command to fetch the current connections but redirect the output to a file.
Any ideas?
Solved! Go to Solution.
Hi Mathew,
Ahhh a new problem... A step closer though :-)
A 401 indicates that the STM is rejecting your credentials. You should verify that the username/password you are providing in the $admin_server scalar are correct, and that the user has permission to use the SOAP API. The format of the $admin_server should be "https://user[email protected]:9090"
I would try to access the API using the "admin" user and if that works, then check that the user you want to use has the correct group permisions under System -> Users -> Permission Groups in the UI.
Cheers,
Mark
Check your browser web console, you will see it retrieves the page and a data file.
It's not SOAP, you will need a cookie but you will get the data.
Edwin
Doh.
I thought this was about the Steelhead appliance.
Edwin
Hi Matt - this article - Tech Tip: Using Perl/SOAP to list recent connections in Stingray Traffic Manager - describes how to use SOAP to retrieve the current and recent connections table from a traffic manager
Best regards
Owen
Owen I'm having trouble getting the script working, I'm recieving the following error. Any ideas?
500 Can't connect to myhost:9090 (certificate verify failed) at C:\Users\XXXXXXX\Desktop\Work Folders\Scripts\Perl\My Scripts\Stingray\getConnectionSummary.pl line 28
Hi Mathew,
Perl and LWP can be picky about self-signed SSL certificates, and I think that might be the root of your problem.
Could you try either or both of:
#1: set an environment variable at the top of your script:
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME}=0;
#2: set an SSL option after you create your $conn SOAP::Lite object:
$conn->proxy->ssl_opts( SSL_verify_mode => 0 );
These two steps are illustrated by this article: Tech Tip: Reading Stingray's internal diagnosis report using Perl and SOAP and I have found that one or other of them address most SSL certificate problems (it seemed to depend on the precise version of LWP)
regards
Owen
Thanks for the follow up Owen.
I updated the script as per your recommendation but am still receiving the same error.
401 Unauthorised at C:\Users\auser\Desktop\Scripts\Stingray\getConnectionSummary.pl line 32.
Also placed $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME}=0; at the top of the script as advised
Hi Mathew,
Ahhh a new problem... A step closer though :-)
A 401 indicates that the STM is rejecting your credentials. You should verify that the username/password you are providing in the $admin_server scalar are correct, and that the user has permission to use the SOAP API. The format of the $admin_server should be "https://user[email protected]:9090"
I would try to access the API using the "admin" user and if that works, then check that the user you want to use has the correct group permisions under System -> Users -> Permission Groups in the UI.
Cheers,
Mark
Thanks for the input Mark, and you were right I had the wrong user set.
That said......................... now I'm getting this
Can't locate object method "struct" via package "System" (perhaps you forgot to load "System"?) at
C:\Users\auser\Desktop\\Stingray\getConnectionSummary.pl line 50.
*BUMP*
Thanks for the input Mark, and you were right I had the wrong user set.
That said......................... now I'm getting this
Can't locate object method "struct" via package "System" (perhaps you forgot to load "System"?) at
C:\Users\auser\Desktop\\Stingray\getConnectionSummary.pl line 50.