Using logrotate to trim files that are created every 15 mins


 
Thread Tools Search this Thread
Operating Systems Linux Using logrotate to trim files that are created every 15 mins
# 1  
Old 07-22-2010
Using logrotate to trim files that are created every 15 mins

I have an application (puppet) that generates report files every 15 minutes in the format:
/var/lib/puppet/reports/hostname.fqdn/report-201007221515.yaml
/var/lib/puppet/reports/hostname.fqdn/report-201007221530.yaml
..

I only really need to keep one days worth of these reports and am trying to use logrotate to keep it to that:
Code:
/var/lib/puppet/reports/*/* {
  missingok
  maxage 2
  rotate 0
  daily
}

However it's now 22nd July but when I run logrotate I get messages like:
Code:
considering log /var/lib/puppet/reports/virtase3.fqdn/201007201358.yaml   
  log does not need rotating

Showing it's not seeing log files from 2 days ago as needing removal.

Any suggestions of what to add to my logrotate config?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Logrotate and Compressing only yesterdays files

Hello, I have a syslog server at home and am currently experiencing an issue where my logs will rotate and compress however it will rotate and compress yesterdays file and the newly created log file for the current day. When it does this however it will also create another new file for today... (9 Replies)
Discussion started by: MyUserName7000
9 Replies

2. Shell Programming and Scripting

How to select all files added to a directory in the past 5 mins (HP-UX)?

Hey everyone, I need to select all files that were added to a specific directory in the past 5 mins and copy them over to a different directory. I am using HP-UX OS which does not have support for amin, cmin, and mmin. B/c of this, I am creating a temp file and will use the find -newer command... (7 Replies)
Discussion started by: mattkoz
7 Replies

3. AIX

Logrotate - /etc/logrotate.conf does't exist

Hi Admins. I have installed logrotate rpm on Aix 6.1. After the installation of rpm, I don't find /etc/logrotate.conf file and /etc/logrotate.d dir . The config file is located in /opt/freeware/etc/logrotate.conf. When I ran logrotate -v /opt/freeware/etc/logrotate.conf I get below... (2 Replies)
Discussion started by: snchaudhari2
2 Replies

4. Shell Programming and Scripting

Logrotate - I am not able to rotate files using logrotate

I have written script which is working in Home directory perfectly and also compressing log files and rotating correctly. But, when i try to run script for /var/log/ i am able to get compressed log files but not able to get rotation of compressed log files. Please suggest. I am using below command... (5 Replies)
Discussion started by: VSom007
5 Replies

5. Red Hat

Logrotate not removing old files

Hi Guys, Need some help with the logrotate for one of our servers. I had setup a logrotation so that all files that go under old/ folder should be removed after one week. The log files are rotated daily from the main folder to old/ folder. (everything on one server) Below is the sample I am... (0 Replies)
Discussion started by: rockf1bull
0 Replies

6. UNIX for Advanced & Expert Users

how to logrotate log files

Hi, I have written a script that runs every five minutes in cron schedular. The Operating system is Fedora core 9. This script generates 2 log files, these log file size is increasing as some log data is being dumped into these 2 log files every five minutes. I need to logrotate these 2 files.... (1 Reply)
Discussion started by: renuka
1 Replies

7. UNIX for Advanced & Expert Users

logrotate with /etc/logrotate.conf file

Hi there, I want to rotate the logfiles which are located in /var/log/jboss/tomcat* so I have created a file named as 'tomat' in /etc/logrotate.d/tomcat with the following content. # cat /etc/logrotate.d/tomcat /var/log/jboss/tomcat_access_log*.log { daily nocreate ... (2 Replies)
Discussion started by: skmdu
2 Replies

8. UNIX for Dummies Questions & Answers

how to find the modified files before 60 mins?

hi, I need to find all the modified files before 60 minutes in a folder. Is that possible to find using mtime in minutes? Suggestions please. Thanks for looking into it... Geetha (8 Replies)
Discussion started by: iamgeethuj
8 Replies

9. Shell Programming and Scripting

Finding files which are modified few mins ago

Hi All, I have a requirement to find out the files which are modified in the last 10 minutes. I tried the find command with -amin and -mmin options, but its not working on my AIX server. Can anyone of you could help me. Thanks in advance for your help. Raju (3 Replies)
Discussion started by: rajus19
3 Replies

10. UNIX for Dummies Questions & Answers

files created within last 10 mins

Any simple 1 liners to check a directory to see if a file was created within the last 10 mins? (5 Replies)
Discussion started by: frustrated1
5 Replies
Login or Register to Ask a Question
PUPPET-MAN(8)							   Puppet manual						     PUPPET-MAN(8)

NAME
puppet-man - Display Puppet manual pages. SYNOPSIS
puppet man action DESCRIPTION
This subcommand displays manual pages for all Puppet subcommands. If the ronn gem (https://github.com/rtomayko/ronn/) is installed on your system, puppet man will display fully-formated man pages. If ronn is not available, puppet man will display the raw (but human-readable) source text in a pager. OPTIONS
Note that any configuration parameter that's valid in the configuration file is also a valid long argument, although it may or may not be relevant to the present action. For example, server is a valid configuration parameter, so you can specify --server <servername> as an argument. See the configuration file documentation at http://docs.puppetlabs.com/references/stable/configuration.html for the full list of acceptable parameters. A commented list of all configuration options can also be generated by running puppet with --genconfig. --mode MODE The run mode to use for the current action. Valid modes are user, agent, and master. --render-as FORMAT The format in which to render output. The most common formats are json, s (string), yaml, and console, but other options such as dot are sometimes available. --verbose Whether to log verbosely. --debug Whether to log debug information. ACTIONS
man - Display the manual page for a Puppet subcommand. SYNOPSIS puppet man subcommand DESCRIPTION Display the manual page for a Puppet subcommand. RETURNS The man data, in Markdown format, suitable for consumption by Ronn. RENDERING ISSUES: To skip fancy formatting and output the raw Markdown text (e.g. for use in a pipeline), call this action with '--render-as s'. EXAMPLES
man View the manual page for a subcommand: $ puppet man facts NOTES
The pager used for display will be the first found of $MANPAGER, $PAGER, less, most, or more. COPYRIGHT AND LICENSE
Copyright 2011 by Puppet Labs Apache 2 license; see COPYING Puppet Labs, LLC June 2012 PUPPET-MAN(8)