Merge "Add rsyslog configuration for virtual-offline-pike-ovs-dpdk"
diff --git a/classes/cluster/virtual-offline-pike-ovs-dpdk/init.yml b/classes/cluster/virtual-offline-pike-ovs-dpdk/init.yml
index 808d64f..0dade38 100644
--- a/classes/cluster/virtual-offline-pike-ovs-dpdk/init.yml
+++ b/classes/cluster/virtual-offline-pike-ovs-dpdk/init.yml
@@ -51,4 +51,52 @@
openstack_gateway_address: 172.16.10.110
openstack_gateway_node01_address: ${_param:openstack_gateway_address}
stacklight_telemetry_address: ${_param:stacklight_monitor_address}
-
+ remote_rsyslog_host: 127.0.0.3
+ remote_rsyslog_port: 10514
+ rsyslog:
+ client:
+ run_user: syslog
+ run_group: adm
+ enabled: true
+ rainerscript:
+ module:
+ imfile: {}
+ input:
+ imfile:
+ nginx:
+ File: "/var/log/nginx/*.log"
+ Tag: "nginx__"
+ Severity: "notice"
+ Facility: "local0"
+ PersistStateInterval: "0"
+ Ruleset: "myapp_logs"
+ apache2:
+ File: "/var/log/apache2/*.log"
+ Tag: "apache2__"
+ Severity: "notice"
+ Facility: "local0"
+ Ruleset: "myapp_logs"
+ PersistStateInterval: "0"
+ rabbitmq:
+ File: "/var/log/rabbitmq/*.log"
+ Tag: "rabbitmq__"
+ Severity: "notice"
+ Facility: "local0"
+ PersistStateInterval: "0"
+ Ruleset: "myapp_logs"
+ template:
+ ImfileFilePath:
+ parameter:
+ type: string
+ string: "<%PRI%>%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag:1:32%%$.suffix%%msg:::sp-if-no-1st-sp%%msg%\n"
+ ruleset:
+ remote_logs:
+ description: 'action(type="omfwd" Target="${_param:remote_rsyslog_host}" Port="${_param:remote_rsyslog_port}" Protocol="udp" Template="ImfileFilePath")'
+ myapp_logs:
+ description: 'set $.suffix=re_extract($!metadata!filename, "(.*)/([^/]*[^/.log])", 0, 2, "all.log"); call remote_logs'
+ output:
+ remote:
+ somehost.domain:
+ action: "@${_param:remote_rsyslog_host}:${_param:remote_rsyslog_port}"
+ filter: "*.*"
+ enabled: true
diff --git a/classes/cluster/virtual-offline-pike-ovs-dpdk/openstack/init.yml b/classes/cluster/virtual-offline-pike-ovs-dpdk/openstack/init.yml
index 9f1aba9..2f132ed 100644
--- a/classes/cluster/virtual-offline-pike-ovs-dpdk/openstack/init.yml
+++ b/classes/cluster/virtual-offline-pike-ovs-dpdk/openstack/init.yml
@@ -126,6 +126,8 @@
mongodb_admin_password: cloudlab
mongodb_shared_key: eoTh1AwahlahqueingeejooLughah4tei9feing0eeVaephooDi2li1TaeV1ooth
ceilometer_influxdb_password: lmapass
+ openstack_log_appender: true
+ openstack_ossyslog_handler_enabled: true
linux:
network:
purge_hosts: true