DX Unified Infrastructure Management

 View Only
  • 1.  API to configure url_response (any probe ) without having to manually configure

    Posted Jul 19, 2019 08:04 AM
    Hello Team , 

    I have situation where we have to configure 100+ urls for monitoring using  url response , do we have better way of configuring url response without having to configuring manually for 100 urs in the config files? can i using UIM API to configure all urls in go ? Can you please throw some light on this / may be some examples will be great help.

    Thanks 
    Devi


  • 2.  RE: API to configure url_response (any probe ) without having to manually configure

    Posted Jul 23, 2019 01:09 PM
    Hi. You can create a automation (script) to configure by API or PU.

    API: https://docops.ca.com/ca-unified-infrastructure-management-probes/ga/en/probe-development-tools/restful-web-services/webservices_rest-apis/webservices_rest-call-reference/probe-calls#ProbeCalls-UpdateProbeConfigurationValues(Multiple)

    Probe Utility (PU): you can use the controller callback "probe_config_set"


  • 3.  RE: API to configure url_response (any probe ) without having to manually configure

    Posted Jul 25, 2019 05:21 AM
    Thanks a lot for the response Adriano , i will explore these options.


  • 4.  RE: API to configure url_response (any probe ) without having to manually configure

    Posted Jul 26, 2019 07:32 AM
    hey @Adriano Miranda

    i dont know if i missing something over here . In API i only see get, update config and delete (no create), and tried using ​update API profile to create a profile for url response , however it doesn't seem to be working . 

    def updateprobe():
    urllib3.disable_warnings()

    auth = ('xxxxxxx', 'xxxxxxxxxxxx')
    with open('create_profile.json') as json_file:
    json_data = json.load(json_file)
    headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
    url = 'http://hostanme.com/rest/probe/<****>/<****>/<****>/url_response/config'
    r = requests.post(url, auth=auth, data=json.dumps(json_data), headers=headers)
    print (r.status_code)
    {
    "probeConfigKey":[
    {
    "key":"/profiles/test2/profName",
    "value":"test2"
    },{
    "key":"/profiles/test2/url",
    "value":"http://hostaname.com/status.xml"
    }
    ]
    }

    what is that callback API ? i didnt see any description on what it is intended for , also i deployed the pu probe , but dont know how that can be used in this case .
    Any pointer will be helpfull .


    Thanks 
    Devi


  • 5.  RE: API to configure url_response (any probe ) without having to manually configure

    Posted Jul 26, 2019 09:56 AM
    Edited by Luc Christiaens Jul 27, 2019 02:35 AM
    If you have, or deploy, the package webservices_rest (in XML), you can use:
    ----
    curl -v -u administrator:xxx -X PUT -H "Content-Type: application/xml" -d "<probeConfigKeys><configkey><key>profiles/bgbulab57_uimapi_proximus/url</key><value>http://www.proximus.be</value></configkey><configkey><key>profiles/bgbulab57_uimapi_proximus/QoS_bytes_sec</key><value>yes</value></configkey><configkey><key>profiles/bgbulab57_uimapi_proximus/QoS_bytes</key><value>yes</value></configkey><configkey><key>profiles/bgbulab57_uimapi_proximus/QoS_download_time</key><value>yes</value></configkey><configkey><key>profiles/bgbulab57_uimapi_proximus/QoS_redirect_time</key><value>yes</value></configkey><configkey><key>profiles/bgbulab57_uimapi_proximus/QoS_firstbyte_time</key><value>yes</value></configkey><configkey><key>profiles/bgbulab57_uimapi_proximus/QoS_tcpconnect_time</key><value>yes</value></configkey></probeConfigKeys>" http://bgbulab57/rest/probe/bgbulab57_domain/bgbulab57_hub/bgbulab57/url_response/config
     -------
    Via the UIMAPI (in JSON):
    curl -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' -d '[ { "key":"profiles/bgbulab57_uimapi_google/url","value":"http://www.google.com"},{"key":"profiles/bgbulab57_uimapi_google/QoS_bytes_sec","value":"yes"},{"key":"profiles/bgbulab57_uimapi_google/QoS_bytes","value":"yes"},{"key":"profiles/bgbulab57_uimapi_google/QoS","value":"yes"},{"key":"profiles/bgbulab57_uimapi_google/active","value":"yes"},{"key":"profiles/bgbulab57_uimapi_google/QoS_download_time","value":"yes"},{"key":"profiles/bgbulab57_uimapi_google/QoS_redirect_time","value":"yes"},{ "key":"profiles/bgbulab57_uimapi_google/QoS_firstbyte_time","value":"yes"},{"key":"profiles/bgbulab57_uimapi_google/QoS_tcpconnect_time","value":"yes" }]' 'http://bgbulab57/uimapi/probes/bgbulab57_domain/bgbulab57_hub/bgbulab57/url_response/config'


  • 6.  RE: API to configure url_response (any probe ) without having to manually configure

    Posted Jul 29, 2019 04:25 AM
    Thanks a lot Luc for that , Let me check this out . Appreciate  this .