Timed Script Two State Monitor alerting only during business hours

Hi All,

I've got an MP for an internal application, this MP has a monitor for a file process, which checks for files over x minutes old and then sends an email. This works fine. I've now got a requirement to only have this trigger during provisioned hours that we expect this file processing to be running.

I've added a diagnostic task to the monitor.

<Diagnostics>
      <Diagnostic ID="NEW.Unit.TimeFilter" Accessibility="Internal" Enabled="true" Target="NEW.Unit.BusApp" Monitor="UIGeneratedMonitor04c28e7ec1fd42cfba51e48a38d935a9" ExecuteOnState="Error" Remotable="true" Timeout="300">
        <Category>Custom</Category>
        <ConditionDetection ID="System.SchedulerFilter" TypeID="System!System.SchedulerFilter">
          <SchedulerFilter>
            <ProcessDataMode>OnSchedule</ProcessDataMode>
            <Schedule>
              <WeeklySchedule>
                <Windows>
                  <Daily>
                    <Start>07:30</Start>
                    <End>09:00</End>
                    <DaysOfWeekMask>62</DaysOfWeekMask>
                  </Daily>
                  <Daily>
                    <Start>12:00</Start>
                    <End>19:00</End>
                    <DaysOfWeekMask>62</DaysOfWeekMask>
                  </Daily>
                </Windows>
              </WeeklySchedule>
              <ExcludeDates />
            </Schedule>
            <UseCurrentTime>true</UseCurrentTime>
          </SchedulerFilter>
        </ConditionDetection>
        <ProbeAction ID="System.ProcessInformation" TypeID="System!System.ProcessInformation" />
      </Diagnostic>
    </Diagnostics>
    <Recoveries>
      <Recovery ID="MomUIGenaratedRecoveryae535786bf7e48d8b2bdf5fd48ca49c0" Accessibility="Public" Enabled="true" Target="NEW.Unit.BusApp" Monitor="UIGeneratedMonitor195a2f661971479f99b2d9d6c8168587" ResetMonitor="true" ExecuteOnState="Error" Remotable="true" Timeout="300">
        <Category>Custom</Category>

Will this work as I expect or should I be doing this a different way?

Thanks

September 1st, 2015 12:28pm

A Q&D way to do this would be to create a separate subscriber for this that only sends an email during your business hours and then use that subscriber on the subscription for this alert.
Free Windows Admin Tool Kit Click here and download it now
September 1st, 2015 5:19pm

Hi Kieran,

Add System.TimerCondition module to the Condition detection module of the rule, you can select timings as per your requirements in this module

September 1st, 2015 5:21pm

You should add the Scheduler Filter this is where were going to define our time window or business hours.
For detail, pls. refer to
https://nocentdocent.wordpress.com/2009/05/01/opsmgr-r2-authoring-console-business-hours-monitor/
Roger
Free Windows Admin Tool Kit Click here and download it now
September 1st, 2015 11:49pm

Hi,

You can handle this in three ways as below.

1) if i am not wrong you are using simple scheduler in Data source module you can change the module to System.ScheduledFilter where you have option to run in specifice run time.refer below link for more information.

https://msdn.microsoft.com/en-us/library/ff453828.aspx

2) add System.ScheduledFilter or System.TimerCondition in condition detention module in Monitor Type definition.

3) as this is script base monitoring, you can update script to check files age with in given time frame and return healthy condition property bag value on non business hours.

R

September 2nd, 2015 3:18am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics