Hi guys
I am struggling to get 24/7 and 0800-1800 m-f alerts on different devices.
Currently i have them container based, so i can just say "anything in 24/7 container just alert" and stop event processing
The problem comes with the weekday alerts
i have tried to find details in the forums and found weekdays and the times, my issue is how do i add BOTH of these!
my example i have mushed together is -
sub main()
{
now = localtime();
return (now->hour >= 8) && (now->hour < 18);
t = localtime();
return (t->wday >= 1) && (t->wday <= 5);
}
Basically this will only send an alert for issues between 0800- 1800 Monday to Friday..
My next problem will be to create alarms if they are still down come 0800!
I have also created an event which will raise and alarm and not email, as i was finding the device offline but no alarm in the object..
I really am struggling to validate if the rules work, i changed to sat/sun, to test and changed the time, but they both need to be true..
Thanks