Elasticsearch: Difference between revisions

m Text replacement - "<(\/?)source" to "<$1syntaxhighlight"
updating
Line 8: Line 8:
{{#set:feature tests = Search for something in "files" which indicates that PDF index results are returned instead of just articles. E.g.[https://wiki.freephile.org/wiki/index.php?title=Special:Search&profile=advanced&profile=advanced&fulltext=Search&search=ssh-agent&ns6=1 Search for 'ssh-agent' in the File namespace] }}
{{#set:feature tests = Search for something in "files" which indicates that PDF index results are returned instead of just articles. E.g.[https://wiki.freephile.org/wiki/index.php?title=Special:Search&profile=advanced&profile=advanced&fulltext=Search&search=ssh-agent&ns6=1 Search for 'ssh-agent' in the File namespace] }}
{{#set:feature examples =  }}
{{#set:feature examples =  }}
This site uses Elasticsearch for it's search functionality under the hood.
This site uses Elasticsearch for it's search functionality under the hood.


Line 228: Line 229:


==Monitoring==
==Monitoring==
With the upgrade to Elasticsearch 5.x and 6.x, plugins are deprecated. It's suggested to use [[Kibana]] as a monitoring and management interface to Elasticsearch.
It's suggested to use '''[[Kibana]]''' as a monitoring and management interface to Elasticsearch.
<img src="http://meta.qualitybox.us:20000/api/v1/badge.svg?chart=elasticsearch_local.cluster_health_status&alarm=elasticsearch_last_collected&refresh=auto" />


http://meta.qualitybox.us:20000/api/v1/badge.svg?chart=elasticsearch_local.cluster_health_status&alarm=elasticsearch_last_collected&refresh=auto" type="image/svg+xml
You'll need to set xpack.monitoring.collection.enabled=true for Elasticsearch to do self-monitoring. If that is enabled in your elasticsearch.yml, then you can navigate in the left-panel of Kibana to "Stack Monitoring" under the "Management" section at the bottom. However that is called 'internal monitoring'. It has long been recommended to use a distinct 'external' service called '''Metricbeat''' for monitoring the health of your Elasticsearch cluster.




<html>
[[File:Kibana-self-monitoring.png|thumb]]
<embed src="http://meta.qualitybox.us:20000/api/v1/badge.svg?chart=elasticsearch_local.cluster_health_status&alarm=elasticsearch_last_collected&refresh=auto" type="image/svg+xml" height="20"/>
</html>


*Monitoring the Elastic Stack https://www.elastic.co/guide/en/elastic-stack-overview/6.4/xpack-monitoring.html
 
*Monitoring Settings https://www.elastic.co/guide/en/elasticsearch/reference/6.4/monitoring-settings.html
Although you can turn on monitoring in the Kibana Web interface, you can also use curl on the command line to inspect and set cluster settings.
*X-Pack monitoring https://www.elastic.co/guide/en/kibana/current/xpack-monitoring.html
<syntaxhighlight lang="bash">
*Configuring Monitoring in Kibana https://www.elastic.co/guide/en/kibana/6.4/monitoring-xpack-kibana.html
curl -X GET "localhost:9200/_cluster/settings?pretty"
*Monitoring with [https://github.com/lmenezes/cerebro Cerebro]
curl -X PUT "localhost:9200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d'
*You can still use [https://mobz.github.io/elasticsearch-head/ elasticsearch-head] if you use an SSH reverse tunnel to access the remote server.
{
  "persistent": {
    "xpack.monitoring.collection.enabled": true
  }
}
</syntaxhighlight>