Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

DescriptionCreate a metric

URL

/api/metrics

MethodPOST
 Security

Requires Global Administrator role to create a metric

Examples

  1. Create a metric:
    • Category: Alert
    • Name: myAlertName
    • Description: myAlertDescription???
    • ???
    • ???
       

      Code Block
      languagenone
      curl -u admin:admin -d "resource=org.apache.struts:struts&category=Alert&name=myAlertName&description=myAlertDescription" http://localhost:9000/api/events
      ??????????????????????????????,

Parameters

Parameter

Description

Required

Default Value

description

Description of the metric

 

None

direction

Possible values: -1, 0, 1

 None

domain

 

 None
name  None

qualitative

Is it a qualitative metric?
Possible values: 0, 1

 None
val_type

Value type.
Possible values: PERCENT, INT, FLOAT, STRING, BOOL, MILLISEC

 None
user_definedCan user fill measures online?
Possible values: true, false 
 None

Update a Metric

DescriptionUpdate a metric

URL

/api/metrics

MethodPUT
 Security

Requires Global Administrator role to update a metric

Examples

  1. Update metric 'myMetric':
    • ???
    • ???
    • ???
       

      Code Block
      languagenone
      ??????????????????????????????,

Parameters

Parameter

Description

Required

Default Value
idid of the metricYes NoneNone

description

Description of the metric

 No 

 NoneNone

direction

Possible values: -1, 0, 1

 No  None

domain

 

 
No  None
name  No None

qualitative

Is it a qualitative metric?
Possible values: 0, 1

No  None
val_type

Value type.
Possible values: PERCENT, INT, FLOAT, STRING, BOOL, MILLISEC

No None
user_definedCan user fill measures online?
Possible values: true, false 
No None