I'm trying to install the X-Pack on ELK, but I'm having difficulty. Here is where I'm at:
The elasticsearch and kibana installs have completed without issue
I've installed X-Pack on logstash
Issue #1: the instructions said to under #5 here: https://www.elastic.co/guide/en/logstash/6.x/installing-xpack-log.html to edit the logstash.yml config file and change the username and password. Those two settings didn't existing in my logstash.yml file so I added them manually.
Issue #2
When I try to query data that has been loaded via logstash I get:
{
"error": {
"root_cause": [
{
"type": "security_exception",
"reason": "action [indices:data/read/search] is unauthorized for user [kibana]"
}
],
"type": "security_exception",
"reason": "action [indices:data/read/search] is unauthorized for user [kibana]"
},
"status": 403
}
Question #1: How can I fix this?
Question #2: Was it correct to edit the logstash.yml manually?
It looks like you have logged into Kibana as the kibana user.
That's a common mistake that new users make.
The kibana user is the user that the Kibana application uses for its own purposes when it connects to Elasticsearch. For example, it is how Kibana can tell whether your ES server is available, and whether it has security turned on. You should not log in to Kibana as that user, because it doesn't have permission to do very much (which is intentional - it has just enough access to run Kibana but no more)
You should initially login to Kibana using the elastic user. This is a superuser that can do everything.
You can use that user for everything you want to do, and always login to Kibana as elastic, but we don't recommend it. Because that user can do everything, it can make a horrible mess of your cluster if you're not careful, and one of the benefits of X-Pack security is that it can protect you from mistakes like that.
Rather, we recommend that you use the elastic user to login the first time, and then use the Kibana admin screens to create new, lower privileged users and roles that have just the permissions that you need, but nothing more. You can then safely use those users to do your work in Kibana, and you can always login as elastic if you need to make major changes.
Thanks for the quick response. I have resolved my first issues, however I
am now having issues loading the data into logstash. I am getting this
output:
#cat stocks.csv | ./logstash -f stocks.conf
Sending Logstash's logs to /Users//Downloads/logstash-6.1.1/logs
which is now configured via log4j2.properties
@Krunal_kalaria is mistaken, it shouldn't be there.
In fact you shouldn't need to add it to any configuration file - security is on by default if x-pack is installed with an appropriate license (trial, gold, or platinum).
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.