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:
However it's now 22nd July but when I run logrotate I get messages like:
Showing it's not seeing log files from 2 days ago as needing removal.
Any suggestions of what to add to my logrotate config?
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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT DEBIAN
puppet-device
PUPPET-DEVICE(8) Puppet manual PUPPET-DEVICE(8)NAME
puppet-device - Manage remote network devices
SYNOPSIS
Retrieves all configurations from the puppet master and apply them to the remote devices configured in /etc/puppet/device.conf.
Currently must be run out periodically, using cron or something similar.
USAGE
puppet device [-d|--debug] [--detailed-exitcodes] [-V|--version]
[-h|--help] [-l|--logdest syslog|<file>|console]
[-v|--verbose] [-w|--waitforcert <seconds>]
DESCRIPTION
Once the client has a signed certificate for a given remote device, it will retrieve its configuration and apply it.
USAGE NOTES
One need a /etc/puppet/device.conf file with the following content:
[remote.device.fqdn] type type url url
where: * type: the current device type (the only value at this time is cisco) * url: an url allowing to connect to the device
Supported url must conforms to: scheme://user:password@hostname/?query
with: * scheme: either ssh or telnet * user: username, can be omitted depending on the switch/router configuration * password: the connec-
tion password * query: this is device specific. Cisco devices supports an enable parameter whose value would be the enable password.
OPTIONS
Note that any configuration parameter that's valid in the configuration file is also a valid long argument. For example, 'server' is a
valid configuration parameter, so you can specify '--server servername' as an argument.
--debug
Enable full debugging.
--detailed-exitcodes
Provide transaction information via exit codes. If this is enabled, an exit code of '2' means there were changes, an exit code of
'4' means there were failures during the transaction, and an exit code of '6' means there were both changes and failures.
--help Print this help message
--logdest
Where to send messages. Choose between syslog, the console, and a log file. Defaults to sending messages to syslog, or the console
if debugging or verbosity is enabled.
--verbose
Turn on verbose reporting.
--waitforcert
This option only matters for daemons that do not yet have certificates and it is enabled by default, with a value of 120 (seconds).
This causes +puppet agent+ to connect to the server every 2 minutes and ask it to sign a certificate request. This is useful for the
initial setup of a puppet client. You can turn off waiting for certificates by specifying a time of 0.
EXAMPLE
$ puppet device --server puppet.domain.com
AUTHOR
Brice Figureau
COPYRIGHT
Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License
Puppet Labs, LLC June 2012 PUPPET-DEVICE(8)