Skip to content

Instantly share code, notes, and snippets.

@tamros
tamros / Ingest Pipeline
Last active July 10, 2018 09:22
Different ways to use ingest pipeline
#add the pipeline
PUT _ingest/pipeline/set_incremental
{
"processors": [
{
"set": {
"field": "incremental_value",
"value": 0
}
}
@tamros
tamros / Null Values
Created July 10, 2018 09:45
Examples of null values
#Values like that will not be considered null
POST null_values/_doc
{
"user": [
"jane",
null
]
}
filebeat.prospectors:
- type: log
enabled: true
paths:
- /home/elastic/datasets/java_stack_trace.log
fields:
var app = require('express')()
app.get('/', function (req, res) {
var err = new Error('Error generated')
apm.captureError(err)
//start to
https://www.elastic.co/guide/en/beats/metricbeat/current/configuration-metricbeat.html
https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-system.html
https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-installation.html
./metricbeat modules enable system
https://www.elastic.co/guide/en/beats/metricbeat/current/load-kibana-dashboards.html
./metricbeat setup --dashboards
https://nodejs.org/en/download/
npm init
npm install express --save
node index.js
[
{
"description": "Covering most of Mount Desert Island and other coastal islands, Acadia features the tallest mountain on the Atlantic coast of the United States, granite peaks, ocean shoreline, woodlands, and lakes. There are freshwater, estuary, forest, and intertidal habitats.",
"nps_link": "https://www.nps.gov/acad/index.htm",
"states": [
"Maine"
],
"title": "Acadia",
"id": "park_acadia",
"visitors": 3303393,
@tamros
tamros / gist:1927cf97ece62b6da2eda7ec2d525f10
Last active October 13, 2021 17:29
highlight subset of characters in word(s)
# (Re)create the index
DELETE /highlight
PUT /highlight
{
"settings": {
"analysis": {
"analyzer": {
"standard_ngram": {