我正在寻找一个 Cloudformation 模板来将 cloudwatch 日志推送到另一个帐户中的 elasticsearch。即使是同一个帐户也可以,我可以更新。
似乎是一个标准问题,但还没有看到任何模板可以自动执行https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_ES_Stream.html 中描述的步骤。
amazon-web-services aws-cloudformation amazon-cloudwatch aws-elasticsearch
我已经在公共子网中启动了 Elasticsearch,但我仍然无法从浏览器访问 Kibana 控制台。我无法理解这个问题,我已经正确配置了安全组。请参考下图了解我的设置:
还需要进行哪些其他设置才能在 VPC 中通过互联网访问 Elasticsearch。
我在使用 Elasticsearch 方面拥有丰富的经验,我使用过 2.4 版本,现在正在尝试学习新的 Elasticsearch。我正在尝试实现 Filebeat 将我的 apache 和系统日志发送到我的 Elasticsearch 端点。为了节省时间,我更愿意在公共域下通过 AWS Elasticsearch Service 启动 t2.medium 单节点实例,并且我已附加访问策略以允许每个人访问集群。AWS Elasticsearch 实例已启动并运行正常。我启动了 Ubuntu(18.04) 服务器,下载了 filebeat tar 并在中进行了以下配置filebeat.yml:
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["https://my-public-test-domain.ap-southeast-1.es.amazonaws.com:443"]
18.04- # Optional protocol and basic auth credentials.
#protocol: "https"
#username: "elastic"
#password: "changeme"
Run Code Online (Sandbox Code Playgroud)
我启用了所需的模块:
filebeat modules enable system apache
Run Code Online (Sandbox Code Playgroud)
然后根据 filebeat 文档,我更改了 filebeat 文件的所有权,并使用以下命令启动 filebeat:
sudo chown root filebeat.yml
sudo ./filebeat -e
Run Code Online (Sandbox Code Playgroud)
当我启动 filebeat 时,我遇到了以下权限和所有权问题:
Error loading config …Run Code Online (Sandbox Code Playgroud) amazon-web-services elasticsearch aws-elasticsearch elastic-beats
我的 AWS ElasticSearch 集群运行状况变为红色,我无法访问它,并且它始终显示
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
请告诉我如何恢复?我每天都会手动备份,但问题是每当我使用 访问时CURL,它总是返回 502 结果。
curl -XGET 'https://xxxx2.es.amazonaws.com/_snapshot?pretty'
Run Code Online (Sandbox Code Playgroud)
它总是返回 502,因为我的集群变为红色。
我已将https://github.com/aws-samples/amazon-elasticsearch-service-with-cognito部署到我的堆栈中,并尝试master按照https://docs.aws.amazon.com/elasticsearch添加一个组-service/latest/developerguide/fgac.html#fgac-walkthrough-iam
diff --git a/lib/search-stack.ts b/lib/search-stack.ts
index 85de0c0..2493c92 100644
--- a/lib/search-stack.ts
+++ b/lib/search-stack.ts
@@ -3,7 +3,7 @@
import { Fn, Stack, Construct, StackProps, CfnParameter, CfnOutput } from '@aws-cdk/core';
import { CfnDomain } from '@aws-cdk/aws-elasticsearch';
-import { UserPoolAttribute, CfnUserPoolDomain, CfnIdentityPool, CfnIdentityPoolRoleAttachment, CfnUserPool } from '@aws-cdk/aws-cognito';
+import { UserPoolAttribute, CfnUserPoolDomain, CfnIdentityPool, CfnIdentityPoolRoleAttachment, CfnUserPool, CfnUserPoolGroup } from '@aws-cdk/aws-cognito';
import { Role, ManagedPolicy, ServicePrincipal, FederatedPrincipal } from '@aws-cdk/aws-iam';
import { CustomResource } from '@aws-cdk/aws-cloudformation';
@@ -55,6 …Run Code Online (Sandbox Code Playgroud) 我正在尝试在 aws 控制台上安装 AWS ElasticSearch 服务。其中我已经能够正确设置相同的内容。但当通过端点 URL 运行它时,它指出“身份验证最终失败”。
网址:
https://search-indtuning-v2-elastic-ktcb6cvtse6jov5jcrsi4r27rq.ap-south-1.es.amazonaws.com/
Run Code Online (Sandbox Code Playgroud)
关联:
Authentication finally failed
Run Code Online (Sandbox Code Playgroud)
我无法获得相同的完整参考。谁能告诉我我做错了什么吗?
我的 AWS Elasticsearch 集群的 JVM 内存压力一直在增加。我在过去 3 天看到的模式是每 1 小时增加 1.1%。这是我提供的 3 个主节点之一。
所有其他指标似乎都在正常范围内。CPU 低于 10%,几乎没有任何索引或搜索操作正在执行。
我已经尝试清除本文档中fielddata提到的所有索引的缓存,但这没有帮助。
谁能帮我理解这可能是什么原因?
我正在尝试通过用 Go 编写的索引作业创建索引。我可以使用我的访问密钥和密钥来访问 AWS 上的 ES 集群。
我可以使用 Kibana 轻松创建索引,但是当我尝试使用 Go 客户端时,它不起作用并返回 403 禁止错误。
AWS Elasticsearch 政策:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "es:*",
"Resource": "arn:aws:es:<region>:111111111111:domain/prod-elasticsearch/*"
}
]
}
Run Code Online (Sandbox Code Playgroud)
索引.go
package main
import (
"flag"
"fmt"
"log"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/olivere/elastic/v7"
"github.com/spf13/viper"
aws "github.com/olivere/elastic/v7/aws/v4"
)
func main() {
var (
accessKey = viper.GetString("aws.access_key")
secretKey = viper.GetString("aws.secret_key")
url = viper.GetString("elasticsearch.host")
sniff = flag.Bool("sniff", false, "Enable or disable sniffing")
region = flag.String("region", "ap-southeast-1", "AWS Region name") …Run Code Online (Sandbox Code Playgroud) 我在 AWS 中有一个 Elasticsearch 集群,并被告知该集群的最小存储空间约为 2GB。在升级每个节点上的存储之前,我决定深入挖掘一下。作为参考,该集群有 8 个节点,每个节点上有 35GB 存储空间。我很难理解为什么每个节点的 FreeStorageSpace 指标(以及集群的最小 FreeStorageSpace 指标)不一致。
在ES实例健康度选项卡中查看每个节点的可用存储空间:
当我猫/分配时:
最终,我试图确定我的节点上报告的剩余存储空间最少的可用存储空间是根据 Cloudwatch 指标为 2GB,还是根据 cat 分配 API 为 8.8GB - 这将帮助我决定如何扩展。据我了解,Amazon ES 在每个实例上保留一定比例的存储空间用于内部操作,但我认为这会减少disk.avail上图中的存储空间。任何关于为什么这些不排队的见解都会很棒。
有什么方法可以在不使用 DocumentDb 的情况下将 AWS OpenSearch 与 MongoDB 连接起来?我有一个基于 Nest.js 和 ReactJs 的应用程序,我想在其中使用 OpenSearch 服务
mongodb amazon-web-services aws-elasticsearch nestjs aws-documentdb-mongoapi