Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unicenter and logfiles 1

Status
Not open for further replies.

garciama

MIS
Feb 21, 2002
5
US
We are in the middle of a tool migration and will be looking for lots of help as our company has shunted training for the time being.

That being said, here is one of our top dilemmas. We are trying to create log watcher to pick out errors. The logfile that we are looking at gets archived everyday and each new file has the date specified in it.

sample filename(taken from a real one):
d:\sitescope\logs\Sitescope2003_04_01.log

We need to be able to set the date "YYYY_MM_DD" as a variable otherwise this will not work for us.

I know that there is a parameter in TNG that will pick out a date in the YYYYMMDD format, but one is not able to break that format apart with "_". Does anyone have any insight on how we can get around this? or if there is another way to pick out the logfile?

Thanks,
Marty
 
Hi! We have done this with a VBScript that runs every day at 00:00. The script stops the logagent, makes a configset from the logagent and changes the filename in the configset to todays date, loads the configset and starts the agent.
 
Hello!

I think you could try with the wildcard:
d:\sitescope\logs\Sitescope*.log

Regards
Leandro
 
Ehrnell,
Thanks for your post. It gave us a good direction to go. We will be looking at doing the same type of script in Perl. We will also be looking at other built-in functionality within SiteScope.


Leandro,
Thanks for the input; however, if we were to use '*' we would pickup every logfile in that directory. This would still require us to write a script of some sort to ensure that the file was copied out every few seconds, or to make sure that there were no other logs in that directory.

 
We have got over a similar thing by writing a simple script to create a shortcut with the name Unicenter can use, then defining that in the logAgent.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top