Skip to content

Instantly share code, notes, and snippets.

@zuketo
Created June 5, 2019 18:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zuketo/359c1de51040235a3de18a8b7cdefd34 to your computer and use it in GitHub Desktop.
Save zuketo/359c1de51040235a3de18a8b7cdefd34 to your computer and use it in GitHub Desktop.
# Let's see the indices already in ES
GET _cat/indices
# Setup: delete products index in case it exists
DELETE products
# Create product index
PUT /products
{
"settings" : {
"index" : {
"number_of_shards" : 1,
"number_of_replicas" : 0
}
},
"mappings" : {
"properties" : {
"name" : {
"type" : "keyword"
}
}
}
}
# Add a sample document
POST /products/_doc
{
"name" : "My cool new product"
}
#
# We're done with setting up an index on cluster1
#
# 2. Let's make sure cluster2 knows where cluster1 is
#
# We started Elasticsearch on port 9200 (for cluster1)
# port 9300 (usually 100 higher) ES <-> ES communication
# Port 9300 should be used when defining our connection to cluster1
#
PUT /_cluster/settings
{
"persistent" : {
"cluster" : {
"remote" : {
"cluster1" : {
"seeds" : [
"127.0.0.1:9300"
]
}
}
}
}
}
#
# Verify the connection exists
#
GET /_remote/info
#
# 3. Now, let's follow our products index from cluster1
#
PUT /products-copy/_ccr/follow
{
"remote_cluster" : "cluster1",
"leader_index" : "products"
}
#
# 4. We can check if any documents have started appearing
#
GET /products-copy/_search
#
# Nothing yet, let's add a few documents on the leader (cluster1)
#
POST /products/_doc
{
"name" : "My cool new product"
}
#
# 4. How about if we need to use an auto-follow pattern
#
# We'll use this command in our next example below
#
PUT /_ccr/auto_follow/beats
{
"remote_cluster" : "cluster1",
"leader_index_patterns" :
[
"metricbeat-*"
],
"follow_index_pattern" : "{{leader_index}}-copy"
}
# Now let's revisit the commands above within the Kibana UI
#
# Replicate Metricbeat metrics across our Elasticsearch clusters
#
# 1. Download Metricbeat (and unzip)
#
# https://www.elastic.co/products/beats/metricbeat
# Setup
DELETE metricbeat*
#
# 3. Start following Metricbeat indices from our follower
#
PUT /_ccr/auto_follow/beats
{
"remote_cluster" : "cluster1",
"leader_index_patterns" :
[
"metricbeat-*"
],
"follow_index_pattern" : "{{leader_index}}-copy"
}
#
# 4. Start Metricbeat, and write to cluster1
#
# Ensure documents are being populated
GET _cat/indices
GET metricbeat*/_search
#
# 5. Now let's go back to our following cluster and see the writes coming in
#
GET _cat/indices
GET metricbeat*/_search
@s-eneojo
Copy link

How can I bypass ssl_verification in this api snippet?

PUT /_cluster/settings
{
"persistent" : {
"cluster" : {
"remote" : {
"cluster1" : {
"seeds" : [
"127.0.0.1:9300"
]
}
}
}
}
}

@Filliners
Copy link

Harness the power of webinars to connect with your audience, share valuable knowledge, and boost your brand. To ensure your webinar's success, here are some crucial steps to follow: Define Objectives: Start by setting clear goals for your webinar. Decide whether you aim to educate your audience, generate leads, or showcase a new product. Know Your Audience: Understand your target audience's needs and interests. Tailor your content to address their pain points and provide valuable solutions. Choose the Right Topic: Select a relevant and compelling topic that aligns with your expertise and your audience's interests. Keep it focused to avoid overwhelming your attendees. Create a Structured Outline: Organize your content into a well-defined structure. Break it down into sections with clear objectives, and enhance your presentation with engaging visuals and multimedia. Practice Makes Perfect: Rehearse your presentation multiple times to feel confident and familiar with the material. Practice also helps you refine your delivery and identify potential issues in advance. Interact with Your Audience: Encourage audience participation through polls, Q&A sessions, and live chat. Address questions and feedback during the webinar to keep attendees engaged and create a sense of community. Promote Your Webinar: Utilize various marketing channels, such as social media, email campaigns, and your website, to reach your target audience and drive registrations. Choose the Right Platform: Select a reliable webinar platform that can handle your audience size and offers interactive features. Test the platform beforehand to ensure a smooth execution. Engage from the Start: Begin your webinar with a warm welcome and a brief introduction about yourself and your expertise. Set the stage for what attendees can expect throughout the session. End with a Strong Call-to-Action: Conclude your webinar with a clear and compelling call-to-action. Guide your audience on the next steps, whether it's signing up for a newsletter, scheduling a consultation, or purchasing a product. Follow Up and Evaluate: Show appreciation by sending a follow-up email to attendees, and share additional resources or materials. Collect feedback to gauge the webinar's success and identify areas for improvement in future events. And good soft like webinarcare is also essential if you want to host good webinar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment