Share

check_logfiles

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

Many log files, wildcard filename matching?

You are viewing a single message from this topic. View all messages.

  1. 2007-10-26 23:26:16 UTC
    Hi Anthony,

    do these logfiles change or appear and disappear?
    The config file is just a piece of perl code. You can do the following:

    @searches = ();
    foreach my $logfile (glob 'C:\path\*.log') {
    push(@searches, {
    tag => basename($logfile),
    logfile => $logfile,
    options => 'noperfdata',
    criticalpatterns => .....
    });
    }

    If your logfiles don't change, you could also number the tags:
    @searches = ();
    my $count = 1;
    foreach my $logfile (glob 'C:\path\*.log') {
    push(@searches, {
    tag => 'tagxy'.$count++,
    ....

    Gerhard
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.