我已使用 AWS CLI 将 aws cloudwatch 日志数据导出到 Amazon S3。遵循知识库:https : //docs.aws.amazon.com/AmazonCloudWatch/latest/logs/S3ExportTasks.html。
知道我们如何导入保存在 s3 中的日志以分析数据吗?
我有一个触发 Jenkins 工作的 lambda 函数。我想在添加新的 ssm 参数时调用此 lambda。我在 cloud-watch 事件模式中添加了以下自定义事件模式。
{
"source": [
"aws.ssm"
],
"detail-type": [
"Parameter Store Change",
"Parameter Store Policy Action"
],
"detail": {
"name": [
"/dev/*"
],
"operation": [
"Create",
"Update",
"Delete",
"LabelParameterVersion"
]
}
}
Run Code Online (Sandbox Code Playgroud)
这意味着,如果我创建一个以“/dev/anystring”开头的 ssm 参数,则需要触发 lambda 但如果我提供通配符,则 lambda 不会触发。对此有何建议。?
amazon-cloudwatch aws-lambda aws-ssm amazon-cloudwatch-events
我正在尝试在kubernetes环境中为我的statefulset(for elasticsearch)设置HPA。我正计划使用cpu利用率来扩展statefulset。我已经从https://github.com/stefanprodan/k8s-prom-hpa/tree/master/metrics-server创建了度量服务器。
而我的用于statefulset的HPA yaml如下:
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: dz-es-cluster
spec:
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: StatefulSet
name: dz-es-cluster
minReplicas: 2
maxReplicas: 3
metrics:
- type: Resource
resource:
name: cpu
targetAverageUtilization: 80
Run Code Online (Sandbox Code Playgroud)
但是在hpa中获取输出如下:
Conditions:
Type Status Reason Message
---- ------ ------ -------
AbleToScale False FailedGetScale the HPA controller was unable to get the target's current scale: the server could not find the requested resource
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedGetScale 1m …Run Code Online (Sandbox Code Playgroud)