Hi,
My client informed me that there are multiple domains on a single datapower device. He asked me if it would be possible to retrieve the metrics of each individual domain.
From my understanding, the plug-in currently retrieves the metrics for the overall datapower device. Please let me know if this is possible.
Thanks,
Harshal.
Answer by Chuck M. ·
Harshal,
If you run a curl command from the dT Server/Collector against that same appliance and domain, do you get a proper response?
where the curl command looks like this ...
curl -k -u uid:pwd -d @envelope.xml https://<dpdevice>:5550/service/mgmt/current
and where envelope.xml contains something like this ...
<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><dp:request domain="YOURDOMAINNAMEHERE" xmlns:dp="http://www.datapower.com/schemas/management"><dp:get-status class="ConnectionsAccepted"/></dp:request></env:Body></env:Envelope>
and the response should look something like this ...
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><d
p:response xmlns:dp="http://www.datapower.com/schemas/management"><dp:timestamp>;
2013-05-29T15:52:59-04:00</dp:timestamp><dp:status><Version xmlns:env="http://ww
w.w3.org/2003/05/soap-envelope">;
<Version>XI50.4.0.2.1</Version>
<Build>205760</Build>
<BuildDate>2011/11/15 11:02:50</BuildDate>
<WatchdogBuild>XI50.4.0.2.1</WatchdogBuild>
<InstalledDPOS>XI50.4.0.2.1</InstalledDPOS>
<RunningDPOS>XI50.4.0.2.1</RunningDPOS>
<LibraryMQ>Obsoleted by provider LibraryVersion</LibraryMQ>
<CoprocVersion>Obsoleted by provider LibraryVersion</CoprocVersion>
<LibraryXMS>Obsoleted by provider LibraryVersion</LibraryXMS>
<Serial>6804341</Serial>
<XMLAccelerator>xg3</XMLAccelerator></Version></dp:status></dp:response></env:Bo
dy></env:Envelope>
Answer by Chuck M. ·
Harshal,
Have a look at the SOMA SOAP Envelope Template property of the DataPower Monitor. It has the domain embedded in there (see below). You can create multiple instances of the monitor with different templates pointing to different domains.
<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><dp:request domain="default" xmlns:dp="http://www.datapower.com/schemas/management"><dp:get-status class=" (SOMAMONITORCLASS)"/></dp:request></env:Body></env:Envelope>
Hope that helps!
Hi Chuck,
Thank you for the reply. That is what I am looking for. I am sorry I didn't look through the template in a detailed manner.
Regards,
Harshal.
Hi Chuck,
I received a list of domains from the DP Admin; however, when I replace anyone of them with the default monitor, all the retrieved metrics have null values, as seen in the image below.
The monitor does not fail and the HostReachable metric is "1", indicating that the monitor is able to reach the host.
Am I missing anything? Is there a domain setting that needs to be enabled?
Please let me know.
Thanks,
Harshal.
Hey Harshal, how did you solve this problem? I am experiencing it as well. I think it might have something to do with following a redirect?? If I put a "1" in Max Redirects in the monitor options, I get an error "entity enclosing requests cannot be redirected without user intervention". I'm working on getting access to the collector box to curl from it to the DP server now.
EDIT: I can curl successfully (see below), but the plugin still returns null for all values except the host reachable measures
curl - k -u username:password -d @envelope.xml https://<ip>:5550/service/mgmt/current
envelope.xml:
<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><dp:request domain="EC_Gateway-PRD" xmlns:dp="http://www.datapower.com/schemas/management"><dp:get-status class="CPUUsage"/></dp:request></env:Body></env:Envelope>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><dp:response xmlns:dp="http://www.datapower.com/schemas/management"><dp:timestamp>2015-05-04T14:05:21-05:00</dp:timestamp><dp:status><CPUUsage read-only="true" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<tenSeconds read-only="true">0</tenSeconds>
<oneMinute read-only="true">0</oneMinute>
<tenMinutes read-only="true">1</tenMinutes>
<oneHour read-only="true">0</oneHour>
<oneDay read-only="true">0</oneDay></CPUUsage></dp:status></dp:response></env:Body>
Unless I am missing something, this request seems to be working as expected. Note how the following entry has a non-zero value:
"<tenMinutes read-only="true">1</tenMinutes>"
When I run locally, I get zeros for CPU but I think it is just because DP is not doing much at the moment, which seems to be the case for your DP also.
I agree with you that the curl request seems to be working as expected. However, the DataPower monitor keeps returning "null" for all values, even though I'm using the exact same username/password/IP/protocol/url/SOAP envelope as I did with curl. And if I copy the soap request out of the monitor logs and try that in curl, it works. So I'm not sure why the same thing works over curl and not from the monitor, both of which are being run from the same collector.
I see now. I thought you meant the curl was failing too... Did you try turning up the logging level on the plugin also?
After I turned the log level to fine, I realized the monitor's responses were all "authentication failure". I determined that whoever set up the monitor had a typo in the password field. Thanks for the suggestion!
Hi Jacob
I apologize for replying late. I ran into the exact same issue, i.e. authentication failure when trying to get the domain level data for DP plugin.
The DP admin verified that the username/password combination has the access to the domain.
I figured that I was seeing "Authentication Failure" because I had the domain name wrong. The domain name has to be exact, as it is in the DP device. In the SOMA template, I defined it as domain = "Contract", while in the DP, it is defined as "QA1_DP1_Contract".
After changing it to the latter, I see all the relevant metrics.
Hope that helps.
Regards,
Harshal.
JANUARY 15, 3:00 PM GMT / 10:00 AM ET