Simon icon Simon
Flexible server monitoring

Run test once a day near a given time?

David,
I've managed to replicate most of our old Whistleblower tests into Simon, so hopefully I can stop asking questions soon. The last thing I need to set up is to send a daily "status" e-mail report. In another thread you answered that I can do this with a Pulse Test.

I would like this to be sent at 6:00 am every morning. This allows staff response on arrival if Simon has detected a problem. While I don't see a way to specify 6:00 am exactly I think I can get close by running my pulse test every 5 minutes but pausing it for 23:55 a day between 6:05 am - 6:00 am the following day. I'm not clear how to specify that pause interval. Can I do an "Every Day" from 06:05:00 to 06:00:00, or do I need to create 2 e.g, 06:05:00 to 00:00:00 and 00:00:00 to 06:00:00?

Thanks

David Sinclair's picture

Re: Run test once a day near a given time?

I'm glad things are coming together nicely for you.

You should be able to use just one Auto Pause interval of 06:05:00 to 06:00:00. If the end time is earlier than the start time, it assumes it's the next day.

(BTW, I agree that scheduling by pausing is a bit backwards; in a future version I plan to redesign the scheduling options to combine the frequency and pausing into one group of settings, where you specify what times to check, rather than when not to check.)

Re: Run test once a day near a given time?

Thanks!

Re: Run test once a day near a given time?

The test ran near 6:00 am this morning as hoped. It didn't send a notification though.
This test should generate a change every time it runs. When I was first setting this up I did receive notifications. If subsequent changes occur with no failures or recovery in between do new messages not get sent? I've read the docs and think I have this set up correctly.

I have the following checked for my "Pulse Test"
* Can check when offline
* Smart Change Detection
- Look for changes: a change occurred if the _output_ between the following text changes:
Start text: blank
End text: blank

Notifiers:
Change notifiy with "Email Daily Pulse Notification"

Reports:
Exclude from all reports

---
Email Daily Pulse Notification is defined as follows:
[x] Change after 1 consecutive changes
[ ] Failure
[ ] Recovery
[ ] Only if failure notifed

Notifier Kind: E-mail
To and From use valid addresses. I'm using the same for other notifiers that are working.

Message is
{NotificationDate} {NotificationTime}
Simon is running. The latest Simon Status Report may be viewed at TBD.

Automatically Pause Notifier
Never

David Sinclair's picture

Re: Run test once a day near a given time?

That all looks okay. You could check that the notifier still works by using Notify Now in the Notifiers window.

Probably should see if a notification did occur, but you just didn't get the email -- check the Notifications log.

Also check that a change was detected; does it list a change in the Changes log? The Pulse service should change every time it is checked, though.

Re: Run test once a day near a given time?

You could check that the notifier still works by using Notify Now in the Notifiers window.

It does.

re: Also check that a change was detected; does it list a change in the Changes log? The Pulse service should change every time it is checked, though.

This appears to be the problem. Any ideas why the change wasn't detected? Could the fact that I sleep the test for all but 5 minutes of the day be of consequence?
In looking at the change log I see changes, but from yesterday when the test was running every 5 minutes. That was before I set the Automatically Pause Test settings.

Thanks

David Sinclair's picture

Re: Run test once a day near a given time?

Weird. The Pulse service is very simple — it's a script that simply outputs the current date and time. So I can't imagine why it wouldn't have changed, if it actually checked.

I wouldn't think that the Auto-Pause would affect that.

Re: Run test once a day near a given time?

According to the "Checks" report it ran this morning at 2010-03-11 06:00:01. I should note that before I set the Automatically Pause Test settings, I had experimented with letting the test run every 5 minutes, but using Automatically Pause Notifier to suppress notifications except for a 5 minute window. Those settings were cleared early yesterday though.

David Sinclair's picture

Re: Run test once a day near a given time?

Hard to know why the notifier didn't fire, then. You could double-check that the notifier auto-pause was cleared. Other that that, perhaps see if it works tomorrow, and if still not we'll have to come up with some way to diagnose it further.

Re: Run test once a day near a given time?

The test ran at ~06:00 this morning. No change was detected. No notification was sent.

The last sent change, on 3/10, corresponds with the last sent notification.
I note that there was a timeout failure on 3/9 if that might have anything to do with this.

David Sinclair's picture

Re: Run test once a day near a given time?

If you unpause the test and check it manually, does a change and notification occur?

I don't know how the Pulse service could time out, since it just returns the current date and time (assuming you haven't edited the service to do something else).

Maybe you should send me your data so I can check for issues.

Re: Run test once a day near a given time?

