need a special config.
need a special config.
Hello community
I need a special community. We're running an SMTP-Cluster. Time by time, one of the backend-server's overloaded (which is desired and okay and can happen - so, everything is fine). BUT: we would like to isolate this one sub-server from the cluster (scripts are ready to use).
Now, I need the following configuration:
1. Test: shows "Server overload".
2. Test: should fire ONE command (either SSH-Logon and fire a command with parms, or should fire a bat-file - but I NEED TO HAVE the output of this script checked by HM).
1. Question:
How should I configure my test (which one should I use?) that it is only triggered by another host and NOT repeat checking (the 2. Test should only run when the 1. Test changes status).
2. Question:
How can I check the Return-Codes (scriptres:OK or scriptres:Bad) and alert within the 2. Test?
I know, I could just add the "action" in the first test, but I really need the scriptres-Result being checked by HostMonitor (hence the fact that we have more than one server in the cluster and therefore, more than one can be isolated - but only all-1. So, if the last server is also overloaded, we would have a serious problem and therefore cannot just isolate this last one as well). Our Bash-Script is testing everything and just reports the status "scriptres:OK or scriptres:Bad" back...
I hope, I was clear enough... yes, it is a special test case but it is exactly, what we need
kind regards
Pascal
I need a special community. We're running an SMTP-Cluster. Time by time, one of the backend-server's overloaded (which is desired and okay and can happen - so, everything is fine). BUT: we would like to isolate this one sub-server from the cluster (scripts are ready to use).
Now, I need the following configuration:
1. Test: shows "Server overload".
2. Test: should fire ONE command (either SSH-Logon and fire a command with parms, or should fire a bat-file - but I NEED TO HAVE the output of this script checked by HM).
1. Question:
How should I configure my test (which one should I use?) that it is only triggered by another host and NOT repeat checking (the 2. Test should only run when the 1. Test changes status).
2. Question:
How can I check the Return-Codes (scriptres:OK or scriptres:Bad) and alert within the 2. Test?
I know, I could just add the "action" in the first test, but I really need the scriptres-Result being checked by HostMonitor (hence the fact that we have more than one server in the cluster and therefore, more than one can be isolated - but only all-1. So, if the last server is also overloaded, we would have a serious problem and therefore cannot just isolate this last one as well). Our Bash-Script is testing everything and just reports the status "scriptres:OK or scriptres:Bad" back...
I hope, I was clear enough... yes, it is a special test case but it is exactly, what we need
kind regards
Pascal
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
It depend on how do you determine that Server is overloaded.which one should I use?
It can be CPU Usage test or Dominant process or SMTP,etc.
"2. Test" should be disabled.1. Question:
How should I configure my test (which one should I use?)
that it is only triggered by another host and NOT repeat checking (the 2. Test should only run when the 1. Test changes status).
"1. Test" may start Bad action "Run HMS script" with two commands:
EnableTest "2. Test"
RefreshTest "2. Test"
"2. Test" should start "Run HMS script" action (for Bad and Good status) with the following HMS script:
DisableTestByID %TestID%
You may use ShellScript test with the following settings:2. Question:
How can I check the Return-Codes (scriptres:OK or scriptres:Bad) and alert within the 2. Test?
Start CMD: cmd /c %Script% %Params%
Script (Example):
Code: Select all
@echo off
echo scriptRes:Ok:My Script Reply
E.G.
ScriptRes:Unknown:My Reply
ScriptRes:Ok:My Reply
ScriptRes:Bad:My Reply
great, did that, thank you. Now an additional Question: can I parse something like the trigger test-name to the hms-script so that I don't have to make one script for each backend-host?"2. Test" should be disabled.
"1. Test" may start Bad action "Run HMS script" with two commands:
EnableTest "2. Test"
RefreshTest "2. Test"
did that, thank you."2. Test" should start "Run HMS script" action (for Bad and Good status) with the following HMS script:
DisableTestByID %TestID%
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
You may add test name("2. Test") to Comment line (e.g. Comment line 3) field of "1. Test" and modify HMS script:great, did that, thank you. Now an additional Question: can I parse
something like the trigger test-name to the hms-script so that I don't have to make one script for each backend-host?
EnableTest %CommentLine3%
RefreshTest %CommentLine3%
hmm, now, when I try to execute the bat-file, I'm getting as a reply to HostMonitor:
any idea?
just found this:
http://www.ks-soft.net/cgi-bin/phpBB/vi ... le+invalid
I have a Shell Script defined
Start cmd: %Script% %Params%
Script: "C:\Program Files (x86)\HostMonitor\Scripts\smtpsrv\isolate.bat" %1 %2
Params: stop smtpsrvX
Gives me the above error.
But the script seems to run fine - and if I execute it from the command line, it works without any Problem (gives me back:)Unable to read from standard input: The handle is invalid.
any idea?
(this "Server not disabled" is okay in that case...)scriptres:OK:Server not disabled (smtpsrvX)
just found this:
http://www.ks-soft.net/cgi-bin/phpBB/vi ... le+invalid
I have a Shell Script defined
Start cmd: %Script% %Params%
Script: "C:\Program Files (x86)\HostMonitor\Scripts\smtpsrv\isolate.bat" %1 %2
Params: stop smtpsrvX
Gives me the above error.
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Yes, didn't help in that case. Any other hint would be appreciatedKS-Soft Europe wrote:Could you try to add/modify "SScript_UseWindowsPipe=0" line in [Misc] section of hostmon.ini file and restart HostMonitor?
this is absolutely weird... I could solve this issue. There was a file in the "C:/"-Root, called "Program". It prevented me to start the service. The file got placed there when I shut down HostMonitor (but it doesn't look like it's a HM-Issue!). I'm just writing it down here so that in case it happens to someone else, he's able to solve it. Even: my root problem is not solved, but it's not urgent.Now, I can't start HostMonitor anymore using the Service-Section in Windows SRV (2008, 64 bit), Error 193, 0xc01
I can start it manually... I might do that as I don't want to reboot the server right now...
It keeps dying, even with the 9.5-Version... except if I open it manually (not use the "service"-Function (also, not use the /service-Parm)
In the system log, I can find: "is not a valid W32-Process"...
Do you mean HostMonitor service does not start when there is "c:\program" file on the disk?There was a file in the "C:/"-Root, called "Program". It prevented me to start the service. The file got placed there when I shut down HostMonitor (but it doesn't look like it's a HM-Issue!).
HostMonitor does not create such file (unless you setup c:\program as target for some log or report file or use some custom script).
Do you mean "Unable to read from standard input: The handle is invalid." error?I'm just writing it down here so that in case it happens to someone else, he's able to solve it. Even: my root problem is not solved, but it's not urgent.
Regards
Alex
exactly. Yes, I didn't mean to blame this on HostMon-Software... it looks like a Windows-Problem. Just wanted to write it down how to solve for others.Do you mean HostMonitor service does not start when there is "c:\program" file on the disk?
HostMonitor does not create such file (unless you setup c:\program as target for some log or report file or use some custom script).
yes, right. I'm still facing the same issue. Workaround doesn't seem to work, not even switching to "SSH Test"-Method (see http://www.ks-soft.net/cgi-bin/phpBB/vi ... php?t=5311). Any other idea?Do you mean "Unable to read from standard input: The handle is invalid." error?
my hostmon.ini [Misc] section:
Code: Select all
[Misc]
[...]
SScript_UseWindowsPipe=0
This cannot be executed. BAT file is not executable file.I have a Shell Script defined
Start cmd: %Script% %Params%
Script: "C:\Program Files (x86)\HostMonitor\Scripts\smtpsrv\isolate.bat" %1 %2
Params: stop smtpsrvX
Should be
Start cmd: cmd /c "C:\Program Files (x86)\HostMonitor\Scripts\smtpsrv\isolate.bat" %Params%
Script: <empty>
Params: stop smtpsrvX [/quote]
Regards
Alex
Hey.KS-Soft wrote:HostMonitor started as service? Application? Acount used to run HostMonitor?
UAC enabled?
Service Pack?
Antivirus monitor?
Started as service? Yes
Account used? System Account
UAC enabled. Disabling it needs reboot, I think.
Windows Server 2008, R2 Standard, SP1, 64-bit
no AntiVirus on this Machine
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact: