Hello all,
I am a new AHM user, and so far so good; it's a great piece of software. Obviously we would like to automate as much work as we can and proactively monitor potential issues, and for us and our customers this includes ensuring that Backup Exec has successfully completed overnight.
I have come across this thread that includes a very nifty looking script by Marcus; I've run it as a batch file and it does what it is supposed to. The PEBKAC issue today is, how on earth do I monitor the output from this script, to check for the "Job completion status:" line near the bottom of the log? There is an RMA installed on each server, but I am unsure as to what to set up as a monitor within the Host Monitor interface. I also don't understand how to use the .ini file in the same post by Marcus. I have read the manuals "Shell script" section but things are not clearer. Do I need to save the script (and a .ini) on each remote server I want to test? Do I need to add a new script in the Script Manager interface? I guess I need to test as a Shell Script, but where do I specify what to look for?
Any help would be greatly appreciated!
Thanks,
Lee
Backup Exec logs (script by Marcus)
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Re: Backup Exec logs (script by Marcus)
Thank you.lee wrote:I am a new AHM user, and so far so good; it's a great piece of software.
Actually, you may use "Compare Files" test method with "alert when file does not contain a specified string" option. http://www.ks-soft.net/hostmon.eng/mfra ... tm#filecmplee wrote:Obviously we would like to automate as much work as we can and proactively monitor potential issues, and for us and our customers this includes ensuring that Backup Exec has successfully completed overnight.
"Compare Files" test method support Date macros, so with enabled "Translate Macros" option you may check files created every day using one template like "C:\Apps\VERITAS\Backup Exec\NT\Data\bex%yyyy%%mm%%dd%*".
The script posted by Marcus, is not designed for HostMonitor. You should manually tune it to match "Schell Script" requirements:lee wrote:I have come across this thread that includes a very nifty looking script by Marcus; I've run it as a batch file and it does what it is supposed to. The PEBKAC issue today is, how on earth do I monitor the output from this script, to check for the "Job completion status:" line near the bottom of the log?
Code: Select all
Requirements to the script:
The following rules must be obeyed when creating a script:
The script or external program must write to stdout (standard output stream) single result string. This string should contain 3 parts separated by colon (:).
1. First obligatory part - marker "scriptres" tells to HostMonitor or RMA that this string is the result string.
2. Second obligatory part represents the test status, it can take one of the following values (case insensitive):
Status string Comment
Host is alive status means " script executed successfully, target system correctly responds"
No answer script executed successfully, target system does not respond
Unknown status means "test cannot be performed for some reason"
Unknown host use this status when script cannot resolve target host name into IP address
Ok script executed, result satisfies (some) requirements
Bad script executed, result does not satisfy (some) requirements
Bad contents use this status if script found some error in monitored file, web page, etc
3. Third optional part contains Reply value, HostMonitor displays this value in Reply field, writes to log files, uses to displays charts (Log Analyzer), etc. If you want Log Analyzer to process Reply values correctly and display charts, use one of the following formats for Reply value:
* decimal_number (like "123", "0", "6456.45". as decimal separator use symbol that is specified on your system, usually a dot (.) or a comma (,))
* decimal_number + space + "Kb" (like "512 Kb", "64 Kb")
* decimal_number + space + "Mb" (like "1024 Mb", "5 Mb")
* decimal_number + space + "Gb" (like "12 Gb", "4 Gb")
* decimal_number + space + "%" (like "50 %", "99 %")
* decimal_number + space + "ms" (like "100 ms", "5400 ms")
Several examples:
String printed by script "Status" of the test "Reply" field of the test
scriptres:Host is alive:1000 ms Host is alive 1000 ms
scriptres:Unknown host: Unknown host
scriptres:Ok:300 Kb Ok 300 Kb
scriptres:Bad:90 % Bad 90 %
That's it. Everything else is entirely up to you
Code: Select all
type "%STR_DIRECTORY%\%STR_LOGFILE%" | find "Job completion status: Successful" > NUL
IF ERRORLEVEL 1 (
echo ScriptRes:Bad:Some error occured
) ELSE (
echo ScriptRes:Ok:JobCompleted successfully
)
Yes, you do need to add new script into "Script Manager". Marcus uses .ini file to read parameters. You may specify parameters into .ini file and place it into RMA folder on each server. On the other hand, you may specify appropriate params in "Setting defaults" section of Marcus script or pass such values as a parameters.lee wrote:There is an RMA installed on each server, but I am unsure as to what to set up as a monitor within the Host Monitor interface. I also don't understand how to use the .ini file in the same post by Marcus. I have read the manuals "Shell script" section but things are not clearer. Do I need to save the script (and a .ini) on each remote server I want to test? Do I need to add a new script in the Script Manager interface? I guess I need to test as a Shell Script, but where do I specify what to look for?
Regards,
Max
Re: Backup Exec logs (script by Marcus)
First of all, thank you for the extremely prompt reply!

Thanks again for the prompt, very detailed reply; just a shame it doesn't apply for later versions!
Unfortunately, Backup Exec doesn't name reports in that format, hence the script by MarcusKS-Soft Europe wrote:Actually, you may use "Compare Files" test method with "alert when file does not contain a specified string" option. http://www.ks-soft.net/hostmon.eng/mfra ... tm#filecmp
"Compare Files" test method support Date macros, so with enabled "Translate Macros" option you may check files created every day using one template like "C:\Apps\VERITAS\Backup Exec\NT\Data\bex%yyyy%%mm%%dd%*".

That would explain why I couldn't immediately see how to use it. However it seems that later versions (10d+) of Backup Exec (running on roughly half our customers) log to .MDF and .LDF files, so I have created several event log monitors instead, which has worked over this bank holiday weekend (the backups failed on purpose).The script posted by Marcus, is not designed for HostMonitor. You should manually tune it to match "Schell Script" requirements:
Thanks again for the prompt, very detailed reply; just a shame it doesn't apply for later versions!