Setting up a bit more of alerts

On December 16, 2009, in Migrationextras, by

So I noticed that in the event viewer there was a specific backup log that was deep under the sub folders.  And in there I found that it was warning me that I was getting low on backup space.

So I went into the event viewer and build a task that emails me an alert when the backup is running low on space.  Once you build one for one server, you can export it out, tweak it, and then import it back into another system.

The raw xml looks like this:

But trust me it’s a piece of cake to do inside the event viewer.

<?xml version=”1.0″ encoding=”UTF-16″?>
<Task version=”1.2″ xmlns=”http://schemas.microsoft.com/windows/2004/02/mit/task“>
  <RegistrationInfo>
    <Date>2009-12-01T18:10:47.6153557</Date>
    <Author>DOMAIN\Admin</Author>
    <Description>Backup target is running low on free space. Future backups to this target may fail for want of enough space.</Description>
  </RegistrationInfo>
  <Triggers>
    <EventTrigger>
      <Enabled>true</Enabled>
      <Subscription>&lt;QueryList&gt;&lt;Query Id=”0″ Path=”Microsoft-Windows-Backup”&gt;&lt;Select Path=”Microsoft-Windows-Backup”&gt;*[System[Provider[@Name=’Microsoft-Windows-Backup’] and EventID=51]]&lt;/Select&gt;&lt;/Query&gt;&lt;/QueryList&gt;</Subscription>
    </EventTrigger>
  </Triggers>
  <Principals>
    <Principal id=”Author”>
      <UserId>DOMAIN\Admin</UserId>
      <LogonType>Password</LogonType>
      <RunLevel>LeastPrivilege</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <IdleSettings>
      <Duration>PT10M</Duration>
      <WaitTimeout>PT1H</WaitTimeout>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>P3D</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context=”Author”>
    <SendEmail>
      <Server>10.0.0.5</Server>
      <Subject>Backup space running low</Subject>
      <To>sbradcpa@pacbell.net</To>
      <From>admin@domain.com</From>
      <Body>Backup target is running low on free space. Future backups to this target may fail for want of enough space.</Body>
      <HeaderFields />
    </SendEmail>
  </Actions>
</Task>

 

You find the event that you want an email alert generated from.  You “attach” a task by right mouse clicking on the event.

It’s pretty self explanatory to set up an email task

The trick on this screen is to click that check box to open up the properties dialog after you hit finish as there’s one more key step to adjust.

Tick the box to run whether the user is logged on or not.  This ensures it will run after reboot and doesn’t need someone logged in.

And there’s my two alerts, one for low disk space in the backups, the other for a successful backup. 

 

 

Comments are closed.