Page tree
Skip to end of metadata
Go to start of metadata

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

Methode: POST

Response: JSON


ServiceRequired for addingRequired for editingDescriptionInheritedTypeExample

name(warning)(warning)The name of the service(tick)string"Ping created with API"

notes

Notes for the service(tick)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
(warning)ID of the service
integer123

host_id(warning)(warning)The host ID
integer123

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

description

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

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

[ 1,2,3 ]


priority

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

notify_period_id

ID of the notification_period(tick)integer123

notification_interval(warning)
The notification interval (in seconds)(tick)integer123

notify_on_recovery

Notification upon recovery(tick)null | integernull or 1

notify_on_warning

Notification upon warning(tick)null | integernull or 1

notify_on_unknown

Notification upon unknown(tick)null | integernull or 1

notify_on_critical

Notification upon critical(tick)null | integernull or 1

notify_on_flapping

Notification when flapping(tick)null | integernull or 1

notify_on_downtime

Notification during downtime(tick)null | integernull or 1

process_performance_data

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

active_checks_enabled

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

command_id

The command ID(tick)integer123

check_period_id

ID for the check period(tick)integer123

max_check_attempts

Number of check attempts(tick)integer123

check_interval(warning)
Check interval (in seconds)(tick)integer123

retry_interval(warning)
Retry interval (in seconds)(tick)integer123

tags

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

flap_detection_enabled

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

flap_detection_on_ok

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

flap_detection_on_warning

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

flap_detection_on_unknown

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

flap_detection_on_critical

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

is_volatile

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

freshness_checks_enabled

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

freshness_threshold

Freshness threshold value in seconds
integer123

eventhandler_command_id

Event handler ID(tick)null | integernull or 1

Contact

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

Contactgroup

IDs for the contact groups(tick)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%"
            
        }
    ]
}
  • No labels