Help Center/ FunctionGraph/ User Guide/ Monitoring/ Metrics/ Creating an Alarm Rule
Updated on 2024-11-12 GMT+08:00

Creating an Alarm Rule

After creating a function and trigger, you can monitor the invocation and running statuses of the function in real time.

Viewing Function Metrics

FunctionGraph differentiates the metrics of a function by version, allowing you to query the metrics of a specific function version.

Procedure

Create an alarm rule for a function to report metrics to Cloud Eye so that you can view monitoring graphs and alarm messages on the Cloud Eye console.

  1. Log in to the FunctionGraph console. In the navigation pane, choose Functions > Function List.
  2. Click the name of the desired function.
  3. On the displayed function details page, select a function version or alias, and choose Monitoring > Metrics.
  4. Click Create Alarm Rule.
  5. Set alarm parameters and click Next as shown in Figure 1.

    Figure 1 Creating an alarm rule

  6. Enter a rule name and click OK.

After a function is deleted, the alarm rules created for it will not be updated in real time on the Cloud Eye console and may continue to be displayed there for a maximum of seven days.

Function Metrics

Table 1 lists the function metrics that can be monitored by Cloud Eye.

Table 1 Function metrics

Metric

Display Name

Description

Unit

Upper Limit

Lower Limit

Recommended Threshold

Value Type

Dimension

count

Invocations

Number of function invocations

Count

-

0

-

int

package-functionname

failcount

Errors

Number of invocation errors

Count

-

0

-

int

package-functionname

rejectcount

Throttles

Number of function throttles

Count

-

0

-

int

package-functionname

duration

Average Duration

Average duration of function invocation

ms

-

0

-

float

package-functionname

maxDuration

Maximum Duration

Maximum duration of function invocation

ms

-

0

-

float

package-functionname

minDuration

Minimum Duration

Minimum duration of function invocation

ms

-

0

-

float

package-functionname

concurrency

Concurrency

The number of requests that can be processed concurrently

Count

-

0

-

int

package-functionname

payPerUseInstance

Elastic Instances

Number of instances actually used by a function after reserved instances are excluded

Count

-

0

-

int

package-functionname

failRate

Error Rate

Percentage of errors to the total invocations of a function

%

-

0

-

float

package-functionname

functionErrorCount

Function Error Count

Number of function errors that occur during invocation

Count

-

0

-

float

package-functionname

memoryUsed

Memory

Memory used by the function

MB

-

0

-

float

package-functionname

duration_p500

Duration (P50)

P50 execution duration of the function

ms

-

0

-

float

package-functionname

duration_p800

Duration (P80)

P80 execution duration of the function

ms

-

0

-

float

package-functionname

duration_p950

Duration (P95)

P95 execution duration of the function

ms

-

0

-

float

package-functionname

duration_p990

Duration (P990)

P990 execution duration of the function

ms

-

0

-

float

package-functionname

duration_p999

Duration (P999)

P999 execution duration of the function

ms

-

0

-

float

package-functionname

instances

Instances

Number of instances for function invocation

Count

-

0

-

int

package-functionname

systemErrorCount

System Errors

Number of system errors that occur during function invocation

Count

-

0

-

int

package-functionname

reservedinstancenum

Reserved Instances

Number of reserved instances

Count

-

0

-

int

package-functionname

functionCost

Resource Usage

Resources used by the function (Memory x Duration)

MB

-

0

-

float

package-functionname

Table 2 Flow metrics

Metric

Display Name

Description

Unit

Upper Limit

Lower Limit

Recommended Threshold

Value Type

Dimension

ExecutionsStarted

Executions Started

Number of instances that start to execute

Count

-

0

-

int

ProjectId

ExecutionsAborted

Executions Aborted

Number of instances that are aborted

Count

-

0

-

int

ProjectId

ExecutionsTimedOut

Executions TimedOut

Number of instances that run out of time

Count

-

0

-

int

ProjectId

ExecutionsSucceeded

Executions Succeeded

Number of instances that execute successfully

Count

-

0

-

int

ProjectId

ExecutionsFailed

Executions Failed

Number of instances that execute unsuccessfully

Count

-

0

-

int

ProjectId