Grant privileges and roles needed for publishing
editGrant privileges and roles needed for publishing
editUsers who publish events to Elasticsearch need to create and write to Journalbeat indices. To minimize the privileges required by the writer role, use the setup role to pre-load dependencies. This section assumes that you’ve pre-loaded dependencies.
When using ILM, turn off the ILM setup check in the Journalbeat config file before running Journalbeat to publish events:
setup.ilm.check_exists: false
To grant the required privileges:
-
Create a writer role, called something like
journalbeat_writer, that has the following privileges:The
monitorcluster privilege and thecreate_docprivilege onjournalbeat-*indices are required in every configuration.Type Privilege Purpose Cluster
monitorRetrieve cluster details (e.g. version)
Cluster
read_ilmRead the ILM policy when connecting to clusters that support ILM. Not needed when
setup.ilm.check_existsisfalse.Index
create_doconjournalbeat-*indicesWrite events into Elasticsearch
Index
view_index_metadataonjournalbeat-*indicesCheck for alias when connecting to clusters that support ILM. Not needed when
setup.ilm.check_existsisfalse.Index
create_indexonjournalbeat-*indicesCreate daily indices when connecting to clusters that do not support ILM. Not needed when using ILM.
Omit any privileges that aren’t relevant in your environment.
- Assign the writer role to users who will index events into Elasticsearch.