View previous topic :: View next topic |
Author |
Message |
Mogge
Joined: 04 Mar 2004 Posts: 83 Location: Denmark
|
Posted: Sun Aug 08, 2004 2:54 pm Post subject: Executing script... |
|
|
Hi!
I have 3 periods defined in "Schedules" - 1: Primary time, 2: Secondary time and 3: Other time. Together they cover 24/7. Is it possible to execure a HM script when the time moves from one period to another?
Regards
Mogge |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12801 Location: USA
|
|
Back to top |
|
|
Mogge
Joined: 04 Mar 2004 Posts: 83 Location: Denmark
|
Posted: Mon Aug 09, 2004 3:14 am Post subject: |
|
|
Hi Alex!
I need the execution to be controled by the schedules configured in profiles. The execution of the script is different for weekdays and weekends and we have the issue of hollydays to.
If I should use the Scheduler in Options I would need 30+ schedules...! I don't think it's a good idéa. And for maintainance reasons a possibility to have a HM script run at the start / end of a schedule would also solve the issue of hollydays.
Regards
Mogens |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12801 Location: USA
|
Posted: Mon Aug 09, 2004 1:35 pm Post subject: |
|
|
In this case you need 2 auxiliary tests:
1) Test1.
- Any test, e.g. Ping 127.0.0.1.
- Assign schedule that you need to check to the test
- Do not assign any action profile
2) Test2.
- This test should have predefined result. Ping 127.0.0.1 will be good in this case as well.
- This test must be dependant on expression ('%::Test1::Status%'=='Out of schedule'); OtherwiseStatus: Bad
- Synchronize status & alerts: Enabled
- Assign action profile that you need (Execute HMScript?)
Now:
- when time goes into restricted time interval: Test1 changes status to "Out of schedule" -> Test2 changes status to "Host is alive" (we are checking 127.0.0.1) -> "good" action will be executed
- when time goes into allowed time interval: Test1 changes status to "Host is alive" -> Test2 changes status to "Bad" (Otherwise status) -> "bad" action will be executed
Regards
Alex |
|
Back to top |
|
|
Mogge
Joined: 04 Mar 2004 Posts: 83 Location: Denmark
|
Posted: Wed Aug 18, 2004 7:48 am Post subject: |
|
|
Hi Alex
I'm now using your surgestion concerning excuting script using "tests". It works.
I'm not trying to sound stupid and not trying to "piss you off" but.... really... is this the way you wants us to solve a scheduled execution of a script connected with a specific schedule? To be very direct... I think it's a "miss-use" of a very good program and I'm feeling a bit strange "twisting" the arm of the program making the tests.
As an old programmer I know it can be difficult programming some part of a program but really... is the idea of an execution of a script connected to a schedule that difficult or is the idea just not usefull in your opinion?
Again - I'm not trying to piss you off but trying to get your opinion.
In the hope of a kind answer
Mogge |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12801 Location: USA
|
Posted: Wed Aug 18, 2004 11:19 am Post subject: |
|
|
Mogge,
Quote: | is the idea of an execution of a script connected to a schedule that difficult or is the idea just not usefull in your opinion? |
Nobody has asked about this option before, you are 1st. So, I assume this option is not really important.
Of course it can be very important in your case. But we can implement some option for single customer when its very easy to implement and changes will not have effect to rest of program. Anyway, we found workaroud...
Regards
Alex |
|
Back to top |
|
|
Mogge
Joined: 04 Mar 2004 Posts: 83 Location: Denmark
|
Posted: Thu Aug 19, 2004 2:26 am Post subject: |
|
|
Hi Alex
Thanks for the very kind answer
I look forward to that others will be asking the same change
/Mogge |
|
Back to top |
|
|
Mogge
Joined: 04 Mar 2004 Posts: 83 Location: Denmark
|
Posted: Thu Oct 21, 2004 7:29 am Post subject: Anyone asked ?? |
|
|
Hi
Have anyone asked yet?
/Mogge |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12801 Location: USA
|
Posted: Thu Oct 21, 2004 5:18 pm Post subject: |
|
|
Nop. Nobody
Regards
Alex |
|
Back to top |
|
|
|