Sidebar

manual:api:reference:service:object

> Service object

The following objects are directly related to the service API.

Service

The service object has the following properties.

Property Type Description
serviceid string (readonly) ID of the service.
algorithm
(required)
integer Algorithm used to calculate the state of the service.

Possible values:
0 - do not calculate;
1 - problem, if at least one child has a problem;
2 - problem, if all children have problems.
name
(required)
string Name of the service.
showsla
(required)
integer Whether SLA should be calculated.

Possible values:
0 - do not calculate;
1 - calculate.
sortorder
(required)
integer Position of the service used for sorting.
goodsla float Minimum acceptable SLA value. If the SLA drops lower, the service is considered to be in problem state.

Default: 99.9.
status integer (readonly) Whether the service is in OK or problem state.

If the service is in problem state, status is equal either to:
- the severity of the most critical problem if it is set to 2 - “Warning” or higher (priorities 0 - “Not classified” and 1 - “Information” are ignored);
- the highest status of a child service in problem state.

If the service is in OK state, status is equal to 0.

Service tag

The service tag object has the following properties.

Property Type Description
tag
(required)
string Service tag name.
value string Service tag value.

Service time

The service time object defines periods, when an service is scheduled to be up or down. It has the following properties.

Property Type Description
ts_from
(required)
integer Time when the service time comes into effect.

For onetime downtimes ts_from must be set as a Unix timestamp, for other types - as a specific time in a week, in seconds, for example, 90000 for Mon, 1:00 AM.
ts_to
(required)
integer Time when the service time ends.

For onetime uptimes ts_to must be set as a Unix timestamp, for other types - as a specific time in a week, in seconds, for example, 90000 for Mon, 1:00 AM.
type
(required)
integer Service time type.

Possible values:
0 - planned uptime, repeated every week;
1 - planned downtime, repeated every week;
2 - one-time downtime.
note string Additional information about the service time.

Service alarm

Service alarms cannot be directly created, updated or deleted via the Zabbix API.

The service alarm objects represents an service's state change. It has the following properties.

Property Type Description
clock timestamp Time when the service state change has happened.
value integer Status of the service.

Refer the the service status property for a list of possible values.

Problem tag

Problem tags allow linking services with problem events. The problem tag object has the following properties.

Property Type Description
tag
(required)
string Problem tag name.
operator integer Mapping condition operator.

Possible values:
0 - (default) equals;
2 - like.
value string Problem tag value.