Skip to content

Commit 00b97af

Browse files
committed
Remove verbose output and stop redirecting output
Prior to this commit, we included --verbose on the vacuumdb command so that we could see the command was working. It turns out that verbose output goes to STDERR and thus can't be redirected to a file seperate from actual error messages. After this commit, we no longer try to redirect output to any files. Instead we remove the verbose output and hope that when an error occurs it'll actually fire off a cron email.
1 parent 4381154 commit 00b97af

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

files/vacuum_full_tables.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ SQL="SELECT t.relname::varchar AS table_name
3030
for TABLE in $(su - pe-postgres -s /bin/bash -c "/opt/puppetlabs/server/bin/psql -d pe-puppetdb -c \"$SQL\" --tuples-only")
3131
do
3232
#echo $TABLE
33-
su - pe-postgres -s /bin/bash -c "/opt/puppetlabs/server/bin/vacuumdb -d pe-puppetdb -t $TABLE --full --verbose"
33+
su - pe-postgres -s /bin/bash -c "/opt/puppetlabs/server/bin/vacuumdb -d pe-puppetdb -t $TABLE --full"
3434
sleep $SLEEP
3535
done

manifests/maintenance.pp

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
weekday => [2,6],
3333
hour => 4,
3434
minute => 30,
35-
command => "${vacuum_script_path} facts > ${logging_directory}/facts_output.log 2>| tee ${logging_directory}/facts_error.log",
35+
command => "${vacuum_script_path} facts",
3636
require => File[$logging_directory, $script_directory],
3737
}
3838

@@ -42,7 +42,7 @@
4242
weekday => [0,4],
4343
hour => 4,
4444
minute => 30,
45-
command => "${vacuum_script_path} catalogs > ${logging_directory}/catalogs_output.log 2>| tee ${logging_directory}/catalogs_error.log",
45+
command => "${vacuum_script_path} catalogs",
4646
require => File[$logging_directory, $script_directory],
4747
}
4848

@@ -52,7 +52,7 @@
5252
monthday => 20,
5353
hour => 5,
5454
minute => 30,
55-
command => "${vacuum_script_path} other > ${logging_directory}/other_output.log 2>| tee ${logging_directory}/other_error.log",
55+
command => "${vacuum_script_path} other",
5656
require => File[$logging_directory, $script_directory],
5757
}
5858

0 commit comments

Comments
 (0)