Configuration Questions


(David Reagan) #1

According to the /etc/elasticsearch/elasticsearch.yml config file,
Elasticsearch sets a lot of default settings automatically. For example:

Set the address other nodes will use to communicate with this node. If not

set, it is automatically derived. It must point to an actual IP address.

network.publish_host: 192.168.0.1

Is there a way I can get a list of all the configuration values that
Elasticsearch is currently running with? So I could see what Elasticsearch
automatically derived for "network.publish_host" and other settings.

Second, if I set up two VM's to use the same cluster via the "cluster.name"
setting, they should automatically find each other, right? So I would see
them all listed when I run:

curl -XGET 'http://localhost:9200/_cluster/nodes?pretty=true'

Finally, if I set "path.data" to something, all data should be stored in
that location. Not in the default (apparently) /var/lib/elasticsearch.
Right?

Thanks! Apologies if these seem like obvious questions. I have googled, and
read the manual looking for answers. I just wasn't able to find the
answers, or didn't understand them when I found them...

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(David Pilato) #2

Answers inline

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

8 novembre 2013 at 02:38:14, David Reagan (jerrac@gmail.com) a écrit:

According to the /etc/elasticsearch/elasticsearch.yml config file, Elasticsearch sets a lot of default settings automatically. For example:

Set the address other nodes will use to communicate with this node. If not

set, it is automatically derived. It must point to an actual IP address.

network.publish_host: 192.168.0.1

Is there a way I can get a list of all the configuration values that Elasticsearch is currently running with? So I could see what Elasticsearch automatically derived for "network.publish_host" and other settings.
Look at logs when the server starts is the simplest way.

Or curl -XGET 'http://localhost:9200/_nodes/network?pretty'

Second, if I set up two VM's to use the same cluster via the "cluster.name" setting, they should automatically find each other, right? So I would see them all listed when I run:

curl -XGET 'http://localhost:9200/_cluster/nodes?pretty=true'

Yes

Finally, if I set "path.data" to something, all data should be stored in that location. Not in the default (apparently) /var/lib/elasticsearch. Right?
Yes

Thanks! Apologies if these seem like obvious questions. I have googled, and read the manual looking for answers. I just wasn't able to find the answers, or didn't understand them when I found them...

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(David Reagan) #3

Thanks for the reply. :slight_smile:

curl -XGET 'http://localhost:9200/_nodes/network?pretty' does not return
the value of network.publish_host

Or is it called something else in the output?

Also, thanks to the hint provided by the curl command, I found
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html#_nodes_statistics
Which
helped me confirm that elasticsearch is pointed at the data directory I
wanted it to point at. Nothing had appeared in that dir, but this confirms
it's just because no data has been sent to this node.

--David Reagan

On Fri, Nov 8, 2013 at 12:16 AM, David Pilato david@pilato.fr wrote:

Answers inline

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

