Seitenhierarchie
Zum Ende der Metadaten springen
Zum Anfang der Metadaten

URL: https://123.123.123.123/services/add.json

Methode: POST

Response: JSON


ServiceRequired for addingRequired for editingDescriptionInheritedTypeExample

name(Warnung)(Warnung)The name of the service(Haken)string"Ping created with API"

notes

Notes for the service(Haken)string"Notes for this service"

service_url

The URL of the service
string"URL for this service"

own_contacts

null = contacts from template |

1 = contacts deviating from template


null | integernull or 1

own_contactgroups

null = contact groups from template |

1 = contact groups that differ from the template


null | integernull or 1

own_customvariables

null = no custom variables |

1 = use custom variables


null | integernull or 1

id
(Warnung)ID of the service
integer123

host_id(Warnung)(Warnung)The host ID
integer123

servicetemplate_id(Warnung)(Warnung)ID of the service template
integer123

description

Description of the service(Haken)string"Beschreibung für diesen Service"

Servicegroup
(Warnung)IDs of the service groups that contain the service
array

[ 1,2,3 ]


priority

Priority of the service (not yet implemented)(Haken)null | integernull or 1

notify_period_id

ID of the notification_period(Haken)integer123

notification_interval(Warnung)
The notification interval (in seconds)(Haken)integer123

notify_on_recovery

Notification upon recovery(Haken)null | integernull or 1

notify_on_warning

Notification upon warning(Haken)null | integernull or 1

notify_on_unknown

Notification upon unknown(Haken)null | integernull or 1

notify_on_critical

Notification upon critical(Haken)null | integernull or 1

notify_on_flapping

Notification when flapping(Haken)null | integernull or 1

notify_on_downtime

Notification during downtime(Haken)null | integernull or 1

process_performance_data

If performance data for this service is to be stored(Haken)null | integernull or 1

active_checks_enabled

This service will be actively checked(Haken)null | integernull or 1

command_id

The command ID(Haken)integer123

check_period_id

ID for the check period(Haken)integer123

max_check_attempts

Number of check attempts(Haken)integer123

check_interval(Warnung)
Check interval (in seconds)(Haken)integer123

retry_interval(Warnung)
Retry interval (in seconds)(Haken)integer123

tags

The tags for the service(Haken)string"Tags für diesen Service"

flap_detection_enabled

If flap_detection is to be activated(Haken)null | integernull or 1

flap_detection_on_ok

flap_detection when status is "ok"(Haken)null | integernull or 1

flap_detection_on_warning

flap_detection when status is "warning"(Haken)null | integernull or 1

flap_detection_on_unknown

flap_detection when status is "unknown"(Haken)null | integernull or 1

flap_detection_on_critical

flap_detection when status is "critical"(Haken)null | integernull or 1

is_volatile

If the service is to be "volatile"(Haken)null | integernull or 1

freshness_checks_enabled

If the freshness_check is set as active(Haken)null | integernull or 1

freshness_threshold

Freshness threshold value in seconds
integer123

eventhandler_command_id

Event handler ID(Haken)null | integernull or 1

Contact

The contact IDs(Haken)array[ 1,2,3 ]

Contactgroup

IDs for the contact groups(Haken)array[ 1,2,3 ]

Minimal JSON
{
    "Service" : {
        "name" : "api service",
        "servicetemplate_id":1,
        "notification_interval" : 7200,
        "check_interval" : 300,
        "retry_interval" : 60,
        "host_id": $HOST_ID
    }
}
Response on successful API call
{
  "id": "$SERVICE_ID"
}
Optional declaration of custom service command argument values
{
    "Service" : {
        "name" : "api service",
        "servicetemplate_id":1,
        "notification_interval" : 7200,
        "check_interval" : 300,
        "retry_interval" : 60,
        "host_id": $HOST_ID
    },
    "Servicecommandargumentvalue": [
        {
            "commandargument_id": "1",
            "value": "100.0,20%"
        },
        {
            "commandargument_id": "2",
            "value": "100.0,20%"
            
        }
    ]
}
  • Keine Stichwörter