Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Jul 2008
    Location
    Lansing, Moooochigan
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help using Op Reporting to email completion of admin script

    I need to generate an e-mail when my administrative script is complete (specifically, when reclaim is done and the DB backup is complete meaning it's time to take tapes out of library). I've read in this forum that this can be done with Hourly Monitors in Operational Reporting, as long as a rule can be written that detects the proper copnditions.

    Here is where I need help: Can someone post a Select statement that would either detect that there are one or more volumes in the library of type DBBackup, or that there are no Reclaim operations running? I could use a COUNT of greater than zero on the dbbackup volume type or a COUNT of greater than 0 for running reaclaim processes to trigger the monitor alert.

    With that in hand I think it's a simple matter of using that as an alert rule in an Hourly Monitor. Otherwise it appears impossible to get TSM to send an e-mail as part of the daily admin script. It would be easy if TSM were capable of launching an external batch or executable from within a script, or capable of outputting the results of a command line to a file from within a script. But, alas, neither seems to be possible. If versions later than 5.4 are natively capable of such a thing I would consider upgrading.

    TSM 5.4.2 Extended on Windows Server 2003R2, IBM TS3310 library (and no money to spend on add-ons or 3rd party apps).

    Thanks in advance.

  2. #2
    Moderator JohanW's Avatar
    Join Date
    Nov 2006
    Location
    Netherlands
    Posts
    986
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes you can launch an external batchfile from a script.
    Code:
    DEFINE CLIENTACTION NODE ACT=COMMAND OBJECT=script.cmd
    would start script.cmd on node NODE. script.cmd should be in the tsm/baclient/ directory, the node should use prompted scheduling. Call blat or something from the batchfile.

    There will be a slight delay before the one-time action is initiated by the server, you can't use it synchronously.

  3. #3
    Member
    Join Date
    Jul 2008
    Location
    Lansing, Moooochigan
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Right

    Thanks, Johan, I messed around with Define ClientAction a little, thought it pretty kludgy to have to involve a second machine that could disappear some time in the future. Plus the node I picked refuses to run a batch file as scheduled through ClientAction, and further, the one-time schedule and association that results never goes away (apparently). I ended up with a whole bunch of schedules with names like @5, @6, @7, etc that I had to clean out manually.

    I'm working on a single-machine option using a scheduled batch file and BMail that seems to be working. As soon as I finish testing it I'll post the batch file.

  4. #4
    Moderator JohanW's Avatar
    Join Date
    Nov 2006
    Location
    Netherlands
    Posts
    986
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I use the client on my server, so no second machine. The schedules disappear after a day here; can't figure out offhand why that is so, but it can be done.

  5. #5
    Member
    Join Date
    Jul 2008
    Location
    Lansing, Moooochigan
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OK, that makes sense. Has some advantages over the other way around, calling DSMADMC from the batch file. I'll try again using the server as the node.

  6. #6
    Member
    Join Date
    Jul 2008
    Location
    Lansing, Moooochigan
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up Works, sort of.

    OK, I can get the Tivoli server/node (in PROMPTED mode) to execute a command like BMAIL...., but it won't launch a batch file. Activity log just shows Failed and RC=1. Nothing in the Windows system log, only the same RC=1 message in the application log. No detail in the dsmsched.log file either.

    Is it legal to call a batch file from a Define ClientAction?

    Also, the one-time schedules are defaulting to a DURATION of 5 and a DURUNIT of DAYS. Anyone know where to adjust the Duration and DURUnit defaults for one-time schedules? It's not an option in the Define ClientAction command.

    Thanks,
    SR

  7. #7
    Member
    Join Date
    Jul 2008
    Location
    Lansing, Moooochigan
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Here's why I need a batch file


    While I can execute commands to send notification e-mails, most command-line e-mail apps require quotes for text like the subject and body of the message. Tivoli can't handle all the nested quotes on one line:

    BMAIL -s 10.10.43.18 -t fred@company.com -f Tivoli@company.com -a Test -b Test

    works fine, but

    BMAIL -s 10.10.43.18 -t fred@company.com -f Tivoli@company.com -a "Test Message" -b "Test from your friendly Tivoli Server"

    does not. Putting the line in a batch file works and makes the object of the define clientaction legal. But it refuses to run.

  8. #8
    Member
    Join Date
    Jul 2008
    Location
    Lansing, Moooochigan
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking Solved



    When launching a batch file from a DEFINE CLIENTACTION command, leave out the file extension. Using the object 'TAPES.BAT' will fail, but 'TAPES' will work. You just need to make sure that no other type of executable (.com, .exe ect) exists with the same name in the search path.

Similar Threads

  1. Operational Reporting email alert content
    By rmarkarian in forum TSM Reporting & Monitoring
    Replies: 3
    Last Post: 06-12-2008, 03:24 PM
  2. Operational Reporting are not sending email
    By davalex in forum TSM Reporting & Monitoring
    Replies: 5
    Last Post: 01-31-2008, 04:16 AM
  3. Mail notification at completion of script
    By epeterson in forum Scripting
    Replies: 2
    Last Post: 11-10-2005, 04:44 AM
  4. Error trying to send a test email for Op Reporting
    By robjohnston in forum TSM Reporting & Monitoring
    Replies: 0
    Last Post: 08-11-2005, 10:25 PM
  5. TSM Operational Reporting Technology EMAIL Question.
    By rpask in forum TSM Reporting & Monitoring
    Replies: 1
    Last Post: 10-14-2003, 04:18 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •