DataPower

 View Only
  • 1.  Soma script to check if any probes enabled

    Posted Tue July 14, 2020 11:44 AM
    Hello Team,

    I am having a requirement to check probes enabled in datapower.
    Can you please help me to find a soma script to check if any probes enabled on MPG/WSP/XMLFW.

    Trying to create with get-config but no luck.
    Below is the sample i tried.

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dp="http://www.datapower.com/schemas/management">
    <soapenv:Header/>
    <soapenv:Body>
    <dp:request domain="STAGEESB">
    <dp:get-config>
    <MultiProtocolGateway>
    <DebugMode>on</DebugMode>
    </MultiProtocolGateway>
    </dp:get-config>
    </dp:request>
    </soapenv:Body>
    </soapenv:Envelope>


    Thanks,
    Sivakumar

    ------------------------------
    Sivakumar

    ------------------------------


  • 2.  RE: Soma script to check if any probes enabled

    Posted Tue July 14, 2020 12:20 PM
    The CLI to use is 'show domains', don't forget the "s" on the end of domain.  


    ------------------------------
    Ivan Heninger
    ------------------------------



  • 3.  RE: Soma script to check if any probes enabled

    Posted Tue July 14, 2020 01:55 PM
    You can't check individual settings like that. You have to get all the names of your objects (MPGW, WSP, etc) and then spin through them with a get-config. You then need to check the results of each get-config and verify that DebugMode is off.

    Personally, what I have done in the past is just write a script to set all service object's debug mode to off to make sure all probes are off.

    --Charlie

    ------------------------------
    Charlie Sumner
    ------------------------------



  • 4.  RE: Soma script to check if any probes enabled

    IBM Champion
    Posted Mon July 20, 2020 05:49 AM
    Would you share the idea of this script, please? :)

    ------------------------------
    Leandro Takeda
    ------------------------------



  • 5.  RE: Soma script to check if any probes enabled

    Posted Mon July 20, 2020 06:06 AM
    Charlie ,Thanks for your response. Could you share the script please or any references.

    Thanks,
    Sivakumar

    ------------------------------
    Sivakumar Kothakota Websphere Datapower,CastIron developer
    Miracle Software Systems
    Visakhapatnam, Andhrapradesh AP
    (248) 233-1870
    ------------------------------



  • 6.  RE: Soma script to check if any probes enabled

    Posted Mon July 20, 2020 09:36 AM
    My scripts are old and have not been updated to the latest version of python, so I won't be sharing them, but here is the general logic.

    SOMA get-status class="DomainStatus"
    parse response and loop through each domain name
    SOMA get-status class="ObjectStatus"
    parse response and loop through each service object (mpgw, ws Proxy, XMLFW, etc.)
    for each service type, for each name of the service type object, execute the following SOMA:
    <dp:request domain="domainname">
    <dp:modify-config>
    <ServiceType name="ServiceName">
    <DebugMode>off</DebugMode>
    </ServiceType>
    </dp:modify-config>
    </dp:request>

    <dp:request domain="domainname">
    <dp:do-action>
    <SaveConfig/>
    </dp:do-action>
    </dp:request>

    (The italicized text above must be replaced with your service object types and names)

    --Charlie

    ------------------------------
    Charlie Sumner
    ------------------------------