Hello people!
I need an output of all strings (parsed with regex) from a logfile. Not only the summary number of string , I need the strings itself.
How can I realize this?
I'm not a perl programmer :-(
Sounds like you're looking for output from grep.
Grep is available in any *nix command shell, or under Windows when using Cygwin or Gnutils.
If you really want to do this with Perl then read a single line from the file, check for the target substring within the line that is read, if substring position >= 0 then output the read line, else loop back to start.
I'd strongly suggest getting the O'Reilly Perl In A Nutshell book.
Are you talking about SAM Log Parser (Perl) Template?
The script has to return some number - the number is then evaluated by comparation to threshold and status of monitor is comupted.
What should then Orion do with the string it gets from your script? It excpects numerical value to compute status.
What do you want to achieve? Why do you want to return string fromyour script?
I need to extract and list all "critical" messages from a logfile.
Are you trying to do this from a command line or from an Orion module?
Sounds like something that may be better suited for Kiwi Log Viewer.