Hi, my problem is that when I set-up alerting using index alerting connector, no index gets created when alerts trigger. Could someone please help and write down the steps needed to set-up Kibana alerting to write to a specified index? I want to have a specific index just for Kibana alerts. Thank you.
Steps I took:
Create an Index Connector. Set it to write to "alerts" index which does not currently exist.
Create new alert and set it to use the created Index Connector from step 1.
Before saving the test Alert, check whether the alert would get triggered by watching the dynamic graph and enter some message in the "Document to index" field.
Save alert and make sure it's enabled.
After all this steps, I can't see any new index getting created. Thanks in advance.
Hi, I am guessing that you have Elastic Security enabled, and the user that created the Index Action Connector has limited privileges and perhaps doesn't have the necessary privileges. Are you able to see any errors in the Kibana server logs?
If that is the problem happening, here are the steps:
Have a superuser create a role that allows a user to write to an index called alerts
Add that role to the user that you test with
Log into Kibana with the original test user that now has that role
Create the Index Connector and set it to write to alerts
When you create the index connector, Kibana generates an API key to read and write info in Elasticsearch. The key carries the same credentials that the test user has, so it can't be used to perform actions that otherwise aren't going to be allowed to the user.
It sounds like this may be a bug. Would you mind taking a look at the issues page here: https://github.com/elastic/kibana/issues and see if there are any open issues related to this?
If those issues are not related, please feel free to file a new issue in the issue tracker. If it is possible, please enable verbose logging in the Kibana server and attach as many logs as you can to the issue.
1- First of all never forget to add json format document as being shown here. When you leave it blank then how do you tell the index what to save on the index.
2- 2nd most important thing is, you have to define index mapping of field names that you're going to populate on the index like
Created alert called "index-alert", specified trigger parameters, selected the created index connector to use for indexing alerts and formatted Document to Index as follows:
Where is the index testAlert that you're going to configure in the connectorWrite to index? Please assign correct index name first, 2nd thing is I would recommend to set index Aliases and use Aliases in connector instead of index pattern.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.