Title: Programming interface to What's Up
Do you have any aversion to Microsoft .Net?  I have something along these lines working (kind of), although it is also kind of a hack.  I have the .Net framework, and IIS installed on the WUG machine, and have created a .Net Web Service with methods that return various types of information.  The way that it works is that I create custom WUG asp pages, one for each web method, each returning a specific set of data that I am trying to get at.  For instance, I have a method that pulls the current status of the server: (Total down devices, total up devices, total devices monitored)  It calls the custom WUG web page, grabs the result, parses it, and returns it. On it's way out it drops the results into system cache, specifying that it will be cached for 45 seconds.  I also specify a file system hook dependency and point it at the current weeks event log. In this case the first user runs the method, and gets the status details back, if another runs the method within 45 seconds and nothing has touched the current WUG event log, they get the cached version.  This way, you always get fresh information, but the impatient user who sits and hits refresh 50 times in a row does not kill your WUG's built in web service, instead - as long as nothing has changed, they get the cached version, and it seems to run really fast. And even if something does change, the call to WUG's web service is local to the .Net web service so it runs very fast, and then IIS's much better web server can take over.  Of course you could do away with the caching altogether and there are still great benefits with this model.  The really cool thing about this hack is that with a .Net web service, I can return whatever I want, including an entire data set (multiple recordsets, including links between them) and consume the web service from any client in any internet capable language. 
 
So I am also working on a system tray app (vb.net), which will allow our net admins to click once to pull a list of down devices, status information and device details. (like for routers we are storing the Circuit ID's and trouble ticket contact info in the notes for the device).  The web methods for that app will also be doing checks against SQL tables and returning rich hierarchical recordsets as a dataset, for display in a hierarchical datagrid.  I am even considering adding IIS and .Net to our helpdesk server and creating a service to allow them to log trouble tickets to that system right from the systray app. 
 
This is really cool stuff.  It would have been nice if it would have been possible to reach right into WUG and get what I wanted with API, but doing it through the web service/custom asp pages works well enough. Maybe they will give us that in a future version.  Or direct integration with .Net?  :-)
 
I do not have anything that is "packagable" to give to the list yet, but if anyone wants, I will post code snippets and help in any way that I can. What I have done so far is kind of tailored for our specific needs. Once I have the bugs ironed out, I do plan on releasing some kind of a generic web service, and a consumer so that people can take it and modify to suit their needs. 
 
Note :You have to be willing to Install the .Net CLR (Common Runtime Language) on any machine where you want to run .Net code. And to do web services you would need IIS.
 
Hope this helps, or at least sparks your imagination...
 
Jim Scheitel
Knife River Corporation
-----Original Message-----
From: Richard Newton Jr. [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 13, 2002 2:38 PM
To: '[EMAIL PROTECTED]'
Subject: [WhatsUp Forum] Programming interface to What's Up

Has anyone attempted to connect to What's Up from VB/C/C++?  What I would like to do is write an application that will ask What's Up if a host is down.  This application could be run on demand to determine if a given device or service was down.  Additionally, it would be interesting to get a list of down devices.

I would like to put this data into another application that tests dependencies.

As an example, we have an application that runs at 2AM.  It depends on our Oracle server being up.  What I want to do is run an application at 1:55 AM and have it ask What's Up if the Orcale server is up.  If it is up, I want it to run the application at 2AM.  If not, do something else (to be determined.

Has anyone done this time of work?  I see that What's Up has an ODBC interface, but I am not sure how to use it.

Thanks.

Richard Newton Jr.
Enterprise Network Engineer

Reply via email to