8 novembre 2013 at 02:38:14, David Reagan (jerrac@gmail.com//jerrac@gmail.com)
a écrit:

According to the /etc/elasticsearch/elasticsearch.yml config file,
Elasticsearch sets a lot of default settings automatically. For example:

Set the address other nodes will use to communicate with this node. If

not

set, it is automatically derived. It must point to an actual IP address.

network.publish_host: 192.168.0.1

Is there a way I can get a list of all the configuration values that
Elasticsearch is currently running with? So I could see what Elasticsearch
automatically derived for "network.publish_host" and other settings.

Look at logs when the server starts is the simplest way.

Or curl -XGET 'http://localhost:9200/_nodes/network?pretty'

Second, if I set up two VM's to use the same cluster via the "cluster.name"
setting, they should automatically find each other, right? So I would see
them all listed when I run:

curl -XGET 'http://localhost:9200/_cluster/nodes?pretty=true'

Yes

Finally, if I set "path.data" to something, all data should be stored in
that location. Not in the default (apparently) /var/lib/elasticsearch.
Right?

Yes

Thanks! Apologies if these seem like obvious questions. I have googled,
and read the manual looking for answers. I just wasn't able to find the
answers, or didn't understand them when I found them...

You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/XvzdKshxkcE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(David Pilato) #4

This command gives me:
{
"ok" : true,
"cluster_name" : "workshop",
"nodes" : {
"tpgOUNUcTZ2geUXdPk38rA" : {
"name" : "Trapper",
"transport_address" : "inet[/192.168.0.15:9300]",
"hostname" : "MacBook-Air-de-David.local",
"version" : "0.90.6",
"http_address" : "inet[/192.168.0.15:9200]",
"network" : {
"refresh_interval" : 5000,
"primary_interface" : {
"address" : "192.168.0.15",
"name" : "en0",
"mac_address" : "00:88:65:38:10:D6"
}
}
}
}
}
Actually transport_address and http_address are derived from:

network.bind_host: 192.168.0.1

network.publish_host: 192.168.0.1

Or this one set both values (which really often the case):

network.host: 192.168.0.1

About the data directory, as soon as you start a node, you should see at least a clustername/nodes/0/_state where clustername is your actual cluster name (default to elasticsearch).

If you don't see it, I think that you are modifying an elasticsearch.yml file which is not used by your distribution.
Note that you can run elasticsearch using:

bin/elasticsearch -Des.path.conf=/yourdir/elasticsearch.yml

HTH

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

8 novembre 2013 at 18:09:42, David Reagan (jerrac@gmail.com) a écrit:

Thanks for the reply. :slight_smile:

curl -XGET 'http://localhost:9200/_nodes/network?pretty' does not return the value of network.publish_host

Or is it called something else in the output?

Also, thanks to the hint provided by the curl command, I found http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html#_nodes_statistics Which helped me confirm that elasticsearch is pointed at the data directory I wanted it to point at. Nothing had appeared in that dir, but this confirms it's just because no data has been sent to this node.

--David Reagan

On Fri, Nov 8, 2013 at 12:16 AM, David Pilato david@pilato.fr wrote:
Answers inline

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

8 novembre 2013 at 02:38:14, David Reagan (jerrac@gmail.com) a écrit:

According to the /etc/elasticsearch/elasticsearch.yml config file, Elasticsearch sets a lot of default settings automatically. For example:

Set the address other nodes will use to communicate with this node. If not

set, it is automatically derived. It must point to an actual IP address.

network.publish_host: 192.168.0.1

Is there a way I can get a list of all the configuration values that Elasticsearch is currently running with? So I could see what Elasticsearch automatically derived for "network.publish_host" and other settings.
Look at logs when the server starts is the simplest way.

Or curl -XGET 'http://localhost:9200/_nodes/network?pretty'

Second, if I set up two VM's to use the same cluster via the "cluster.name" setting, they should automatically find each other, right? So I would see them all listed when I run:

curl -XGET 'http://localhost:9200/_cluster/nodes?pretty=true'

Yes

Finally, if I set "path.data" to something, all data should be stored in that location. Not in the default (apparently) /var/lib/elasticsearch. Right?
Yes

Thanks! Apologies if these seem like obvious questions. I have googled, and read the manual looking for answers. I just wasn't able to find the answers, or didn't understand them when I found them...

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/XvzdKshxkcE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(David Reagan) #5

Ah, so they are called something different in the output of that curl
command. That's a bit confusing... Oh well, now I know. Is there a list
somewhere in the docs that shows tells me which which maps to which?

When I run curl -XGET 'http://localhost:9200/_nodes/stats?pretty&fs=true',
it shows that it's using the data dir I set in my config file. And, for
some reason, it now shows the expected 'clustername' dir in it as well. I
have no idea why it wasn't showing up yesterday evening...

Thanks again for the quick replies. You've helped a lot. :slight_smile:

--David Reagan

On Fri, Nov 8, 2013 at 9:35 AM, David Pilato david@pilato.fr wrote:

This command gives me:

{
"ok" : true,
"cluster_name" : "workshop",
"nodes" : {
"tpgOUNUcTZ2geUXdPk38rA" : {
"name" : "Trapper",
"transport_address" : "inet[/192.168.0.15:9300]",
"hostname" : "MacBook-Air-de-David.local",
"version" : "0.90.6",
"http_address" : "inet[/192.168.0.15:9200]",
"network" : {
"refresh_interval" : 5000,
"primary_interface" : {
"address" : "192.168.0.15",
"name" : "en0",
"mac_address" : "00:88:65:38:10:D6"
}
}
}
}
}

Actually transport_address and http_address are derived from:

network.bind_host: 192.168.0.1

network.publish_host: 192.168.0.1

Or this one set both values (which really often the case):

network.host: 192.168.0.1

About the data directory, as soon as you start a node, you should see at
least a clustername/nodes/0/_state where clustername is your actual
cluster name (default to elasticsearch).

If you don't see it, I think that you are modifying an elasticsearch.yml
file which is not used by your distribution.
Note that you can run elasticsearch using:

bin/elasticsearch -Des.path.conf=/yourdir/elasticsearch.yml

HTH

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

8 novembre 2013 at 18:09:42, David Reagan (jerrac@gmail.com//jerrac@gmail.com)
a écrit:

Thanks for the reply. :slight_smile:

curl -XGET 'http://localhost:9200/_nodes/network?pretty' does not return
the value of network.publish_host

Or is it called something else in the output?

Also, thanks to the hint provided by the curl command, I found
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html#_nodes_statistics Which
helped me confirm that elasticsearch is pointed at the data directory I
wanted it to point at. Nothing had appeared in that dir, but this confirms
it's just because no data has been sent to this node.

--David Reagan

On Fri, Nov 8, 2013 at 12:16 AM, David Pilato david@pilato.fr wrote:

Answers inline

 --

David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

8 novembre 2013 at 02:38:14, David Reagan (jerrac@gmail.com//jerrac@gmail.com)
a écrit:

According to the /etc/elasticsearch/elasticsearch.yml config file,
Elasticsearch sets a lot of default settings automatically. For example:

Set the address other nodes will use to communicate with this node.

If not

set, it is automatically derived. It must point to an actual IP

address.

network.publish_host: 192.168.0.1

Is there a way I can get a list of all the configuration values that
Elasticsearch is currently running with? So I could see what Elasticsearch
automatically derived for "network.publish_host" and other settings.

Look at logs when the server starts is the simplest way.

Or curl -XGET 'http://localhost:9200/_nodes/network?pretty'

Second, if I set up two VM's to use the same cluster via the "
cluster.name" setting, they should automatically find each other, right?
So I would see them all listed when I run:

curl -XGET 'http://localhost:9200/_cluster/nodes?pretty=true'

Yes

Finally, if I set "path.data" to something, all data should be

stored in that location. Not in the default (apparently)
/var/lib/elasticsearch. Right?

Yes

Thanks! Apologies if these seem like obvious questions. I have googled,
and read the manual looking for answers. I just wasn't able to find the
answers, or didn't understand them when I found them...

You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/XvzdKshxkcE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/XvzdKshxkcE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #6