Hello KS soft
Im not bright enough to figure out if this is possible and if so how. What i would like to have is, the "Event: Account Lockout" (Test method: check NT event log) to return the value of the user logged out and not a massive string i would need to look into.
I figure tune up reply might be the answer, something along the lines of Reply = [%Reply% Getword 53] - However that doesnt seem to work. also tried serveral other variations of this to get word 53 from the string. However they all seem to fail. Im not sure if i misunderstand the "tune up reply" function or im not bright enough to figure how to make the "tune up reply function"... any help to point me towards the correct solution?
I did try and search the forum for any clues about this, but was unable to find any.
Tune up reply, Account Lockout
Re: Tune up reply, Account Lockout
1) Normally you should use "%SuggestedReply%" variable
Quote from the manual
IMPORTANT note: HostMonitor checks logical expressions after test check is done and "reverse alert" option is processed. I.e.
- HostMonitor performs the test;
- processes "Reverse alert" option;
- sets "suggested" macro variables (%SuggestedStatus%, %SuggestedSimpleStatus%, %SuggestedReply%, %SuggestedRecurrences% and %FailureIteration%) without touching regular counters (%Status%, %Reply%, %Recurrences%, etc);
- then HostMonitor checks "Warning" and "Normal" expressions, processes "Tune up Reply" option and finally modifies current test status and statistics counters (Status, Reply, Alive%, Passed tests, Failed tests, etc).
2) You should use quotation marks ' or " for variables that returns text (its safe to use quotation marks for numbers as well)
3) What exactly reply do you see without using expressions? Are you sure account name always on 53rd position?
Regards
Alex
Quote from the manual
IMPORTANT note: HostMonitor checks logical expressions after test check is done and "reverse alert" option is processed. I.e.
- HostMonitor performs the test;
- processes "Reverse alert" option;
- sets "suggested" macro variables (%SuggestedStatus%, %SuggestedSimpleStatus%, %SuggestedReply%, %SuggestedRecurrences% and %FailureIteration%) without touching regular counters (%Status%, %Reply%, %Recurrences%, etc);
- then HostMonitor checks "Warning" and "Normal" expressions, processes "Tune up Reply" option and finally modifies current test status and statistics counters (Status, Reply, Alive%, Passed tests, Failed tests, etc).
2) You should use quotation marks ' or " for variables that returns text (its safe to use quotation marks for numbers as well)
3) What exactly reply do you see without using expressions? Are you sure account name always on 53rd position?
Regards
Alex
Re: Tune up reply, Account Lockout
I found a better way via powershell to monitor this, with the script:
$statusAlive = "ScriptRes:Host is alive:"
$statusDead = "ScriptRes:No answer:"
$statusUnknown = "ScriptRes:Unknown:"
$statusNotResolved = "ScriptRes:Unknown host:"
$statusOk = "ScriptRes:Ok:"
$statusBad = "ScriptRes:Bad:"
$statusBadContents = "ScriptRes:Bad contents:"
$LockedoutAccounts = Search-ADAccount -LockedOut | Select -expand Name
if ($LockedoutAccounts -eq $null)
{echo $statusOk}
else
{echo $statusBad"Locked out user;$LockedoutAccounts"}
$statusAlive = "ScriptRes:Host is alive:"
$statusDead = "ScriptRes:No answer:"
$statusUnknown = "ScriptRes:Unknown:"
$statusNotResolved = "ScriptRes:Unknown host:"
$statusOk = "ScriptRes:Ok:"
$statusBad = "ScriptRes:Bad:"
$statusBadContents = "ScriptRes:Bad contents:"
$LockedoutAccounts = Search-ADAccount -LockedOut | Select -expand Name
if ($LockedoutAccounts -eq $null)
{echo $statusOk}
else
{echo $statusBad"Locked out user;$LockedoutAccounts"}
Re: Tune up reply, Account Lockout
Thank you for the update
Regards
Alex
Regards
Alex