Yes, if I unpause the test it and run it manually both the change and notification occur. The first 2 succeeded, followed by a scheduled test 5 minutes later.

I won't be able to monitor this in the morning (or all next week) so I'm going to set the test to pause for a few hours, wake for 5 minutes, and see what happens.

What "data" do you need? My entire ~/Library/Application Support/Dejal/Simon folder?

Thanks

David Sinclair's picture

Re: Run test once a day near a given time?

It is sounding like the auto-pausing is interfering somehow, though hard to see how.

Yes, that entire folder would be helpful. If there's an issue specific to your data, that'd help me find it. You can email it via the link on the Contact page.

Re: Run test once a day near a given time?

I'll send you the data if next test ( 15:00 ) fails to send a notification.

Thanks.

Re: Run test once a day near a given time?

The 15:00 test ran but no change was detected and no notification sent. I'll send you my data asap.

David Sinclair's picture

Re: Run test once a day near a given time?

Thanks.

Re: Run test once a day near a given time?

For the record, my problem was most likely due to the fact that I'm trying to pause a test for ~24 hours but was attempting to verify the test without waiting until the next day to see the results. I was away last week and left Simon alone. After a day or two everything sorted out and the test is now running at 6am every morning and sending the desired notifications. David Sinclair noted to me privately that when a test is edited the last change text is cleared. Most likely my attempts to verify that a test would work without waiting until the next day to see the results were leading me to believe that there was a problem when there was not.

How to set the Pause scheduler?

This is related to the above thread. I had set up a test to run every 5 minutes but paused it so that it would only run within one 5 minute window per day (between 0600 and 0605).

When setting Simon to pause a process if the desired start time is before the current time the pause will not start until the next day. My workaround to get the pause to start ASAP has been to do something like this:

Currently it is 8:55 AM, so I would have to set up to
Pause from 09:00 to 06:00
Pause from 06:05 to 09:00

That worked fine for about a week until last Monday when we discovered that the pause ignored the settings after work hours and there were 100+ notifications in our mailbox. In this case Simon did awake on one of the defined pause interval boundaries.

I've since reset Simon using the same trick but it has become "unpaused" twice and starting sending notifications on each check. Luckily these have happened during work hours so that we can stop the mail flood (managers get these daily reports in addition to techs).

Is there a way around this?

Do I need to temporarily reset the Simon computer clock to 06:00 AM and set a 6:05 to 6:00 pause.

Do I need to get up early and VPN in to the Simon machine from home and set the interval at 6:05 to 6:00?

Other ideas?

Thanks

David Sinclair's picture

Re: How to set the Pause scheduler?

I'd recommend just having one pause interval, as you did before, and avoid editing the test.

Having multiple pause intervals should work fine, though. I don't know why it would become unpaused if the intervals cover that time, unless it is counting from "tomorrow".

Maybe with your example, try setting the first one from 09:01 to 06:00, so there isn't an overlap between the two pause intervals?

I do wish the planned scheduling options were already implemented; then you'll be able to just say "check once each day at 06:00" and be done.

Re: How to set the Pause scheduler?

I'd recommend just having one pause interval, as you did before, and avoid editing the test.

OK.

I haven't tried it but do you think Simon will get confused if I temporarily change the computer's clock to 6:03 am, set a single Automatically Pause interval for Everyday from 6:05 to 6:00, with the intent to start the pause shortly thereafter. If I do this after 6:00 I will get notifications every 5 minutes for the rest of the day until the test pauses at 6:05 am tomorrow. Once I set the pause I'll reset the computer's clock to the correct time and restart Simon.

And what do you mean by avoid editing the test?. Isn't changing the Automatically Pause Test setting editing the test?

Maybe with your example, try setting the first one from 09:01 to 06:00, so there isn't an overlap between the two pause intervals?

I think I tried that this past week but set (as per your example) 09:01 to 09:01:01. It still got unpaused.

David Sinclair's picture

Re: How to set the Pause scheduler?

I wouldn't recommend temporarily changing the Mac's clock. I'm not sure what implications that might have, but there could be issues with it, e.g. scheduling of tests.

I'd suggest setting the Auto-Pause settings as desired, then (to avoid getting notifications until tomorrow) manually pause the test with a suitable duration. Manually pausing (via the Pause button in the Monitor toolbar) won't count as editing the test.

Yes, setting the Auto-Pause options will clear the last changed text. I just meant that once you get the Auto-Pause settings as you want, leave the test alone in the future to avoid clearing the last changed text.

Re: Run test once a day near a given time?

Doh! I get it now. I hadn't thought of using the manual pause to make up for the gap between now and the next day when the single automatic pause setting will kick in.

Thanks