Hello all,
i have inherited a prometheus system to look after, this was setup by the 
person before and just finding my feet with how it all works.

So as far as I can see , CloudWatch Exporter gets the info from cloudwatch 
> passes to Prometheus then to alert manager which then posts to in this 
case PagerDuty.

My question is - the Lambda does not seem to report when there is an issue 
so unsure if this is setup correctly?

Does anyone have any examples of Cloudwatch exporter and prometheus alert 
files they can show as an example for scraping Lambda errors, I have the 
below setup but they dont seem to work? (sorry noob to this) or is there a 
better option than cloudwatch exporter?

CloudWatch Exporter file:

  - aws_namespace: AWS/Lambda
    aws_metric_name: ConcurrentExecutions
    aws_dimensions: []
    aws_statistics: [Average]
  - aws_namespace: AWS/Lambda
    aws_metric_name: Errors
    aws_dimensions: [FunctionName,Resource]
    aws_statistics: [Sum]

  - aws_namespace: AWS/Lambda
    aws_metric_name: lambda_auth_errors
    aws_dimensions: []
    aws_statistics: [Sum]

Prometheus yml file content

  #QUEUEPROCESSOR_ERRORS
  - alert: FUNCTION-QUEUEPROCESSOR_ERRORS
    expr: (aws_lambda_errors_sum{functionname="function-QueueProcessor"} 
offset 8m) > 0
    labels:
      severity: error
      capability: function
      service: aws/lambda
    annotations:
      summary: "Multiple LAMBDA Errors "
      description: "There has been more than 1 LAMBDA errors within 30 
minutes for Function Capability"
      category: "Software/System"
      subcategory: "Problem/Bug"
      instance: "Function Capability - P"
      environment: "Production"

AlertManager yml content

    #FUNCTION-LAMBDA
    - match:
        capability: function
        service: aws/lambda
      receiver: function-lambda


#FUNCTION-LAMBDA
- name: 'function-lambda'
  pagerduty_configs:
  - routing_key: 'xxxxxxx'
    severity: '{{if .CommonLabels.severity }}{{ .CommonLabels.severity | 
toLower}}{{ else }}error{{ end}}'
    description: '[FIRING:{{ .Alerts.Firing | len }}] {{ 
.CommonAnnotations.summary }}'

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/f051f9c1-9719-492a-948a-5a8fc440a63en%40googlegroups.com.

Reply via email to