How to grab data from external website and/or database

To the Ipswitch web site

Ipswitch Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



How to grab data from external website and/or databaseExpand / Collapse
Author
Message
Posted 6/22/2009 12:02:56 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 6/23/2009 12:38:10 PM
Posts: 3, Visits: 11
We have a home grown database which we track inventory data such as asset tag info, cabinent, site, make, model, and purpose.

Is there a way to pull this data using a server side scripting language? Or is there way to include a webpage into a WUG report?

Post #54168
Posted 6/22/2009 1:00:57 PM


Member of the WhatsUp Gold team

Member of the WhatsUp Gold teamMember of the WhatsUp Gold teamMember of the WhatsUp Gold teamMember of the WhatsUp Gold teamMember of the WhatsUp Gold teamMember of the WhatsUp Gold teamMember of the WhatsUp Gold teamMember of the WhatsUp Gold team

Group: Administrators
Last Login: 8/3/2009 11:21:39 AM
Posts: 519, Visits: 1,116
We've had some customers write Active Script Actions to pull data from an external DB and save it to a device as a device attribute. They schedule it to run via recurring actions, so the WUG info gets updated from the DB periodically.

As for including other content in a WUG workspace view: you can definitely do this. The simplest way is to include the content in an iframe, but you could also write a javascript to query the datasource and output the information via ajax.


__________________________________________________
Will Sansbury
Member of the WhatsUp Gold team
Twitter: @willsansbury


NOTE: These WhatsUp Gold forums are closing! We've launched a new and improved user community that includes forums, a place to share and vote on feature requests, and a place to share and download custom scripts. Check it out at http://community.whatsupgold.com!
Post #54173
Posted 6/22/2009 3:28:57 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 6/23/2009 12:38:10 PM
Posts: 3, Visits: 11
Thanks that so much help... However... I need to supply a name or ip or something to identify the server in the external database. Is there a variable that I can use to grab that based on the device I am currently looking at?

What sort of sytax or langauge would I use?

Post #54183
Posted 6/23/2009 8:44:28 AM


Member of the WhatsUp Gold team

Member of the WhatsUp Gold teamMember of the WhatsUp Gold teamMember of the WhatsUp Gold teamMember of the WhatsUp Gold teamMember of the WhatsUp Gold teamMember of the WhatsUp Gold teamMember of the WhatsUp Gold teamMember of the WhatsUp Gold team

Group: Administrators
Last Login: 8/3/2009 11:21:39 AM
Posts: 519, Visits: 1,116
If you're in an active script, you can use a percent variable. %Device.Address or %Device.HostName should give you what you want.

http://docs.ipswitch.com/NM/90_WhatsUp%20Gold%20v12.4/03_Help/percent_variables.htm


__________________________________________________
Will Sansbury
Member of the WhatsUp Gold team
Twitter: @willsansbury


NOTE: These WhatsUp Gold forums are closing! We've launched a new and improved user community that includes forums, a place to share and vote on feature requests, and a place to share and download custom scripts. Check it out at http://community.whatsupgold.com!
Post #54202
Posted 6/23/2009 9:08:03 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 6/23/2009 12:38:10 PM
Posts: 3, Visits: 11
Thanks so much for your help however the site that I am using utilizes PHP rather than ASP.

In the free form HTML mini report, is there anyway to reference the current server's name or some identifying attribute? I have setup an IFRAME as follows

<iframe src='http://intranet/server_data.php?server_name=<I_NEED_SERVER_NAME_HERE>'></IFRAME>

how can i get the server name into the free form HTML section? is that even possible?

Post #54204
Posted 6/24/2009 3:57:31 PM


Member of the WhatsUp Gold team

Member of the WhatsUp Gold teamMember of the WhatsUp Gold teamMember of the WhatsUp Gold teamMember of the WhatsUp Gold teamMember of the WhatsUp Gold teamMember of the WhatsUp Gold teamMember of the WhatsUp Gold teamMember of the WhatsUp Gold team

Group: Administrators
Last Login: 8/3/2009 11:21:39 AM
Posts: 519, Visits: 1,116
Unfortunately, there's no direct way to do it. The parsing of all identifying information is handled server-side (in the ASP) and isn't available to the javascript.

You could potentially parse the information from where it's displayed elsewhere on the page, but this would be a fairly unorthodox approach and can't be guaranteed or supported.


__________________________________________________
Will Sansbury
Member of the WhatsUp Gold team
Twitter: @willsansbury


NOTE: These WhatsUp Gold forums are closing! We've launched a new and improved user community that includes forums, a place to share and vote on feature requests, and a place to share and download custom scripts. Check it out at http://community.whatsupgold.com!
Post #54258
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Dave, Mark Singh, kevin r gillis, Jason Benton, Christian Lawson, Brandon Felger, Tripp Allen, Will Sansbury, Jason Williams, Hush, FTPplanet.com, Hugh Garber, WUP-PM, mmulryan@ipswitch.com, mswimm

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 6:35am

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0.031. 6 queries. Compression Enabled.