We run a number of production servers, some of them using IIS and ASP.NET, and of course they run around the clock. We have used various monitoring tools and services throughout the years we’ve been doing this, but in addition to the mounting expense of adding more and more servers to our monitoring services, and upgrading to shorter and shorter monitoring intervals, we were still left with two issues.

First, regardless of using our services most frequent testing intervals we could sometimes be down for longer than we liked — in part because an outage could happen at an inopportune moment, when we were away from a computer for example.

Second, it’s no fun being awakened in the middle of the night just to restart IIS. And with customers in every timezone around the globe, any outage anytime disrupts someone trying to get their job done.

We’ve gotten good at what we do — we’ve been at it for more than a decade, and outages are few and far between for stable, mature products. But we absolutely hated any outages that although unavoidable, would last for more than seconds.

How did we address this? In two steps. First, we wrote mobile tools for the manual restart. Then we automated the whole thing.

Although many of us tote iOS devices we all have Android phones, so an Android app was the obvious starting point. Coupled to our own non-IIS, custom port web server, the app allows us to check the health, and restart as needed, any of our IIS / ASP.NET servers (let’s face facts, as nice as IIS and ASP.NET are, they fall over more often than Apache or Nginx on Linux).

Actually the solution we developed allows us to execute any Windows command we want, with all commands both centralized in a “hub” server and externalized from the code so any command can be added to a simple configuration file and it’s added to the available options.

This solution meant when we got the monitoring service alert for a particular server, all we had to do was tap-tap-tap on our smartphone and problem solved. This meant faster responses to problems. That might mean waking up in the middle of the night and using the smartphone by the bed to fix it in seconds before rolling over and going back to sleep, or it might mean pulling over to the side of the road to take care of it instead of having to call someone else or hurry to the office or home to be in front of a computer.

The second step was to enhance our “hub” to do its own monitoring and have it issue the command to fix the problem itself. This had several advantages. First, we could monitor on an even shorter interval at no extra cost. Actually, even with a monitoring service as a backup we’re saving money by choosing a less-costly interval. Second, automating the restart means quicker response, which means beter service for our customers. Third, no wake up calls in the middle of the night.

Is this something YOU need? Because we’re considering making it into a product. Give us your feedback in the comments or by emailing us at info at mdotech.com.

 

{ 0 comments }

The WordPress Editor, even in HTML mode, will typically fail to preserve more complex options in an href, for example when you want to use a common Google Analytics bit of javascript to include EXE, PDF, AVI, or WMV in GA reports using “virtual pageviews”.

The generalized approach is to invoke the Google Analytics script by adding an OnClick event to the link, like this:

<a href="http://www.example.com/files/map.pdf" onClick="javascript: _gaq.push(['_trackPageview', '/downloads/map']);">

We learned when trying to use this technique on a page in a customer’s WordPress site we host that the WordPress editor will just not allow it to work.

We looked at solving the problem with a custom shortcode, which would involve some php and a small custom function, but settled on the more blogger-friendly “custom field” which is easier, less technical, and unlikely to break a site. It uses the Custom Fields Shortcode plugin. It’s a general approach that lends itself to a cookbook approach to solving the general problem of adding javascript to a Page or a Post.

Here’s how to do it:

First install and activate the Custom Fields Shortcode plugin.

The next trick is knowing where you add a Custom Field and how. It’s done in the Editor, but unless you’ve already used custom fields they will not be visible in the Editor. Turn them on by opening up Screen Options and checking the box:

Use Screen Options to turn on Custom Fields in the WordPress Editor

 

 

 

 

Now you will see, toward the bottom of the Editor, Custom Fields, including the Add Custom Field button. A Custom Field is your basic key/value pair. We can add, for instance, “GA-OnClick” with our complete href string.

 

 

Add a New Custom Field

 

 

 

Then, where you want to use that string, just use the Custom Field tags surrounding the name. In HTML mode we might, for instance, place the link and its anchor in a list item like this:

<li>Our Anchor</li>

The WordPress Editor will leave it alone, and WordPress together with the plugin, when outputting the html for the Page or Post, will expand it.

Our example, added in HTML edit mode, expanded (note that the link is not real):

Do a view source and search for “Our Anchor” to see the desired substitution was in fact done.

{ 0 comments }

Getting Started with Twitter, Facebook and Google+ Social Sharing Buttons

October 27, 2011

As part of  the process of launching a new web product called DeliverFiles we wanted to add some social sharing buttons (or widgets if you prefer). The product site does not use a platform like WordPress or Druple, so there were no quick, easy plug-ins to rely on. Initially we looked at services that do [...]

Read the full article →

Creating collaboration and productivity tools for every day use

June 6, 2011

  MDO Technologies has been creating collaboration and productivity tools that real people are using to get real work done, every day. We’ve been in the product design and development business  since 1998 with backgrounds that extend back all the way to the early days of email. We love working and leaving near the beach [...]

Read the full article →