]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
log: set hostname and fsid for graylog
authorKefu Chai <kchai@redhat.com>
Mon, 5 Jul 2021 01:38:57 +0000 (09:38 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 5 Jul 2021 04:17:49 +0000 (12:17 +0800)
commit0bedd067bee2c7abffb527e1aa24a1821076f5b8
tree0306f77f127e0e3c884a435a45b7b3a1d7d9a541
parent3bee326025234a288d0de1ca2b1280f9da9d99c9
log: set hostname and fsid for graylog

in which, hostname is mandatory per
https://docs.graylog.org/en/4.0/pages/gelf.html#gelf-payload-specification,
so without this change, if user enables `log_to_graylog` and/or `err_to_graylog`,
failures like

java.lang.IllegalArgumentException: GELF message <ed6876e1-9265-11ea-bc94-1ad2db8b5489> (received from <10.10.10.12:36509>) has empty mandatory "host" field.

is expected.

after this change, this field is set.

Fixes: https://tracker.ceph.com/issues/45457
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/ceph_context.cc
src/log/Log.cc
src/log/Log.h