306 Commits

Author SHA1 Message Date
Mark Goddard
68b2d48fd5 Add ironic inspector to fluentd log collection
Previously ironic inspector logs were not being collected, as they are
stored in /var/log/kolla/ironic-inspector/ rather than
/var/log/kolla/ironic/. This change modifies the fluentd input
configuration to use the correct directory.

Also adds the ironic-inspector service to the fluentd programname
rewrite rule.

Change-Id: Ie5d67f395e4c32fef992e674f2d53dbd6a17f238
2017-12-29 19:45:45 +00:00
Zuul
e3af18f90a Merge "Add vitrage ansible role" 2017-12-28 04:57:45 +00:00
chenxing
2d1a1b1df6 Add vitrage ansible role
Co-Authored-By: caoyuan <cao.yuan@99cloud.net>
Co-Authored-By: Eduardo Gonzalez <dabarren@gmail.com>

Depends-on I7ffb991adbd05275e331401cd73fc84362084ebd
Change-Id: I85afeb5dfce0bf6350a444000bdb885c6fe079c9
Partially-implements: blueprint vitrage-roles
2017-12-18 17:29:32 +08:00
Xinliang Liu
1d36adcb4f Make fluentd enabled configurable
Although there is an option "enable_fluentd", but there are still
some tasks that make fluentd not configurable.

Change-Id: Ic0a9deb36fce154022925d26411e01a8ffe18b50
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
2017-12-15 10:24:12 +08:00
Zuul
ee903c026e Merge "Add a missing conditional check to the common config task" 2017-12-13 17:50:20 +00:00
Zuul
47d83d6bd5 Merge "Add missing hostnames to fluentd log messages" 2017-12-07 09:23:00 +00:00
Tatsuma Matsuki
5025974982 Add a missing conditional check to the common config task
The owner and permission check for config directories
should be executed only when the service is enabled.

Change-Id: I6dd2a8fcce83cba8a9a79b1c302d6b1ef4305144
Closes-Bug: #1734789
2017-11-28 01:14:30 +00:00
Zuul
f12a18504b Merge "Standardise log field naming" 2017-11-24 08:37:07 +00:00
Doug Szumski
fc9f84ea8c Add missing hostnames to fluentd log messages
- Sets the hostname on rabbitmq and mariadb log messages
  according to the local host.
- Sets the hostname on syslog log messages by extracting it
  from the syslog message. In many cases this will be the
  same as the local host, but it may also be a remote host.

Closes-Bug: #1726596
Change-Id: If7c53916d5a355b3aac33d6a62d89d02474e8b53
2017-11-20 14:36:23 +00:00
Zuul
1175238420 Merge "Extract log level from syslog" 2017-11-17 19:36:11 +00:00
chenxing
419a2fc9fd Fix the deprecated syntax in 01-rewrite.conf
The current syntax of Ubuntu fluentd rewrite rules are not supported
anymore, reference to this commit[1].
According to the build of this patch[2], The Centos has no such isuue.
Only Ubuntu needs to be upgrade to use the <rule> section.

* Centos use 01-rewrite-0.12.conf.j2
* Ubuntu use 01-rewrite-0.14.conf.j2

backport: pike

[1] 248ed8e97d
[2] https://review.openstack.org/#/c/517907

Depends-on: I47985113fe732569d640a262ca832c6edc8c2bb6
Change-Id: I0b131c2f65652cf3c61b33d8162097b047603923
Closes-Bug: #1730664
2017-11-16 07:59:32 +00:00
Duong Ha-Quang
2c5e91a0cd Add become for fluentd create config directory task
Become option is missed in patch #398682, this patchset fix this issue.

Change-Id: I228c31486210ef1de76601d3ea4ee955a628ca73
Partial-Implements: blueprint ansible-specific-task-become
2017-10-31 09:39:49 +07:00
Doug Szumski
c8984ca355 Extract log level from syslog
By default the syslog input plugin won't extract the
log level from a syslog message. By setting the priority
key, the log level is extracted.

