Transfer Contrail logs via syslog
Add cron job for transfer contrail-logs to Fuel master via syslog. Change-Id: I2ee93e11a5fed5b90af12e8bc3b66076d60cfab9 Closes-Bug: #1499314
This commit is contained in:
parent
6d2c0590b3
commit
d7331cf900
|
@ -95,4 +95,24 @@ class contrail::analytics {
|
|||
],
|
||||
}
|
||||
|
||||
}
|
||||
# Cron job for transfer contrail-logs to Fuel master
|
||||
file { 'contrailsyslog.sh':
|
||||
ensure => 'present',
|
||||
path => '/usr/local/sbin/contrailsyslog.sh',
|
||||
mode => '0700',
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
content => template('contrail/contrailsyslog.sh.erb'),
|
||||
}
|
||||
|
||||
cron { 'contrail-syslog':
|
||||
command => '/usr/local/sbin/contrailsyslog.sh',
|
||||
user => 'root',
|
||||
minute => '*/1',
|
||||
require => [
|
||||
Service['supervisor-analytics'],
|
||||
File['contrailsyslog.sh'],
|
||||
],
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright 2015 Mirantis, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
/usr/bin/contrail-logs \
|
||||
--send-syslog \
|
||||
--syslog-server <%= scope.lookupvar('contrail::master_ip') %> \
|
||||
--syslog-port 514
|
Loading…
Reference in New Issue