Skip to main content

Windows Servers: How to Monitor, Remote Reboot and Remote Shutdown Automatically or Manually

Dear Overworked Server Admins,

In this article, I put together a couple of shareware utilities that seem (to me) to be indispensable for Windows servers in remote data centers.

For server monitoring, Servers Alive from http://www.woodstone.nu/salive/index.php has been a lifesaver for many years. The free edition lets you monitor up to 10 URLs, services, etc.  For more URLs and features, buy a standard license.  It will pay for itself quickly in terms of automatic follow-up to common issues.  I keep the Servers Alive status page open in my browser all day long and can instantly tell whether there are any problems on any servers in California or in the Amazon cloud. I also get email alerts for serious conditions, as do other people in the company.  I use the scheduling feature (in the paid edition) to direct alerts based on time of day.

You can also use PRTG or WebWatch for server monitoring.
For remote reboot, RemBoot from HREF Tools is perfect.  (Well, we wrote it, so I would say that.)  From any browser on any laptop, desktop, iphone, mobile phone, smart phone, Kindle, ipad, etc., I can get my servers to reboot painlessly.  I have a set of shortcuts, one for each server, so I can get in quickly, enter user name and password over https, and know that the server will gracefully reboot promptly.  By gracefully, I mean that all the running applications will be given 20 seconds to close themselves, and if they do not, a second pass will force the shutdown-and-restart to occur.  Graceful reboot is critical because we run 24x7 web+database applications which far prefer to be closed "properly" than end-tasked.  The 20 second timeout is configurable.

The latest version of RemBoot supports a Shutdown option, designed for virtual machines.  I don't know about you.  I run Oracle VirtualBox and I like to shut virtual machines down occasionally to run complete clones (backups) because I never trust just one backup system.  I love having a complete clone on tap, just in case.  My goal is to clone once a week, under program control, automatically.  My plan is to script something that will issue an https post to shut the virtual box down, run the vboxmanage syntax to clone the virtual machine, and then start the machine back up.  My machines take less than 20 minutes to clone.  I figure that is acceptable down time, once a month, for these particular machines, most of which run demo software of one type or another.

But back to monitoring and automatic restart.  Servers Alive has a variety of things that can be triggered when a server-down condition is reported.  I have already mentioned emails and web status page updates.  It can also send an https post, which is what RemBoot requires as input.  So basically I can program the Servers Alive software to watch certain web URLs, and if they misbehave, I can have Servers Alive send my username and password to my (secret) reboot URL over https, and that will make the machine reboot.  I do that after 2 down cycles on one machine that gets itself into a bad state once in a blue moon, really every 2 or 3 or 4 weeks or so, and instead of having a technician wake up, I just have Servers Alive do the reboot.

In case you have RemBoot and did not realize you could automate reboot and/or shutdown, think about it.  The login form is just an html page with a form tag.  That form tag has an action URL, which you can determine by viewing the source of your particular login page.  Look for the action= within an html <form> tag. That action URL is where you have Servers Alive (or any other monitoring system) post your username and password to.  Just make sure that you post via HTTPS not HTTP, and make sure you use your fully qualified domain name and port.


Post 3 Fields

Here is the syntax for posting the 3 fields for a Reboot: UserName=PersonA&Password=PersonA&Action=Reboot

Does not get much cheaper than this

Servers Alive v7 standard edition pricing starts at $279 (USD).  RemBoot v4. pricing is $25. for one server for five years, or $39. for up to five servers for five years.

WebWatch costs ~$130. USD for unlimited site monitoring.

.

Important Integration Notes

  • Do not try to make this work with salive version 6.0.2053 because that version posts blank values. These blank values will be reported if you are using RemBoot v4.6.0.3+.
  • If you want to use PRTG instead of ServersAlive, note that PRTG adds a trailing space to the posted data. RemBoot v4.6.0.3 trims this, but earlier versions do not.

Comments

Blogger said…
There's a chance you're eligible to get a $1,000 Amazon Gift Card.
Blogger said…
There's a chance you are qualified to get a free Apple iPhone 7.

Popular posts from this blog

Installing Firebird 2.5 64-bit on CentOS 6.2

Media: burn DVD with disk #1 of CentOS 6.2 installer


Boot to the DVD

During installation, from the radio button list, select Database Server (and later turn off the 4 default database choices)
Unselect a few things that seem unnecessary, like debugging features and php
Select all the Desktop options, plus X Windows

Create one user with a secure password; that user will have a GUI (KDE). Advice: use an uncommon name for your user.

After the dust settles, sort out networking. The GUI has a feature for that, System > Preferences > Network. ETH1 is the 2nd cat5 network jack. ETH0 is the 1st one (left to right, looking at the back of the SuperMicro 1u server). Fill in the MANUAL settings to fix the ip, and make sure to check the box [x] connect automatically.

Test the network by opening Applications> System Tools > Konsole.

cd /sbin
./ifconfig

That will show you what is running on ETH1 and it should include your static ip number.

Now, System > Administration > Firewall…

Virtualizing Windows on Physical Hardware into VirtualBox

The Path to Success: Physical Server converted to VirtualBoxSysInternals Disk2VHD is great as long as you use VHD format NOT VHDX ! ! !  Avoid VHDX if you want to use the resulting image in VirtualBox!!!  This holds true until you see that VirtualBox fully supports VHDX format.  Right now - October 2014 - CentOS7 - VirtualBox 4.3 - VHDX is supported as a "readonly" disk.  That means, you must convert VHDX to VHD (or something) before you can really use it.

So stick to VHD.  Uncheck the box for VHDX support !!!

When you run Disk2VHD on your physical server with Windows, select ALL the partitions AT ONCE and create ONE (1) VHD file.  Do not make separate VHD files.  Make ONE.  Make sure you include the reserved system boot partition, plus your Windows7 operating system partition, plus any data partitions.

You can then use the resulting SINGLE VHD file on the IDE controller of your new VirtualBox machine.  You can probably use it in HyperV and VMWare but I only tested in Oracle Vi…

Windows 10 Visual Elements incl Start Menu Tiles for Native Desktop EXEs compiled with Delphi

This is a summary of what is needed to make a native Windows desktop EXE (compiled with Delphi or any compiler other than Visual Studio) appear with scaled logos and icons throughout Windows, especially in the Start Menu and in File Explorer.

1. The ICO file.This factoid is based on the Main Icon Group in Delphi, bds.exe, which you can examine with XNResourceEditor or Resource Hacker.




Build an ICO file containing your program icon in all these sizes and color depths. Use that icon when you Project > Build by associating it with the project.  In Delphi: menu Project  > Options, Application.  Do this for at least the target platform combined with Release, e.g. Win32 Release and/or Win64 Release.  Load your icon.  Repeat for other targets as necessary.  Project > Build each one.



2. The visualelementsmanifest.xml fileMake a file named ____.visualelementsmanifest.xml file where the ____ is replaced with the name of your EXE.  So for MyGreatApp.exe it would be MyGreatApp.VisualElement…