Partial-Bug: #1725240
Change-Id: I9ad5f5e1c875ef62b39fbbba7b271d98cee68dd6
2017-10-24 13:44:19 +01:00
Doug Szumski
571e4fca63 Standardise log field naming
Use the same field name for extracting all log messages to make it
simpler to parse the output from fluentd.

Closes-Bug: #1723459

Change-Id: I55b86061c8f70b25cf88e394fdfc78fa3c85c79f
2017-10-13 16:31:26 +01:00
Jenkins
4425195e3a Merge "Fluentd: fix Mariadb mysqld_safe log not match" 2017-10-09 10:55:01 +00:00
Jenkins
17f435e80d Merge "Fluentd: remove apache record_transformer filter" 2017-10-09 10:54:54 +00:00
Jenkins
cc3a304680 Merge "Add nova-compute-ironic to fluentd rewrite rules" 2017-10-08 10:46:43 +00:00
Doug Szumski
249a193b90 Add nova-compute-ironic to fluentd rewrite rules
We want to treat the nova-compute-ironic log in the same way as
the other nova logs so that it doesn't go missing from fluentd
output.

Change-Id: I145389cd0cceeed506e2a9c084d290341047c9aa
Closes-Bug: #1721814
2017-10-06 17:27:50 +01:00
Paul Bourke
b667b64e3a Add OS_AUTH_URL to admin-openrc
gnocchi client requires this, others may also

Change-Id: I848df2e4964958902955f7c72e94e1e64a67bca1
2017-10-06 15:15:15 +01:00
Bertrand Lallau
4cfe5f8de1 Fluentd: remove apache record_transformer filter
Record transformer is used to add a 'Severity' field in event.
This Field is unused and not generated for other programs, hence
It can be removed safely.

Change-Id: I62e461e5006516dcbd6c64e1770d6936f9a9d55c
2017-10-04 14:13:05 +00:00
Jenkins
109328be3e Merge "Specify 'become' to necessary tasks (general roles)" 2017-10-03 20:01:04 +00:00
Tatsuma Matsuki
03354bc99e Add fluentd enable option
This change adds enable_fluentd option and enables some other log shippers
to be integrated. When enable_fluentd is "no", syslog server is also disabled.
Then, this change also adds syslog parameters to use a syslog server
prepared by users.

Change-Id: I7c83ef7fe30a6b9ab7385bcee953ad07e96b0a83
Implements: blueprint fluentd-enable-option
2017-09-28 04:36:36 +00:00
Zhangfei Gao
30f0dc10ce common: fix ansible location
When deploying on arm64, common reports error:
stat /usr/bin/ansible: no such file or directory

The reason is ansible is installed to /usr/local/bin/ansible
rather that /usr/bin/ansible
Fix the issue to call ansible directly, to consider both cases.

Change-Id: Ie90bd9c4d7d3a4b7b0aef884351cb58ed13ebd11
Signed-off-by: Kevin Zhao <kevin.zhao@linaro.org>
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
2017-09-26 18:54:19 +00:00
Bertrand Lallau
4bce67c540 Fluentd: fix Mariadb mysqld_safe log not match
The following warning logs appears in fluentd container:

[warn]: pattern not match: "170908 21:34:12 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql/"

This patch fix it

Change-Id: I9820b8c5fd3456ba9c032fdf326c65632d147e50
Closes-Bug: #1708571
2017-09-26 11:37:51 +02:00
Jenkins
aa3d644f99 Merge "Fluentd: fix duplicate log level naming" 2017-09-26 07:11:36 +00:00
Jenkins
6ef31cf973 Merge "Fluentd: reduce CPU and I/O consumption" 2017-09-25 13:15:49 +00:00
Bertrand Lallau
b649ae922f Fluentd: fix duplicate log level naming
Fluentd config actually used two keywords to named log level:
"log_level" and "severity_label".
This doesn't allow to search and sort ALL logs in Kibana using a unique
field (ex: log_level).
This fix standardize log level keyword naming.

