Network Health status? RRS feed

  • Question

  • I'm working on a plug-in and I would like to be able to detect the network health status.


    There does not seem to be a property to get this information.


    Any ideas?




    Friday, April 6, 2007 11:55 PM

All replies

  • Rob,

    Haven't tried it yet, but it seems like registering for events using WHSInfoIF.INotificationCallback will do what you need.

    Saturday, April 7, 2007 2:23 AM
  • You get messages like "backup warning" or "backup service is started", but no message for the health status.


    For example, my Network Health is "At Risk" because one of my PCs hasn't had a backup in the last 2 days.



    Saturday, April 7, 2007 3:29 AM
  • Rob,


    I couldn't find it either.  I would have expected it to be a property of IWHSInfo. 


    My second thought was that you would have to build your own status by enumerating computers, disks, etc.  But IComputerInfo doesn't have the current status of a client computer.



    Saturday, April 7, 2007 4:20 AM
  • When I register for WHSInfoIF.INotificationCallback I get a WHS_Notification_Severity enum passed in NotificationChanged().  The Severity relates to the tray icon color.

    I do notice that the events are not always fired consistently - for example if I enable/disable a PCs firewall I only see sporadic events for this. (Which is probably why my trey icon is out of sync a lot).  I agree, an overall status property would be much easier here.  HTHs.


    An enumeration of type WHS_Notification_Severity. Depending upon the severity, some notifications appear in the Home Network Health dialog on the Windows Home Server and are furthered identified by color:

    • Red - for notifications with a WHS_Notification_Severity type of WHS_ERROR.
    • Yellow - for notifications with a WHS_Notification_Severity type of WHS_WARNING.

    Saturday, April 7, 2007 5:27 AM
  • Ed,

    Do you get a notification when you app. starts up?

    Saturday, April 7, 2007 5:46 AM
  • When my app starts, I get all of the notification messages.


    I'm currently using a collection and I add/remove items based on the message Type received. It seems buggy to me. I think the Backup service isn't removing messages.


    When my app starts, I am recieving 4 messages:

    1 = Backup service is idle.

    2 = <PC>: Last backup succeeded.

    3 = <PC>: Last backup succeeded.

    4 = Backup service is started.


    If I turn off the firewall on this PC, I receive a message that the firewall is off. When I turn it back on, the message is removed.




    Saturday, April 7, 2007 1:41 PM
  •  MurMan99 wrote:


    Do you get a notification when you app. starts up?

    Yes, I see several WHS_INFO messages (Backup service Idle, BU Service Started, [PC NAME] - Last Backup Successful, etc..) and also get WHS_ERROR and WHS_WARNING messages for any existing conditions (Backups missed, Firewall off, etc..)

    Rob - best I can tell WHS_INFO messages are only added, not removed. But ERROR and WARNING seem to consistently be removed when the condition is corrected.

    I love learning nuances of new APIs :-)

    Saturday, April 7, 2007 4:35 PM
  • To get the health status, I ended up looping through my notifications collection and counted the number of ERRORs and WARNINGs. If there were any errors, then I set the state to Critical; if there were any Warnings, I set it to At Risk. That seems to work, since it matches what displays in the Console.



    Wednesday, April 18, 2007 2:51 PM
  • good info Rob, thanks.
    Wednesday, April 25, 2007 3:06 AM
  • this is correct - our idea is to bubble up error messages that are most severe


    if any errors go red

    if no errors but warnings go yellow

    if no errors and no warnings go green


    make sense / is that useful for doing what you need?



    Wednesday, May 2, 2007 12:37 AM