Skip to content

Commit

Permalink
Resolved conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
friol committed Sep 17, 2019
2 parents 8bd3e2d + 677f662 commit 85cc320
Show file tree
Hide file tree
Showing 691 changed files with 14,919 additions and 14,083 deletions.
2 changes: 1 addition & 1 deletion .ci/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ JOB:
# - x-pack-visualRegression

# `~` is yaml for `null`
exclude: ~
exclude: ~
31 changes: 24 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a
])
}
node('flyweight') {
// If the build doesn't have a result set by this point, there haven't been any errors and it can be marked as a success
// The e-mail plugin for the infra e-mail depends upon this being set
currentBuild.result = currentBuild.result ?: 'SUCCESS'

sendMail()
}
}
Expand Down Expand Up @@ -79,6 +83,10 @@ def withWorkers(name, preWorkerClosure = {}, workerClosures = [:]) {
catchError {
publishJunit()
}

catchError {
runErrorReporter()
}
}
}
}
Expand Down Expand Up @@ -143,6 +151,9 @@ def legacyJobRunner(name) {
catchError {
publishJunit()
}
catchError {
runErrorReporter()
}
}
}
}
Expand All @@ -158,9 +169,9 @@ def jobRunner(label, closure) {
withEnv([
"CI=true",
"HOME=${env.JENKINS_HOME}",
"PR_SOURCE_BRANCH=${env.ghprbSourceBranch}",
"PR_TARGET_BRANCH=${env.ghprbTargetBranch}",
"PR_AUTHOR=${env.ghprbPullAuthorLogin}",
"PR_SOURCE_BRANCH=${env.ghprbSourceBranch ?: ''}",
"PR_TARGET_BRANCH=${env.ghprbTargetBranch ?: ''}",
"PR_AUTHOR=${env.ghprbPullAuthorLogin ?: ''}",
"TEST_BROWSER_HEADLESS=1",
"GIT_BRANCH=${scmVars.GIT_BRANCH}",
]) {
Expand Down Expand Up @@ -233,9 +244,8 @@ def sendKibanaMail() {
catchError {
if(params.NOTIFY_ON_FAILURE && currentBuild.result != 'SUCCESS' && currentBuild.result != 'ABORTED') {
emailext(
// to: 'build-kibana@elastic.co',
to: 'brian.seeders@elastic.co', // TODO switch this out after testing
subject: "${env.PROJECT_NAME} - Build # ${env.BUILD_NUMBER} - ${currentBuild.result}",
to: 'build-kibana@elastic.co',
subject: "${env.JOB_NAME} - Build # ${env.BUILD_NUMBER} - ${currentBuild.result}",
body: '${SCRIPT,template="groovy-html.template"}',
mimeType: 'text/html',
)
Expand All @@ -248,7 +258,7 @@ def runbld(script) {
}

def bash(script) {
sh "#!/bin/bash -x\n${script}"
sh "#!/bin/bash\n${script}"
}

def doSetup() {
Expand All @@ -262,3 +272,10 @@ def buildOss() {
def buildXpack() {
runbld "./test/scripts/jenkins_xpack_build_kibana.sh"
}

def runErrorReporter() {
bash """
source src/dev/ci_setup/setup_env.sh
node src/dev/failed_tests/cli
"""
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[[code-getting-started]]
== Getting Started with Code
[[code-import-first-repo]]
== Import your first repo

The easiest way to get started with *Code* is to import a real-world repository.

Expand Down
2 changes: 1 addition & 1 deletion docs/code/code-repo-management.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ image::images/code-repo-management.png[]

[float]
==== Add and delete a repo
The <<code-getting-started, Getting Started>> provides step-by-step instructions for adding a GitHub repo to *Code*. You can fine tune the hostname of the git clone URL in your `kibana.yml` file.
The <<code-import-first-repo, Import your first repository>> page provides step-by-step instructions for adding a GitHub repo to *Code*. You can fine tune the hostname of the git clone URL in your `kibana.yml` file.

For security reasons, Code allows only a few trusted hostnames, such as github.com, by default. You can add an SSH key to {kib} to clone private repos.

Expand Down
4 changes: 2 additions & 2 deletions docs/code/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Elastic *Code* provides an easy-to-use code search solution that scales with you
* Symbol table
* Full-text search with repo and language filters

<<code-getting-started, Get Started>> with *Code* by importing your first repo.
<<code-import-first-repo, Get Started>> with *Code* by importing your first repo.
--

include::code-getting-started.asciidoc[]
include::code-import-first-repo.asciidoc[]
Binary file added docs/images/management-index-templates.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/management_index_create_wizard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/management_index_details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/management_index_labels.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
180 changes: 155 additions & 25 deletions docs/management/managing-indices.asciidoc
Original file line number Diff line number Diff line change
@@ -1,60 +1,190 @@
[role="xpack"]
[[managing-indices]]
== Managing Indices
== Index management

*Index Management* enables you to view index settings,
mappings, and statistics and perform index-level operations.
These include refreshing, flushing, clearing the cache, force merging segments,
freezing indices, and more. *Index Management* provides a convenient way to
perform bulk operations on multiple indices.
freezing indices, and more. Practicing good index management helps ensure
that your data is stored in the most cost-effective way possible.

*Index Management* also helps you create index templates. A template reduces
the amount of bookkeeping when working with indices. Instead of manually
setting up your indices, you can create them automatically from a template,
ensuring that your settings, mappings, and aliases are consistently defined.

To manage your indices, go to *Management > {es} > Index Management*.

[role="screenshot"]
image::images/management_index_labels.png[Index Management UI]

To access this feature, go to *Management > {es} > Index Management*.
If security is enabled,
you must have the `monitor` cluster privilege and the `view_index_metadata`
and `manage` index privileges to view the data. See
{xpack-ref}/security-privileges.html[Security Privileges] for more
and `manage` index privileges to view the data.
For index templates, you must have the `manage_index_templates` cluster privilege.
See {xpack-ref}/security-privileges.html[Security Privileges] for more
information.

*Index Management* uses badges to make users aware when an index is {ref}/frozen-indices.html[frozen],
Before using this feature, you should be familiar with index management
operations. Refer to the {ref}/indices.html[index management APIs]
and the {ref}/indices-templates.html[index template APIs].

[float]
=== View and edit indices

When you open *Index Management*, you’re presented an overview of your configured indices.
Badges indicate if an index is {ref}/frozen-indices.html[frozen],
a {ref}/ccr-put-follow.html[follower index],
or a {ref}/rollup-get-rollup-index-caps.html[rollup index].
Clicking a badge filters for all indices of that type.

Clicking a badge narrows the list to only indices of that type.
You can also filter your indices using the search bar.

You can drill down into each index to investigate the index
{ref}/index-modules.html#index-modules-settings[settings], {ref}/mapping.html[mapping], and statistics.
From this view, you can also edit the index settings.

[role="screenshot"]
image::images/management_index_labels.png[Index Management UI]
image::images/management_index_details.png[Index Management UI]

Clicking the name of an index displays the index summary and provides access to
the index settings, mapping, and statistics.
[float]
=== Perform index-level operations

From the *Manage* menu, you can perform these index-level operations on either
a single or multiple indices:
Use the *Manage* menu to perform index-level operations. This menu
is available in the index details view, or when you select the checkbox of one or more
indices on the overview page. The menu includes the following actions:

* *Close the index*. Blocks the index from read/write operations.
* *Close index*. Blocks the index from read/write operations.
A closed index exists in the cluster, but doesn't consume resources
other than disk space. If you reopen a closed index, it goes through the
normal recovery process.

* *Force merge the index*. Reduces the number of segments in your shard by
* *Force merge index*. Reduces the number of segments in your shard by
merging smaller files and clearing deleted ones. Only force merge a read-only index.

* *Refresh the index*. Writes the operations in the indexing buffer to the
filesystem cache. This is automatically done once per second. Forcing a manual
* *Refresh index*. Writes the operations in the indexing buffer to the
filesystem cache. This action is automatically performed once per second. Forcing a manual
refresh is useful during testing, but should not be routinely done in
production because it has a performance impact.

* *Clear the index cache*. Clears all caches associated with the index.
* *Clear index cache*. Clears all caches associated with the index.

* *Flush the index*. Frees memory by syncing the filesystem cache to disk and
* *Flush index*. Frees memory by syncing the filesystem cache to disk and
clearing the cache. Once the sync is complete, the internal transaction log is reset.

* *Freeze the index*. Makes the index read-only and reduces its memory footprint
by moving shards to disk. {ref}/frozen-indices.html[Frozen indices] remain
* *Freeze index*. Makes the index read-only and reduces its memory footprint
by moving shards to disk. Frozen indices remain
searchable, but queries take longer.

* *Delete the index*. Permanently removes the index and all of it's documents.
* *Delete index*. Permanently removes the index and all of its documents.

* *Add an lifecycle policy*. Specifies a policy for managing the lifecycle of the
* *Add lifecycle policy*. Specifies a policy for managing the lifecycle of the
index.

For information about the available management operations,
see {ref}/indices.html[Indices APIs].
[float]
[[manage-index-templates]]
=== Manage index templates

An index template defines {ref}/index-modules.html#index-modules-settings[settings],
{ref}/mapping.html[mappings], and {ref}/indices-add-alias.html[aliases]
that you can automatically apply when creating a new index. {es} applies a
template to a new index based on an index pattern that matches the index name.

The *Index Templates* view lists your templates and enables you to examine, edit, clone, and
delete them. Changes you make to an index template
do not affect existing indices.

[role="screenshot"]
image::images/management-index-templates.png[Index templates]

If you don't have any templates, you can create one using the *Create template* wizard.
Index templates are applied during index creation,
so you must create the
template before you create the indices.

[float]
==== Example: Create an index template

In this example, you’ll create an index template for randomly generated log files.

Open the *Create template* wizard, and enter `logs_template` in the *Name*
field. Set *Index pattern* to `logstash*` so the template matches any index
with that index pattern. The merge order and version are both optional,
and you'll leave them blank in this example.

[role="screenshot"]
image::images/management_index_create_wizard.png[Create wizard]

The second step in the *Create template* wizard allows you to define index settings.
These settings are optional, and this example skips this step.

The logs data set requires a
mapping to label the latitude and longitude pairs as geographic locations
by applying the geo_point type. In the third step of the wizard, define
this mapping as follows:

[source,js]
----------------------------------
{
"properties": {
"geo": {
"properties": {
"coordinates": {
"type": "geo_point"
}
}
}
}
}
----------------------------------

In the fourth step, define an alias named `logstash`.

[source,js]
----------------------------------
{
"logstash": {}
}
----------------------------------

A summary of the template is in step 5. If everything looks right, click *Create template*.

At this point, you’re ready to use the {es} index API to load the logs data.
In the {kib} *Console*, index two documents:

[source,js]
----------------------------------
POST /logstash-2019.05.18/_doc
{
"@timestamp": "2019-05-18T15:57:27.541Z",
"ip": "225.44.217.191",
"extension": "jpg",
"response": "200",
"geo": {
"coordinates": {
"lat": 38.53146222,
"lon": -121.7864906
}
},
"url": "https://media-for-the-masses.theacademyofperformingartsandscience.org/uploads/charles-fullerton.jpg"
}
POST /logstash-2019.05.20/_doc
{
"@timestamp": "2019-05-20T03:44:20.844Z",
"ip": "198.247.165.49",
"extension": "php",
"response": "200",
"geo": {
"coordinates": {
"lat": 37.13189556,
"lon": -76.4929875
}
},
"memory": 241720,
"url": "https://theacademyofperformingartsandscience.org/people/type:astronauts/name:laurel-b-clark/profile"
}
----------------------------------

The mappings and alias are configured automatically based on the template. To verify, you
can view one of the newly created indices using the {ref}/indices-get-index.html#indices-get-index[index API].
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/management/snapshot-restore/images/register_repo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/management/snapshot-restore/images/repository_list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/management/snapshot-restore/images/restore-status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/management/snapshot-restore/images/snapshot_details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/management/snapshot-restore/images/snapshot_list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 85cc320

Please sign in to comment.