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

    Figure 1 Creating an alarm rule

  6. Enter a rule name and click OK.

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

-

int

package-functionname

maxDuration

Maximum Duration

Maximum duration of function invocation

ms

-

0

-

int

package-functionname

minDuration

Minimum Duration

Minimum duration of function invocation

ms

-

0

-

int

package-functionname