View previous topic :: View next topic |
Author |
Message |
doddsy
Joined: 10 Jun 2003 Posts: 9
|
Posted: Mon May 09, 2005 8:19 pm Post subject: Import File |
|
|
Is there a definitive list of options for the import file? http://www.ks-soft.net/hostmon.eng/examples/import1.htm Doesn't appear to have all the details for things such as setting the display mode for a ping test. Apart from DisplayMode = Received being used for setting the display to % of Received, what are the other valid values for DisplayMode.
Is there an option for importing a test with an initial disabled status similar to the gui.
Thanks
Doddsy |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Tue May 10, 2005 12:03 am Post subject: |
|
|
H'm, looks like some options is not documented
Possible values for "DisplayMode":
DisplayMode = time
DisplayMode = lost
DisplayMode = received
To import "disabled" test add following line
Disabled = Yes
Regards
Alex |
|
Back to top |
|
|
doddsy
Joined: 10 Jun 2003 Posts: 9
|
Posted: Tue May 10, 2005 12:29 am Post subject: |
|
|
aaargh I just wrote an import program to add and edit tests from a SQL source. The deletion part involved a two step process that created a HMS script to disable monitors (not delete as we need the historical data) during a "bad" action and then run the dynamically created script during the "good" action. If I had of known of "Disabled = Yes" in the modify script then I wouldn't have had to create the disable hack in the first place.
Well getting my disable hack working meant that the company was convinced that AHM can be integrated into their management system and there should be a nice payment receipt for an Enterprise License and Lifetime updates in your inbox Alex!!
Now if only a HMS script could call another HMS script. Hint hint. |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Tue May 10, 2005 8:27 am Post subject: |
|
|
If you want to disable some tests, probably you don't need import file? May be you can use HMScript with DisableTest command?
Or list of tests that should be disabled dynamically imported from database?
Regards
Alex |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Tue May 10, 2005 8:29 am Post subject: |
|
|
Quote: | Now if only a HMS script could call another HMS script. |
You want to use some script as procedure for another scripts?
Regards
Alex |
|
Back to top |
|
|
doddsy
Joined: 10 Jun 2003 Posts: 9
|
Posted: Tue May 10, 2005 3:54 pm Post subject: |
|
|
If I have a HMS script that checks a DB for tests to disable and then creates another HMS script with "DisableTest" commands to disable them, the easiest way to run the second HMS script would be to have a command such as "ExecuteHMS" at the end of the first script. I don't need it anymore for this integration project but it would be handy for dynamically changing AHM. |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Wed May 11, 2005 3:05 pm Post subject: |
|
|
I see. But there is another simple workaround - use 2 "Execute HMS script" actions in the same profile. 1st action starts script that checks DB and generates 2nd script. 2nd action starts created script.
Regards
Alex |
|
Back to top |
|
|
doddsy
Joined: 10 Jun 2003 Posts: 9
|
Posted: Wed May 11, 2005 5:17 pm Post subject: |
|
|
So the second script will not execute until the first one finishes? |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Wed May 11, 2005 11:29 pm Post subject: |
|
|
Correct |
|
Back to top |
|
|
|