Topic

elasicsearch

A collection of 3 issues

[AWS][Elasticsearch]API Synthetics Monitoring工具的简单比较

针对API Synthetics Monitoring (主要是Endpoint Uptime), 可以选择Elastic的Heartbeat或者AWS新推出的Cloudwatch Synthetics Canaries. AWS Cloudwatch Canaries 定义如下即可: * Method: GET/POST * Application or Endpoint URL * Headers Key Value Pairs * Request data 它会提供一个js的runtime, 新建一个lambda来跑,因而可以定义它所在的VPC, Subnet和SecurityGroup * Data retention period * Data storage, 其实就是S3。默认自动生成。 * IAM role, 默认自动生成,也可以使用existing role, "need your permission to put artifacts into S3, and
2 min read

[AWS][Elasticsearch]记又一次Elasticsearch捕捉日志问题及解决

之前有过一次,可参见[AWS]记一次Elasticsearch无法捕捉到fargate log的解决 [https://hanzhu.dev/ghost/#/editor/post/5e15e98ae936373176049064] 错误现象 第一步跑去查看lambda有没有报错日志,发现需先在Lambda里开启更详细的日志: // Set this to true if you want to debug why data isn't making it to // your Elasticsearch cluster. This will enable logging of failed items // to CloudWatch Logs. var logFailedResponses = false; 看到类似于如下的报警信息: this action would
3 min read

[AWS][Elasticsearch]记一次Elasticsearch无法捕捉到fargate log的解决

说问题前,首先说一下这个做法的思路和实现步骤: * Cloudformation定义Resource时需要AWS::Logs::LogGroup * 在Cloudwatch Log group里找到对应ECS fargate产生的Log, 选中后Actions-->Stream to Amazon Elasticsearch Service,选中已创建的ES Cluster, 选择Log Format,后续会自动生成对应的Lambda和Role * 修改Lambda, 将indexName由原先的 payload.logEvents.forEach(function(logEvent) { var timestamp = new Date(1 * logEvent.timestamp); var indexName = [ 'cw-' + timestamp.getUTCFullYear(), // year ('0' + (timestamp.getUTC
2 min read

Subscribe to 隅

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe