November 23, 2017
Create network monitoring

The script creates a monitoring network with Service ping
in a determinate IP address

Important manual pages

Author: SoftLayer Technologies, Inc. <>
import SoftLayer.API
from pprint import pprint as pp

# Your SoftLayer API username and key.
USERNAME = 'set me'
API_KEY = 'set me'

# The ID of the server you wish to monitor
serverId = 7698842

ID of the query type which can be found with SoftLayer_Network_Monitor_Version1_Query_Host_Stratum/getAllQueryTypes.
This example uses SERVICE PING: Test ping to address, will not fail on slow server response due to high latency or
high server load
queryTypeId = 1

# IP address on the previously defined server to monitor
ipAddress = ''

# Declare the API client
client = SoftLayer.Client(username=USERNAME, api_key=API_KEY)
networkMonitorVersion = client['SoftLayer_Network_Monitor_Version1_Query_Host']

# Define the SoftLayer_Network_Monitor_Version1_Query_Host templateObject.
newMonitor = {
    'guestId': serverId,
    'queryTypeId': queryTypeId,
    'ipAddress': ipAddress

# Send the request for object creation and display the return value
    result = networkMonitorVersion.createObject(newMonitor)
except SoftLayer.SoftLayerAPIError as e:
    print("Unable to create new network monitoring "
          % (e.faultCode, e.faultString))


If this article contains any error, or leaves any of your questions unanswered, please help us out by opening up a github issue.
Open an issue