Archive for the ‘Reporting’ Category

Server Essentials not Sending Health Reports

A built in feature of Server Essentials, till 2019, is the ability of the server to send a daily “Health Report”. This contains information about the last backup, storage, services and more. I always configure this on all Essentials servers and set to send at 7:00 am for my review later. On 4 of the Essentials servers I manage it seems on the morning of the Daylight Savings change, at 1:00 am it tried to send a report for some reason, failed, and has failed the 7:00 am report ever since.

Though the error shows the problem is the “Windows Server Essentials Management Service” is not running, checking the Services management console shows it is. Simply restarting the service resolves the problem. You can right click on the last report and choose “send e-mail” to verify.

Advertisement

DFSR Event ID: 2147485861

It seems Server Essentials and possibly others will often show in the daily report a DFSR Event ID: 2147485861 error. There is also a corresponding Warning Event logged in the DFS Replication log (sub-folder of Applications and Services Logs) of the event viewer with Source DFSR and Event ID 2013, followed by an Event ID 2212. This is most often caused by a dirty shutdown.

image

There are numerous articles on the Internet explaining how to resolve this, but I was told they were not clear to some readers. So, hopefully to clarify:

Firstly open Regedit and locate the key below, and verify it is set to 1. If not change it to 1.   (Note: you should always backup the registry before making any changes)

HKLM\System\CurrentControlSet\Services\DFSR\Parameters\StopReplicationOnAutoRecovery

Then in the error message within the report locate the command as highlighted in the image above, but cut and past it from your server report as it will have the correct volume GUID. Make sure it is all one line. You may want to use Notepad to reassemble if broken in the report. You need to use an elevated command prompt to run this.

If you run the command with the wrong GUID it will display; “No Instance(s) Available”.

If successful your command window should look similar to this:

image

This should resolve the problem, but it may return at some point in the future.  The Windows Server 2012 Essentials Build document (wiki article) suggests to prevent this in the future, after running the command successfully, change the aforementioned registry key from 1 to 0.  Doing so enables DFS Replication automatic recovery.

http://social.technet.microsoft.com/wiki/contents/articles/13620.windows-server-2012-essentials-build-document.aspx#DFSR_Error_in_Health_Reports

Remote Site Monitoring Alert

On occasion there may be a need to be notified if a remote server is off-line due to an Internet outage, router issue, power outage, or server down.  There are many excellent services that will monitor and alert you, but most are intended for multi-site and/or multi-server configurations and require a monthly fee.  You might just want to monitor a single site and be notified if it fails.

I had this situation and therefore decided to write a simple script to accomplish the task.  I am not a programmer so I am sure this could be improved upon, but it works.  Feel free to add suggestions or alternatives in the comments section, I am sure we would all be interested.

Basically there is a batch file that makes use of a free little utility called http-ping by www.CoreTechnologies.com which runs every ‘X’ minutes using a scheduled task and verifies if the site is accessible.  If not, a simple VBS script sends an e-mail alert.

Http-ping does need to be able to access an http or https server, which could be a web server, Exchange (OWA), a router management page, or one of many other possibilities.

To configure simply create a folder such as C:\SiteMonitor and place in it; the batch and VBS script below, and http-ping .  You will have to download http-ping from http://www.coretechnologies.com/products/http-ping/

Batch file:

@echo off
:: Enter the directory location (e.g. C:\SiteMonitor\)
Set Directory=C:\SiteMonitor
:: Enter the address of the site to ping (e.e. 123.123.123.123/Exchange:443 or server.domain.com/Exchange:443)
:: (The first example should be used if you need to know if the public IP has changed)
Set Site=123.123.123.123/Exchange:443
::
If Exist %Directory%\PingResult.txt Del %Directory%\PingResult.txt
%Directory%\http-ping.exe %Site% >> %Directory%\PingResult.txt
findstr /M "Reply" %Directory%\PingResult.txt
If %errorlevel%==1 GoTo EMAIL
GoTo END
:EMAIL
cscript %Directory%\SendAlert.vbs
:END

VBS script:

