Skip to content

Dangling space at end of message strings can cause issues for monitoring and parsing of output #117067

Closed
@vford-elastic

Description

@vford-elastic

Elasticsearch Version

8.16.0

Installed Plugins

No response

Java Version

bundled

OS Version

Linux

Problem Description

Dangling space at end of message strings can cause issues for monitoring and parsing of logs. Users want to parse output using their tools and periodically they are finding messages with an unnecessary trailing space which can break some user parsers.

Steps to Reproduce

Examples of the messages with trailing extra space on last line of message.

https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStore.java#L477

                "Grants the minimum privileges required to view machine learning configuration, status, and work with results. "
                    + "This role grants monitor_ml cluster privileges, read access to the .ml-notifications and .ml-anomalies* indices "
                    + "(which store machine learning results), and write access to .ml-annotations* indices. "
                    + "Machine learning users also need index privileges for source and destination indices "
                    + "and roles that grant access to Kibana. "

https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStore.java#L582

"Grants monitor_data_frame_transforms cluster privileges, which enable you to use transforms. "
+ "This role also includes all Kibana privileges for the machine learning features. "

Most of the messages do not have a training space, for example the following doesn't have a trailing space:

https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStore.java#L218

"Grants the minimum privileges required for any user of X-Pack monitoring other than those required to use Kibana. "
+ "This role grants access to the monitoring indices and grants privileges necessary "
+ "for reading basic cluster information. "
+ "This role also includes all Kibana privileges for the Elastic Stack monitoring features. "
+ "Monitoring users should also be assigned the kibana_admin role, "
+ "or another role with access to the Kibana instance."

Logs (if relevant)

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions