Hi,
I would like to know how Hostmon receives data returned from SQL Server. I am using a powershell script to check the size of some table that grow rapidly and would like to show the size in hostmon.
Thanks
Receiving data from SQL Server (sqlcmd) in Hostmon
-
- Posts: 10
- Joined: Wed Jul 23, 2014 8:37 am
- Location: United States
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
You may use Shell Script test:
http://www.ks-soft.net/hostmon.eng/mfra ... m#chkShell
Your powershell script should echo text in the following format:
ScriptRes:<test status>:<Reply text>
e.g:
ScriptRes:Ok:My reply text or value
ScriptRes:Bad:100 Mb
ScriptRes:Host is alive:My reply text or value
ScriptRes:No answer:My reply text or value
ScriptRes:Unknown:My reply text or value
ScriptRes:Unknown host:My reply text or value
ScriptRes:Bad contents:My reply text or value
Please note, you may check powershell script examples in Script Manager.
http://www.ks-soft.net/hostmon.eng/mfra ... m#chkShell
Your powershell script should echo text in the following format:
ScriptRes:<test status>:<Reply text>
e.g:
ScriptRes:Ok:My reply text or value
ScriptRes:Bad:100 Mb
ScriptRes:Host is alive:My reply text or value
ScriptRes:No answer:My reply text or value
ScriptRes:Unknown:My reply text or value
ScriptRes:Unknown host:My reply text or value
ScriptRes:Bad contents:My reply text or value
Please note, you may check powershell script examples in Script Manager.
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
On the other hand, you may use ODBC query test to retrieve data using SQL queries:
http://www.ks-soft.net/hostmon.eng/mfra ... s.htm#odbc
http://www.ks-soft.net/hostmon.eng/mfra ... s.htm#odbc