This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

How to read log files

FormerMember
FormerMember
We have SolarWind monitoring tool which we are using to monitor the network services and servers. We want to know if it is possible to read through the log files and send alerts using the SolarWind tool. We have different applications and some of the applications logs in the application specific errors into the log files on that server folders. Is it possible to read through the log files at scheduled time and send alerts?
  • What type of log files are you talking about? Do you mean the Windows EventViewer logs?

  • FormerMember
    0 FormerMember in reply to aLTeReGo
    quote:Originally posted by aLTeReGo

    What type of log files are you talking about? Do you mean the Windows EventViewer logs?




    These log files are just text files. Not the event viewer files. These servers will create error files for each process. For ex: it creates adminnotify.log file with the following text:

    NotifyHndlrEvt HndlrErrors 1 0 2007-04-05 09:33:56 SBL-ADM-09217: Error occurred in invoking the notification handler in dll [ssemailntfy] for doing notification configured in named subsystem [AdminEmailAlert] for component [TxnRoute]

    GenericLog GenericError 1 0 2007-04-05 10:34:00 Message with subject "Notification message from enterprise [ENT], Siebel, and component alias: [TxnRoute]" could not be sent to CHANGE_ME since no sender specified and neither "Default From Address" or "Default Administrator Address" were specified for the SMTPSubsystem

    GenericLog GenericError 1 0 2

    NotifyHndlrEvt HndlrErrors 1 0 2007-04-05 10:34:00 From address not specified and no default found

    NotifyHndlrEvt HndlrErrors 1 0 2007-04-05 10:34:00 SBL-ADM-09217: Error occurred in invoking the notification handler in dll [ssemailntfy] for doing notification configured in named subsystem [AdminEmailAlert] for component [TxnRoute]

    From above log file, I want monitoring tool to send me an alert whenever it finds the text "From address not specified" in the log file.
  • I would like to do the same thing?  Is this possible?

  • This is possible using a custom script monitor. I'm a fan of using powershell to grab this with a Regex match. Something like Get-Content, match a string, and then do some work with it to provide feedback to SAM. You'll want to have at a minimum a Statistic and message, and you can use Exit codes as well.

    I believe exit codes for SAM are:

    0 up, 1 down, 2 warning, 3 critical, any other value unknown