Information: Forum is in read-only mode
For details and other support options see https://www.adiscon.com/news/support-forum-set-to-read-only-mode/

Folder and Subfolder

General discussions here

Moderator: alorbach

Google Ads


Folder and Subfolder

Postby fabioccoelho » Tue May 05, 2015 11:18 pm

Hi all, I've in my syslog server one folder named /var/log/Servers and inside this folders I've subfolders with server name and year folder, month folder, day folder and syslog file name, like this:

/var/log/Servers/ServerName/2015/05/05/syslog

The month and the day of subfolder is updated for each month/day. I can configure any sintaxe like %year%month%day ?

How can I configure Loganalyzer to get data from this folder / subfolders?


Thanks.
fabioccoelho
New
 
Posts: 5
Joined: Tue May 05, 2015 11:05 pm

Urgent Question?

  • Pulling out your Hair?
  • Wasting Time and Money?
  • Deadline Approaching?

Re: Folder and Subfolder

Postby teifler » Wed May 06, 2015 11:03 am

Hi,

yes that's possible! Below you can find a example for your case, you simply have to insert the right server name!
Code: Select all
/var/log/Servers/ServerName/%Y/%m/%d/syslog


Just for information: The (%Y) stands for the Year with 4 digits, the (%m) for Month with 2 digits and the (%d) stands for the day with two digits.


Please note that upper-case and lower-case of the letters are different options, below you can find a list of the options:
Code: Select all
"%y" = Year with two digits (e.g. 2002 becomes "02")
"%Y" = Year with 4 digits
"%m" = Month with two digits (e.g. March becomes "03")
"%M" = Minute with two digits
"%d" = Day of month with two digits (e.g. March, 1st becomes "01")
"%h" = Hour as two digits
"%S" = Seconds as two digits. It is hardly believed that this ever be used in reality. 
"%w" = Weekday as one digit. 0 means Sunday, 1 Monday and so on.
"%W" = Weekday as three-character string. Possible values are "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat".


I hope this answers your question!

Best regards,
Tim Eifler
teifler
Frequent Poster
 
Posts: 56
Joined: Mon Sep 05, 2011 9:49 am

Re: Folder and Subfolder

Postby fabioccoelho » Wed May 06, 2015 2:00 pm

Thanks very much... I'll test and return with sucessful response :D


[ ]'s
fabioccoelho
New
 
Posts: 5
Joined: Tue May 05, 2015 11:05 pm

Re: Folder and Subfolder

Postby fabioccoelho » Thu May 07, 2015 3:07 pm

Hi, your configuration works fine :-D between I've a lot of servers.. I can replace servers folder by %h ? What variable name for hosts?
fabioccoelho
New
 
Posts: 5
Joined: Tue May 05, 2015 11:05 pm

Re: Folder and Subfolder

Postby teifler » Fri May 08, 2015 8:42 am

Hi,

there is no variable for the hostname because it's not possible to detect them. I think the best solution for you is to create a own source for every server.

I hope this helps ;)
teifler
Frequent Poster
 
Posts: 56
Joined: Mon Sep 05, 2011 9:49 am

Re: Folder and Subfolder

Postby fabioccoelho » Wed May 13, 2015 2:49 pm

Thanks @teifler. My loganalyzer server is getting another error. When I put the path to the syslog file, it gives this error:

The source 'Server02' checking returned with an error: 'Syslog file could not be found'.

But the path is correct!


Any idea?
fabioccoelho
New
 
Posts: 5
Joined: Tue May 05, 2015 11:05 pm

Re: Folder and Subfolder

Postby fabioccoelho » Wed May 13, 2015 6:22 pm

fabioccoelho wrote:Thanks @teifler. My loganalyzer server is getting another error. When I put the path to the syslog file, it gives this error:

The source 'Server02' checking returned with an error: 'Syslog file could not be found'.

But the path is correct!


Any idea?


Solved ... just permissions on syslog file

Thanks ;-)
fabioccoelho
New
 
Posts: 5
Joined: Tue May 05, 2015 11:05 pm

Google Ads



Return to General

Who is online

Users browsing this forum: No registered users and 2 guests

cron