visio diagram to automatically ping and display device as red or green.

Started by howithink, July 28, 2010, 05:00:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

howithink

OK this might be a big difficult to explain but here it goes:

I have created Visio server room layout diagram. In which i have all the cabinets listed and each server/device represented. I can click on each device to rdp into it and also get my general information like serial, location, os and so on.

What i want to know is, is it possible for me to create an object (green dot, or red dot) next to each object which is actually actively pinging that device in the background so initially when i look at my server room layout, i can know right away if a device is down or not?

thank you



Visio Guy

If you have Visio 2007 Pro, or Visio 2010 Pro or Premium, then data graphics will help you a lot with this.

It helps to store some of that data (Prop.Status = down/up) so that the data graphics can read this and show green or red.

Al might have some info on this already. Check out his YouTube Channel  too!

Also of interest, Al's Visio Guy articles.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

aledlund

The desire to have current state of a network device is very common. The problem becomes one of how timely of a 'heartbeat' do you want to keep. All of it add's traffic to a network and some of it can actually cause problems, thus the equally strong desire from the network security teams to monitor that type of traffic. Almost all of the MS demo's that I have seen use the SystemCenter product as the query engine (because it is well behaved). In the example code that I put out there (both vb.net and vba) has a 'network friendly' delay component to reduce the chance of flooding the network. The example code that I released uses an ICMP echo (ping) to test for availablity, I've had to use a telnet session request for some networks. In both cases the response is saved to a database of some sort and then the drawing update queries the database (just like the MS demos). In most SMB accounts a user triggered query is adequate, they don't need full time/ real time data. In a large shops the effective organizations use a hierarchial alarm that 'perks up' to show net status (I think David Edson did that in one of his demo's) at a summarization level.
hth,
al

howithink

@ Visio Guy: i tried your suggestion (by the way i am using visio 2007) and i created a custom field called Status in the shapesheet and used the code, but i don't see anything happening.

@ aledlund: i dont want our network to be fludded. Obviously i want something that doesn't get updated all the times. This visio diagram will be access maybe once or twice a day (Right now i have it saved as html and on our sharepoint). Every time it is accessed via the web, i want it to update and color code the device.  Is it possible? and how difficult will it be?

thanks

aledlund

Your desired solution has a web component,

So start with a simple ping command that the results can update an access record

Randy Birch has some phenomenal code over here that can be modified for network queries

http://vbnet.mvps.org/

I have examples in both vba and vb.net for doing the basic pinging as well,

and the vbscript guys have lot's of example code for reaching out to touch data source/sink

http://technet.microsoft.com/en-us/scriptcenter/default.aspx

The visio sdk has examples on automating linking datarecordsets to shapes

my friend David Parker posted this to update the drawing from a datarecordset and post as web  page

http://bvisual.spaces.live.com/blog/cns!3350D61BC93733A9!2170.entry

hth,
al


aledlund

This is probably a better list of overview videos

http://www.youtube.com/view_play_list?p=BAFAAC68D36484CA

Four of these videos cover vb.net projects that have been released here: ism, wan, app connectivity, attribute drilldown. I'm working on updating the attribute drilldown and app connectivity (better use of lists) in preparation for a more complete drawing package.

al

agould

i've been doing visio network diagram for years.  i don't know much of anything about the vb stuff ya'll talk about.  i would like to have an object in visio diagram change to green or red based on ping response or lack thereof.

can someone just do a one object (little square is fine) diagram and have it ping 192.168.1.1.....and based on that have the square be red or green?  that would be great, then i would have an example diagram that i could refer to as to how you accomplished this.

have it ping every 30 seconds please.  32 bytes of data is the typical ping size.

please put it somewhere here that i could download it or just email it to aaron01@juno.com

if that isn't possible, perhaps someone could just explain to me how to do it.

thanks
aaron

Nikolay

Here is a simple "red-green" Visio drawing (plus some VBA code)

It has three boxes with IP-addresses (see picture)
You can add more boxes or change the IPs, i.e. the text in the boxes; keep in mind, only 4-digit IP addresses are supported (no name resolution).

VBA code "in background" colors each box red, if PING to it's IP fails or green if it succeeds.
The refresh timer is set for 30 seconds.

Seems to work  ;)

N.B. I don't think that VBA is a good idea for this kind of "diagrams".

agould

thanks nikolay.  it seems to ping and do the green and red thing, but it ran very sluggish and i would need to do this with a diagram of about 300 boxes!!

is there a better way to accomplish this?

aaron

Nikolay

My drawing was designed just to demonstrate that it is possible to do that with VBA.
I think that to make the solution responsive you may consider moving "ping activities" to a real "background" process (background thread) instead of the timer (used in this solution).
Unfortunately, you can't really do that with VBA (real background threads/processes are basically not supported in VBA)

The options I can see are:
- Create a separate application for this (using Visio as control).
- Create an addin for Visio that implements that refresh.
- Create some server app that pings and provides states as a data table then link Visio diagram to that table.
- The same thing as previous, plus Visio Services - and you may have a neat web-based solution.


aledlund

Just as an fyi, if you're doing that many devices for status you should really be using something that can work synchronously. For a different project I had to work on one with several thousand devices and eventually went with a third-part control (www.dart.com) using vb.net. The load on the system eventually required a separate system to do the status capture since besides the network load the status has to be stored and then passed to the drawing code. In the end it's less expensive to go with an appropriate commercial product, unless you have a good budget for hours (weeks) spent and some very unique requirements.
al

BullDog

Gotta silly question.  But for a server farm sort of set up with hundreds of pieces of equipment and expensive labor monitoring it, wouldn't it be more productive to just deploy an instance of a SiteScan type of product?  Thanks.

aledlund

For some clients, people (and their time) can be perceived as being less expensive than tools.Some shops just don't want to spend the money, so you start looking for an alternative tool suite.
For all of these discussions you have to start with a "build, buy, or lease" set of issues included. This of course includes the "buy single vendor, or do the system integration yourself", "is it a one time project, or are we performing ongoing process development", and a lot of other decisions.
Al

BullDog

Thanks Al, I think so too.  As long as folks remember the cost / benefit of the various options along with the time to deploy needs to be evaluated on a case by case basis.  My concern is that certain non-technical folks (managers) think they can wave a magic wand and have large scale exercises miraculaously developed and deployed on a fast track in the absence of appropriate resources.  Seen it time and time again...  the learning curve can be expensive in many many ways.  I've seen first hand how the do-it-yourself method can takes months / years on the leanring curve, vs just getting it done on a fast track by deploying the right tools and know how (and occasional third party resources).

I found this site / thread as I'm trying to use Visio to convert AutoCAD dwg files to something I can then modify and use in a Java development environment for web based building automation systems (ie I need to end up with a basic yet also decent quality png file when I'm done).  This site has been very helpful in that regard.