Monitor rotating Log folder

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Monitor rotating Log folder

Post by WillemDH »

Hello,

How do I configure NxLog to send rotating logs to NLS? See screenshot. Every day a logfile is created by NetBackup. The logfiles are named by date.

Grtz

Willem
You do not have the required permissions to view the files attached to this post.
Nagios XI 5.8.1
https://outsideit.net
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Monitor rotating Log folder

Post by jolson »

Please see the attached nxlog manual. Section 6.2.4 may be of interest to you (im_file).
You do not have the required permissions to view the files attached to this post.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
gsl_ops_practice
Posts: 151
Joined: Thu Apr 09, 2015 9:14 pm

Re: Monitor rotating Log folder

Post by gsl_ops_practice »

Hello,

Just reading the attached doc, I'd like a confirmation that all I need to do is run the setup script and give a wildcard in the filename? We have a few application logs that have the current date as the extension.

Code: Select all

bash setup-linux.sh -s logserver.name -p 5544 -f linuxfile.* -t FILE_TAG 
Thank you,
Alex
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Monitor rotating Log folder

Post by jolson »

It looks like those logs reside on a Windows host, in which case you'll need to configure nxlog to set up the watching of your files as opposed to running the linux setup script. You should be able to follow the 'Windows File' setup guide and replace a specific file with a wildcard with no problems.

Code: Select all

    # Watch your own files
    <Input windowsfile>
        Module   im_file
        File     'C:\path\to\target\file\*'
        SavePos  TRUE
        Exec     $Message = $raw_event;
    </Input>
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Locked