BB Unix Network Monitor - Message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: {bb} Monitor file deletion on Windows 2000?



That worked perfectly, thank you Henrik!
Shane


On 10/3/05, Henrik Storner <henrik-bb@hswn.dk> wrote:

Create an extension script for the BBNT client. It's very simple - you
configure a "Saved logs" directory (via the bbntcfg tool), then you
write a script to check whatever needs checking, and this script then
dumps a status file into that log-directory. The BBNT client then
feeds that file into BB as a new status.

E.g. for your particular problem, a simple .bat file would do:

   @echo off
   if exist d:\data\test.txt goto ok
   goto failed

   :ok
   echo "green File is ok" > c:\bb\logdir\files.tmp
   echo "The d:\data\test.txt file exists" >> c:\bb\logdir\files.tmp
   dir d:\data\test.txt >> c:\bb\logdir\files.tmp
   goto finish

   :failed
   echo "red File is NOT ok" > c:\bb\logdir\files.tmp
   echo "The d:\data\test.txt file is MISSING" >> c:\bb\logdir\files.tmp
   goto finish

   :finish
   ren c:\bb\logdir\files.tmp c:\bb\logdir\files

The file you create must have the color as the first word ("red" or
"green" here), and the name of the file becomes the name of the status
column. Which is why it cannot have an extension - files with an extension
in the log directory are ignored by the bbnt client.

To make sure the check runs regularly, you can add it to the list
of extension scripts in the bbntcfg tool.

There's a bit more info about creating scripts in the README that
comes with the BBNT client.


Henrik

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.


Home | Main Index | Thread Index