Hi,
Is there any interest in supporting other substitutions in the path
component of the pmlogger control file? Something like the following,
or any other suggestions on how to achieve the same goal? (Obviously the
same change in pmlogger_daily)
--- pmlogger_check.sh 2015-09-18 15:31:31.000000000 +0000
+++ /usr/libexec/pcp/bin/pmlogger_check 2015-10-14 15:57:21.159413586
+0000
@@ -460,6 +460,12 @@
dir=`echo $dir | sed -e "s;LOCALHOSTNAME;$dir_hostname;"`
[ "x$host" = "xLOCALHOSTNAME" ] && host=local:
+ dir_date_day=`date "+%Y%m%d"`
+ dir=`echo $dir | sed -e "s;LOCALDAY;$dir_date_day;"`
+
+ dir_date_month=`date "+%Y%m"`
+ dir=`echo $dir | sed -e "s;LOCALMONTH;$dir_date_month;"`
+
$VERY_VERBOSE && echo "[$controlfile:$line] host=\"$host\"
primary=\"$primary\" socks=\"$socks\" dir=\"$dir\" args=\"$args\""
case "$host"
Currently we keep roughly six months worth of data and have a cron
script that archives to a date based directory after a certain time to
keep a nice hierarchy of archive files. But it would be great just to
put things where we want them at creation time.
If this is too much of a specific change for just our use, no problem,
we can work around it.
Thanks
Martins
|