KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

Backup Exec logs (script by Marcus)

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
lee



Joined: 03 May 2007
Posts: 4

PostPosted: Thu May 03, 2007 6:11 am    Post subject: Backup Exec logs (script by Marcus) Reply with quote

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
Back to top
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Thu May 03, 2007 6:57 am    Post subject: Re: Backup Exec logs (script by Marcus) Reply with quote

lee wrote:
I am a new AHM user, and so far so good; it's a great piece of software.
Thank you.

lee 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.
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/mframe.htm#tests.htm#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%*".

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?
The script posted by Marcus, is not designed for HostMonitor. You should manually tune it to match "Schell Script" requirements:
Code:
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

So, to handle "Job completion status:" line you may change type "%STR_DIRECTORY%\%STR_LOGFILE%" line in marcus script with the following code:
Code:
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
)


So, now you may try to use script with "Shell Script" test method. But, it is not enough. You also should handle "ShowError" procedure in the same way.

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?
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.

Regards,
Max
Back to top
View user's profile Send private message Send e-mail Visit poster's website
lee



Joined: 03 May 2007
Posts: 4

PostPosted: Tue May 08, 2007 3:01 am    Post subject: Re: Backup Exec logs (script by Marcus) Reply with quote

First of all, thank you for the extremely prompt reply!

KS-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/mframe.htm#tests.htm#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%*".

Unfortunately, Backup Exec doesn't name reports in that format, hence the script by Marcus

Quote:
The script posted by Marcus, is not designed for HostMonitor. You should manually tune it to match "Schell Script" requirements:

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).

Thanks again for the prompt, very detailed reply; just a shame it doesn't apply for later versions!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index