Closes-Bug: #1713410
Change-Id: Ibb2eaf3b6aa21ce6f7945e768e6362c0d40f0507
2017-09-25 08:26:20 +00:00
Duong Ha-Quang
26b2c2d9e9 Specify 'become' to necessary tasks (general roles)
Add config_owner_user and config_owner_group to group_vars/all,
which is user and group of Kolla configuration files in /etc/kolla.

Add become to post-deploy playbook.

Add become to only neccesary tasks in roles:
- certificate
- common
- destroy
- haproxy
- mariadb
- memcached
- rabbitmq

Change-Id: I2aba745a6e3928c52642f64551470fd08cbfd058
Partial-Implements: blueprint ansible-specific-task-become
2017-09-25 06:52:04 +00:00
Eduardo Gonzalez
ebd8d765f9 Fix rabbitmq tag not match in fluentd
infra.rabbitmq tag does not match in fluentd

Closes-Bug: #1718874
Change-Id: I92733a4f275baa93b0c3a6ddbdc6801aec534867
2017-09-25 02:40:33 +00:00
Bertrand Lallau
0af7178d3d Fluentd: progname field is missing with Rsyslog
progname is actually only fullfilled for Openstack logs and infra logs.
They are missing for program logging in RSYSLOG: HAPROXY and SWIFT.
When using Kibana, "progname" field appears empty, hence it's difficult
to know where logs come from.

Change-Id: Iae98af083cfb79d2a64fa0b70c86b0a01f7a336f
Closes-Bug: #1716051
2017-09-21 09:54:13 +00:00
Bertrand Lallau
498dab2437 Fluentd: reduce CPU and I/O consumption
Disable the additional watch timer (enable_watch_timer).
Setting this parameter to false will significantly reduce CPU and I/O
consumption when tailing a large number of files on systems with inotify
support.

Change-Id: Ib432e6cdece01dbb94b3d2f3d7fbdd04b81d25fa
2017-09-18 09:11:47 +00:00
Mark Goddard
fb4651461b Support configuration of custom fluentd outputs
In some scenarios it may be useful to configure custom fluentd outputs
to forward logs to a logging service other than elasticsearch.

This change supports configuration of fluentd outputs by placing
output configuration files in /etc/kolla/config/fluentd/output/*.conf.

Change-Id: I3c0b271d88dbb307ba3a23546e29c72e8baeca55
Implements: blueprint fluentd-custom-outputs
2017-09-13 17:25:12 +01:00
Jenkins
b20182266a Merge "Fix barbican-api log filter in fluentd" 2017-09-12 08:31:01 +00:00
Eduardo Gonzalez
1d1fbcfbeb Fix barbican-api log filter in fluentd
Barbican-api log is a uswsgi process and fluentd expects as
openstack service process.
This change moves log type to uswgi group.

Change-Id: Ifaf5645d0d19e133e41de0c55a55321fccfc391f
Closes-Bug: #1716513
2017-09-11 16:29:24 -06:00
Bertrand Lallau
792ab71471 Fluentd: Libvirt logs are missing
Libvirt logs are not managed by Fluentd. It can be very helpful to
debug 'booting' issue on KVM.

Change-Id: Ie04322adec0482f4d586d2f8564a1a77f2da2605
Closes-Bug: #1713429
2017-09-04 13:43:55 +00:00
Jenkins
0e50f147e0 Merge "Fluentd "progname" field not always generated" 2017-09-04 13:41:46 +00:00
Jenkins
ff7688c229 Merge "Fluentd: manage multiline log pattern" 2017-09-04 13:13:55 +00:00
Bertrand Lallau
61864637dc Fluentd "progname" field not always generated
'progname' is actually only fullfilled for Openstack services logs.
They are missing for MariaDB and RabbitMQ logs.
When using Kibana, "progname" field appears empty, hence it's difficult
to known where logs comes from.

Change-Id: Ifcbfd981a34a8d64ea69d37934c7f0fae10a90b5
Closes-Bug: #1713412
2017-09-04 11:02:47 +00:00
Bertrand Lallau
38a6d30411 Fluentd: manage multiline log pattern
Actual Fluentd config doesn't manage multiline log pattern like:

2017-08-16 21:41:03.097 7 WARNING oslo_config.cfg [-] Option "firewall_driver" from group "DEFAULT" is deprecated for removal (
nova-network is deprecated, as are any related configuration options.
). Its value may be silently ignored in the future.

This log will generate 1 Fluentd event for each line (in previous
example 3 events).
This is really a wrong behaviour and made Kibana interface not friendly.
This patch uses a multiline parser.

Change-Id: Iee337645d1dc42876ec79be08ee3715f11a53d87
Closes-Bug: #1711399
2017-09-04 08:58:17 +00:00
Jenkins
8c30163853 Merge "Fluentd: rework and fix tail source config" 2017-09-01 14:18:13 +00:00
ZhongShengping
2fca630cdb Add WSGI support for cloudkitty-api
They dropped the cloudkitty-api command line[0], so we should add wsgi
support for cloudkitty-api.

[0]https://review.openstack.org/#/c/366043/

Change-Id: Ie34d4f2d5c303bbd7ac09a8ab9e8d9bdc763c57b
Closes-Bug: #1713879
2017-08-31 08:50:42 +08:00
Bertrand Lallau
eab91d4288 Fluentd: rework and fix tail source config
Actually a unique 'tail' source is used for all logs files in
kolla/*/*.log.