' VBS script to send an alert via e-mail
Dim SMTPserver, Sender, Recipient, Subject
' Set client specific variables
SMTPserver = "smtp.ISPname.abc"
Sender = "alert@SomeDomain.abc"
Recipient = "me@MyDomain.abc"
Subject = "Alert off-line"
Message = "An automated script has determined the server at is currently off-line."
' Send E-mail
       set objMessage = CreateObject("CDO.Message")
       objMessage.Subject = Subject
       objMessage.Sender = Sender
       objMessage.To = Recipient
       objMessage.TextBody = Message
       objMessage.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTPserver
       objMessage.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
       objMessage.Configuration.Fields.Update
       objMessage.Send
       set objMessage = Nothing

Customize scripts:

When complete save the batch file as something similar to SiteMonitor.bat.  In the batch file you need to set two variables; the “Directory” where you saved the files, and the “Site” htpp-ping is to test.  The site can be a FQDN or an IP, and needs to point to a server  or router.  In some cases you need to add the port number. Some examples include:

http://www.mysite.abc
remote.domain.abc:443
router1.DDNSservice.abc:8080  (router)
remote.domain.abc/OWA   (Exchange port 80)
123.123.123.123/Exchange:443

In my case the site I wanted to monitor had a dynamic IP.  I needed to be alerted if the public IP changed due to a service used by the site that would not work with a DDNS service.  Therefore I used the last example above.

The VBS script needs to be saved as SendAlert.vbs or change the name used within the batch file to match.  In the VBS script you need to set the following 5 variables as per the examples in the script; SMTPserver, Sender, Recipient, Subject, Message.

Schedule:

Finally, you need to schedule a task to run the batch file every half hour (or your time frame).   The following is an example as to how to do so with Vista/Server 2008 and newer.  Similar can be done under Control Panel, Scheduled Task in XP/Server 2003 and earlier.

Open the Task scheduler under Control Panel / Administrative tools, click on Task Schedule Library, and on the right select Create a Basic Task.  Assign the task a name and you can enter a description if you like.  Make sure you also select “Run whether the user is logged on or not”.

image

Configure the “Trigger” options as per the following image:

image

In the “Actions” pane choose to start a program, and point to your batch file:

image

You can then complete the wizard accepting defaults.  Your monitoring service should now be complete.  If you want to test, change the “Site” variable in the batch file to a non existent IP or FQDN, and you should get an alert the next time it runs.  Note if troubleshooting the results of the last http-ping are recorder in the directory you created as a text file named PingResult.txt

Editing SBS 2008/2011 Server Reports

There have been many complaints that there are numerous events logged in the daily SBS reports to which the ultimate Microsoft solution is; “The errors/warnings are benign and may be safely ignored”, “You can safely ignore the event ID error message, or similar. The fact is some of us quickly scan the reports for serious errors and as soon as we see a red warning, we have to stop, review, and take action or as Microsoft suggests, “ignore”.  In the interest of efficiency, or simply wanting to provide clients with clean reports, it would be nice to have errors that can be ignored, be ignored, and not added to the report. 

Great news!  Microsoft just released “An SBS Monitoring Feature Enhancement”.  This a tool or add-on package that allows you to create your own custom list of excluded events that will no longer be added to the daily reports.  It does include a list of the known common events (below) that can be ignored, which you can also edit if you wish.

SBS 2008
•Event ID: 10016 Source: DCOM
•Event ID: 10009 Source: DCOM
 
SBS 2011 Standard
•Event ID: 129   Source: WinRM
•Event ID: 142   Source: WinRM
•Event ID: 4107  Source: Microsoft-Windows-CAPI2
•Event ID: 10016 Source: DCOM
•Event ID: 10009 Source: DCOM
•Event ID: 5586  Source: SharePoint Foundation
•Event ID: 6772  Source: SharePoint Foundation
•Event ID: 6398  Source: SharePoint Foundation
•Event ID: 8     Source: MSExchange CmdletLogs
•Event ID: 6     Source: MSExchange CmdletLogs

For full details and link to the download, see the full article:

http://blogs.technet.com/b/sbs/archive/2012/01/16/managing-event-alerts-in-your-reports-an-sbs-monitoring-feature-enhancement.aspx

Tag Cloud