November 23, 2017


# Gets the actual monitor agent configuration
# the values can be modified and change using the SoftLayer_Monitoring_Agent::applyConfigurationValues
# Important manual pages:
# License:
# Author: SoftLayer Technologies, Inc. <>
require 'softlayer_api'

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

# The monitor agent ID you which to get the actual configuration
monitor_agent_id = 121_169_6

# Declaring the API client to use the SoftLayer_Product_Package API service
client = USERNAME, api_key: API_KEY, endpoint_url: ENDPOINT_URL)
monitor_service = client.service_named("SoftLayer_Monitoring_Agent")

  # Getting the actual configuration for the monitor
  result = monitorService.object_with_id(monitor_agent_id).getConfigurationValues
  puts result
rescue StandardError => exception
  puts "Unable to get the configuration of the agent: #{exception}"


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