Setting Up Your Lambda Function Metrics Dashboard
Interested in using the Coralogix AWS Lambda Telemetry Exporter v.0.2.0 to collect and send us Lambda function metrics? This tutorial provides two methods for setting up a dashboard for monitoring a single Lambda function:
Import a pre-built dashboard to Granfana (recommended)
Manually create a dashboard that fits your specific needs
Import a Pre-Built Dashboard
Download the attached JSON file.
Import the file to Grafana as a pre-built dashboard.
Create a Dashboard
Use the example presented here to create a dashboard that fits your specific needs.
Create a new Coralogix - Grafana dashboard.
Select Apps > Grafana Labs in the upper right-hand menu of your Coralogix dashboard.
Click Dashboard settings
Create a new variable
Select Variables in the left-hand menu > Click Add variable
Create a new variable with the input below > Click update
Name:
faas_nameType:
ConstantValue: Input the Lambda function that you wish to monitor. (Using a constant will make it easy to replicate the dashboard for other functions in the future.)
Create panels.
Create an ‘Invocations’ panel. Click Add panel > Add empty panel
Set options:
Panel options > Title =
InvocationsLegend > Legend mode =
HiddenStandard options > Unit =
requests/sec (rps)Standard options > Min =
0
Add queries:
sum(increase(faas_executions_total{faas_name="$faas_name"}[1m])) OR on() vector(0)
Create a ‘Durations’ panel (per invocation). Click Add panel > Add empty panel
Set options:
Panel options → Title =
Durations (per invocation)Standard options → Unit =
milliseconds (ms)Standard options → Min =
0
Add queries:
sum(increase(faas_init_duration_ms_sum{faas_name="$faas_name"}[1m])) / sum(increase(faas_invoke_duration_ms_count{faas_name="$faas_name"}[1m]))with Legend =Initialisation duration (averaged over all invocations)sum(increase(faas_restore_duration_ms_sum{faas_name="$faas_name"}[1m])) / sum(increase(faas_invoke_duration_ms_count{faas_name="$faas_name"}[1m]))with Legend =Restoration duration (averaged over all invocations)sum(increase(faas_invoke_duration_ms_sum{faas_name="$faas_name"}[1m])) / sum(increase(faas_invoke_duration_ms_count{faas_name="$faas_name"}[1m]))with Legend =Average invoke durationsum(increase(faas_overhead_duration_ms_sum{cx_subsystem_name="lambda-telemetry-test"}[1m])) / sum(increase(faas_invoke_duration_ms_count{cx_subsystem_name="lambda-telemetry-test"}[1m]))with Legend =Average overhead (runtime after invoke) duration
Create an ‘Errors/Timeouts’ panel. Click Add panel > Add empty panel
Set options:
Panel options > Title =
Errors/TimeoutsStandard options > Unit =
requests/sec (rps)Standard options > Min =
0
Add queries:
sum(increase(faas_errors_total{faas_name="$faas_name"}[1m])) OR on() vector(0)with Label =errorssum(increase(faas_timeouts_total{faas_name="$faas_name"}[1m])) OR on() vector(0)with Label =timeouts
Create a ‘Memory Consumption’ panel. Click Add panel > Add empty panel
Set options:
Panel options > Title =
Memory ConsumptionStandard options > Unit =
megabytesStandard options > Min =
0
Add queries:
max(faas_mem_usage_MB{faas_name="$faas_name"})with Label =maximum memory consumptionmax(faas_mem_limit_MB{faas_name="$faas_name"})with Label =available memory
Create a ‘Cold Invocations’ panel. Click Add panel > Add empty panel
Set options:
Panel options > Title =
Cold InvocationsStandard options > Unit =
requests/sec (rps)Standard options > Min =
0
Add queries:
sum(increase(faas_init_duration_ms_count{faas_name="$faas_name"}[1m]))with Label =Cold invocationssum(increase(faas_restore_duration_ms_count{faas_name="$faas_name"}[1m]))with Label =Restorations
Create an ‘Initialization / Restoration Duration’ panel. Click Add panel > Add empty panel
Set options:
Panel options > Title =
Initialization / Restoration DurationStandard options > Unit =
milliseconds (ms)Standard options > Min =
0
Add queries:
sum(increase(faas_init_duration_ms_sum{faas_name="$faas_name"}[1m])) / sum(increase(faas_init_duration_ms_count{faas_name="$faas_name"}[1m]))with Label =Cold invocationssum(increase(faas_restore_duration_ms_sum{faas_name="$faas_name"}[1m])) / sum(increase(faas_restore_duration_ms_count{faas_name="$faas_name"}[1m]))with Label =Average restoration duration
Enjoy your Lambda Function Dashboard!
Support
Need help?
Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.
Contact us via our in-app chat or by emailing support@coralogix.com.

