Flings
Apps and tools built by our engineers that are intended to be played with and explored.

Horizon View Event Notifier

Horizon View Event Notifier

Summary

This tool connects to one or more existing Horizon View Event Database(s) and allows the user to customize which types of alerts to be notified on. It can be run from any Windows based system and it collects and sends the alerts via email (SMTP) to users that are specified during the configuration process. It allows aggregation of alerts across multiple Horizon View Pods and for near real-time alerting of Horizon View alerts that are otherwise very difficult to be notified on.

Features

Pro-active alerting on Horizon View events via SMTP directly from the one or more Horizon View Event database(s).

View_Events_Final_Fixed

System Requirements

A Windows-based system with Microsoft .NET 3.5, a Horizon View 5.0 or later infrastructure with a pre-configured Horizon View Event DB, an SMTP server that allows message relay, and a SQL Login to the Horizon View Events DB with at least DataReader Permission. Read-Write access to the "Horizon_View_Event_Notifier.exe.config" file is also required.

Instructions

  1. Copy the "Horizon_View_Event_Notifier.exe" and "Horizon_View_Event_Notifier.exe.config" files to the same directory on the local system. The user must be able to write to the "Horizon_View_Event_Notifier.exe.config" file.
  2. Launch the Horizon_View_Event_Notifier.exe file and go to the "Settings" tab.
  3. In the "SQL Server Settings" section, fill in information on one or more Horizon View Events Databases and click "Add SQL Server". If the "Test DB connection on update?" option is selected the DB connection will be tested automatically. Otherwise, manually test the connection by clicking the "Test Connection" button. Repeat for additional View Event Databases.
  4. In the "Horizon View Events" section, select which severity types you would like to be alerted on and how far back the application should poll each time it queries for events. Click "Save Changes" to save these settings to the configuration file.
  5. In the "SMTP Server Settings" section enter the name or IP or an SMTP server that allows relay, along with the port it uses. Enter an email address that you would like to receive the alerts from and one or more email addresses for the alert recipients, separated with a comma. Click the "Send Test Email" button to verify the SMTP server settings.
  6. If desired the interval at which the application polls the SQL server can be modified from the default of 60 seconds.
  7. Click back on the "Horizon View Events" tab and click the "Start" button at the bottom of the form--this will start the application.
  8. The application can be minimized to the system tray where it will continue to run. The icon in the system tray can be double-clicked or right clicked to restore the form.
  9. The application can be stopped by clicking the "Stop" button when the application is running.

Video

Change Log

Engineers

Chris Halstead

Senior Systems Engineer in the End User Computing group.
Add Feedback

