Tune up reply, Account Lockout

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
PLP1
Posts: 4
Joined: Mon Mar 03, 2025 3:50 am

Tune up reply, Account Lockout

Post by PLP1 »

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.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Re: Tune up reply, Account Lockout

Post by KS-Soft »

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
PLP1
Posts: 4
Joined: Mon Mar 03, 2025 3:50 am

Re: Tune up reply, Account Lockout

Post by PLP1 »

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"}
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Re: Tune up reply, Account Lockout

Post by KS-Soft »

Thank you for the update

Regards
Alex
Post Reply