So log files from services like: chrony, elasticsearch, etcd, grafana,
influxdb, kibana, mongodb... are actually processed by our Fluentd
config, but should not cause all following config will failed to parse
them. It just uses CPU for nothing cause they will
never match the following filters:
* record_transformer => add Hostname, Logger, programname field
* rewrite_tag_filter => rewrite 'programname' TAG if needed

Hence these filters should only be applied to Openstack services logs to
avoid CPU usage.

Furthermore WGI and Apache logs files must be treated differently.

Change-Id: I425979160291e1123e3775e39243bca06ed22c2f
Closes-Bug: #1711390
2017-08-29 08:46:55 +00:00
Jenkins
9a1357e4bb Merge "Change mode after ceph and neutron log is rotated" 2017-08-23 04:35:26 +00:00
Jenkins
7f128f1416 Merge "Fluentd: add support for "domain" concept in Keystone V3" 2017-08-22 10:53:45 +00:00
Eduardo Gonzalez
ecc022177c Fix missing tacker-conductor service
Tacker has included a new conductor service
to manage mistral workflows for VIM monitoring.

Without conductor, Tacker cannot create VIMs.

This change reworks tacker to include tacker-conductor
service.

Depends-On: I52778e86e4f2c297ead8d4b09983e5e38ca88c70
Closes-Bug: #1710874
Change-Id: I6901e919887551bedc9dba8983ac904e8c48c9ce
2017-08-21 08:12:01 +00:00
Jenkins
7db9ce7c3e Merge "Update fluentd config for rpm distros" 2017-08-21 08:11:45 +00:00
Eduardo Gonzalez
1d5bd21976 Update fluentd config for rpm distros
Fluentd repo/packages are changed in depends changes below.
Rpm distros need changes in their config for properly
start and deploy fluentd containers.

Change-Id: I474c4d20c407717c6da973383bbbd5539be480f1
Depends-On: I4802618373cfa53d67d1dfe65be7abe1950b3d04
2017-08-21 05:42:51 +00:00
zhubingbing
46b1b91607 Add panko log in fluentd
Change-Id: Ic3b994056e6287488a0a9f7dbeb140c007ad86d3
2017-08-20 09:11:39 +00:00
Jenkins
d8635d5563 Merge "Add ironic log in fluentd" 2017-08-16 11:48:31 +00:00
Jenkins
1785997a56 Merge "Standardize Fluentd grammar usage" 2017-08-16 05:26:05 +00:00