40 thoughts on “Horizon View Event Notifier

  1. Dan

    Still no update on this as a service? Looking through the comments it looked like a new version was going to be released at the beginning of the year, but still no sign of it.

    Update??

    Reply
    1. Chris Halstead

      Hi Dan – This utility is something I work on in my free time, and I have been super busy the last several months. I have started development again and am splitting the GUI and the logic that does the query and notification work.

      I am working on it and I will have a new release as soon as I can.

      Thanks,

      Chris

      Reply
  2. Kevin Ty

    Great tool to help monitor our View environment!

    One question: Is there a way to get more granular with the events that are reported? We’d like to receive only certain error alerts as opposed to others. For example, low available disk space vs. provisioning errors.

    Thanks!

    Reply
  3. Ken R

    Chomping at the bit for View 6 support, Alert Filtering & Run as service! This is a very needed utility. I appreciate your work thus far!

    Reply
    1. Chris Halstead

      Ken – The app should work just fine in View 6.x. What issues are you getting with 6?

      I will have this re-written as a service and I will incorporate detailed filtering soon. I have most of the logic complete.

      Thanks for your feedback!

      Reply
    1. Chris Halstead

      Brian – Are you seeing issues with View 6.x? The app will be rewritten to function as a service soon. I have most of the code complete.

      Thanks!

      Reply
  4. Rick Welch

    I have been using your fantastic tool to monitor events in our environment for a while and have loved it. We have now moved to View 6.0 and I am now receiving the following error: Table Prefix is not Valid – please check and try again. We are not using a Table Prefix. Any ideas?

    Reply
  5. Brian

    Any update on when this will be made into a service or a command line? Otherwise you have to have a machine set to auto login and launch this. Thanks

    Reply
    1. Chris Halstead

      I am working on this now Brian. It is fairly complicated as a service cannot have a gui aspect so I need to separate the code into the service and then a gui for updating the configuration data.

      I hope to have it done in the next few weeks.

      Thanks,

      Chris

      Reply
  6. Ryan Antonacci

    Very useful indeed! Would love to see it expanded to alert for something like no more available desktops in a pool left, or something close to that. Even without that, great work!

    Reply
  7. Neal

    Is there anyway to get notified when this app gets updated? I would like to start using it when it is available as a service

    Reply
  8. imriot

    i have problem with this program, when i configure this to use my View Event DB, i receive error: Error: Incorrect syntax near the keyword ‘view’. All tests(db, smtp) successful. Do yo can help me to resolve this issue?

    Reply
    1. Jason

      Can you share a screenshot of the settings tab? I had an issue in setup where I needed to put my DB name in quotes, but I can’t tell from your screenshot if that is the same issue you’re having.

      Reply
  9. Chris Halstead

    Jason – absolutely. I think this is a great idea. I am adding the ability to aggregate alerts at custom interval (10 min, 12 hours, daily, etc). Look for this in a future release.

    Thanks again.

    Chris

    Reply
  10. Simon

    When is it possible to start the program as a Service? Is it possible to start the poll automatic when open the program?

    Reply
    1. Chris Halstead

      I am planning to add functionality to allow this app to run as a service, but that is going to be quite a bit of re-write and won’t be in the next release. In the next release I am planning to add a /silent switch to allow you to automatically start the app through scheduled task or startup scripts. Would that be helpful? Thanks Chris

      Reply
      1. Dominick DeBellis

        That sounds great Chris. Anyway that we could run the application in such a way to avoid launching the GUI. We’ve been using your notifier for a couple of weeks now and it’s helped to increase visibility into the types of issues our users are running into. Thanks again!

        Reply
  11. Daniel Griffiths

    This is extremely useful! I have been asking our internal SQL DBA to write some Queries from the events database to trigger email alerts on some View events that are critical (like the view VC service fails or composer, etc). That type of built in alerting should have been built into View 3.X! Thanks for your efforts. I will say I had opened a support ticket with VMWare just a few weeks ago and we have production 4 hour support and I asked Support if they could provide some sample PowerCLI scripts or SQL queries into the Events Database for our Horizon View 5.3 instance and support said that’s not in their scope of support, VMWare only helps to make sure events are recorded in the SQL database, they cannot help pulling any information out of it or setting alerts on it. I wish I would have seen this sooner and I think the Support staff should be made to keep an eye out on Flings like this :)

    Thanks,

    Reply
  12. Dominick DeBellis

    Chris,
    Thank you for working on this fling. I have quite a few thoughts on it but I would first and foremost recommend that you prevent the application from running multiple times. This creates uneeded contention of the configuration file in my experience with it and the taskbar gets a bit out of control. Also I would +1 the comment made by Jason – specifically in reference to standardizing this as an executable to be run in service mode versus run in user mode. Perhaps adding a switch or two to the startup params (-nogui -start “configname”) would suffice.

    Reply
  13. Richard

    Huge job and very useful.
    Unfortunatelly it works only on our Qualifying environnement as Production is based on Oravcle DB.
    Do you plan to add this DB in a future or does it exist a tip to connect to Oracle instead of SQL Server ?
    Richard

    Reply
    1. Chris Halstead

      Richard – Thank you for your feedback. I don’t have Oracle in my lab so I wasn’t able to test it. I can certainly add that functionally to the product. I just need to stand up an Oracle DB and test it out. Look for it in a future release. Thanks again! Chris

      Reply
  14. Matthew Dailey

    First off – this is awesome! I’ve been wishing for something like this since we rolled out View!

    One very minor issue that I ran into is that the HELO sent to the smtp server is not fully-qualified, e.g. HELO hostname instead of HELO hostname.company.com This causes a problem with some paranoid smtp servers that only accept HELO with a FQDN.

    As others have said, it would be really nice to have this run as a service. Another total wishlist item for me would be if this could send snmp traps either in addition to or instead of e-mail.

    Reply
    1. Chris Halstead

      Matthew – Thank you for your feedback! That is interesting on the HELO comment. It is just connecting to whatever is typed into the SMTP server field. Are you still seeing this behavior? I am working now on adding SNMP and Syslog support as well – so watch for that in a future release.

      Thanks,

      Chris

      Reply
  15. Jason

    (Forgot to add one)

    4. Would it be possible to add a digest mode for the event e-mails as an option? If your “SMTP Server Settings” section was a table like the “SQL Server Settings” is now, it might be an easy way to configure multiple types of e-mail alerts (e-mail immediate notification to some recipients vs digest notification to alternate recipients).

    Reply
    1. Chris Halstead

      Jason –

      I really like the digest alert idea! I will definitely add that functionality in the next release. I will set it to consolidate all alerts for a 24 hour period and allow a new set of email recipients. If you think of any other features that would be helpful post them here.

      Thanks!

      Chris

      Reply
  16. Jason

    Great job on this app/fling, Chris! It is filling a huge gap in the View product.

    Few thoughts:
    1. I’m still interested in the possibility of a custom alert setting (or multiple alerts), based on string, or a combination of string and type.
    2. I’d also like to see an option to install or create a service for this app so that I don’t have to leave a session open on the server.
    3. Finally, after entering SMTP settings I clicked “Send Test Email” and immediately got a .NET error stating that “address” was empty. Once I actually saved the changes I was able to test, so if the “Send Test Email” button committed the changes first there wouldn’t be an issue. That or the button should be greyed out until the settings are saved.

    Reply
    1. Chris Halstead

      Jason – thank you for the feedback! Here is some more detail:

      1. The next version will have a new tab called “Alert Filtering”. It will allow you to filter alerts based on the Alert Type and the Event ID. Event IDs that exists will be pre-populated and you will be able to choose which alerts you actually want to be notified on. You will also be able to filter by connection / security server or pool. I would like to talk to you about the string alerts and use cases you would like to use that for.

      2. I want to do this and have started developing the framework. It does add a lot of complexity to the process (installer, etc), but I am hoping to release a version with a separate service option in a future release.

      3. Good catch – the app reads directly from the configuration file, and the config file is not populated until you click “save settings” the first time. I will correct this for the next release.

      Thanks for your feedback – if you think of anything else post it here.

      Chris

      Reply
      1. Jason

        1. If nothing else, a string alert filter may give flexibility if new event IDs are created between when you release your update and any future updates of View. My thought, though, was so that I could create a filter based on a specific user or pool name (or any combination). This request kind of ties into #4 – would it be possible to send e-mails of certain filtered alerts to different recipients?

        2. I’m not sure if the quick/dirty way would work, since your app isn’t using an installer yet… adding a button to the UI (or an option in the drop-down File menu) that runs the command:

        sc create “Horizon View Events Notifier” binPath= “[location to exe file]” start= auto DisplayName= HorizonViewEventsNotifier
        net start HorizonViewEventsNotifier

        It probably needs to be configured to use a config file and/or start the app, though. You’d probably want to create a way to remove the service as well (sc delete).

        3. Can you also make the alert e-mail subject writeable? I imaging if/when the filtering options become more complex it would be useful to be able to edit the subject for each configured alert.

        Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>