cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to set up CURL for windows collector?

rajanikanthanka
Inactive

Hello everyone,

I am working with Datapower plugin. I am having issues with displaying data in dashboard. I want to set up CURL on my collector and for CPU Usage metrics and other metrics to see XML response
By something like this
curl -k -u user:password -d @soma_getstatus.xml https://DataPowerIP:Port/service/mgmt/current

. Can anyone please help me to set up curl on my collector? I downloaded several curl.zip files but none of them has curl.exe file.

I already posted this issue but it was not resolved.just pasting the link here again.

https://answers.dynatrace.com/questions/171378/dat...

4 REPLIES 4

Joe_Hoffman
Dynatrace Champion
Dynatrace Champion

Normally we don't support products other than our own, but I believe you can acquire a fully functional CURL implementation for Windows from this site: https://curl.haxx.se/download.html (go down to the Windows section and select one of the providers of pre-built Windows. You might have to copy the curl.exe file to a Windows directory to make it available, or modify your PATH variable.

Good luck.

But on my collector it is not allowing me to set environmental variables(unable to click on advanced system settings).

I'm not sure I can help you, as this sounds like an Operating System issue, not an issue with Dynatrace. Can you clarify why this is a Dynatrace issue?

I was asked to do this

Browsers don't always know what to do with an XML response. Either that or the request is returning nothing. Nevertheless, you are better off using a command line tool like curl or wget. Both are freely available.

Below is an example of using curl for CPUUsage metrics, the request/response is shown below. Make sure to do this from the same Collector machine that is running the DP Plugin. A sample response is shown below as well. If you don't get a nice XML response like below, then the plugin will also fail for the same reason. Best to make sure this works properly before digging into what the DP Plugin is doing.

Put the request XML below into a file called soma_getstatus.xml and issue this command ...

curl -k -u user:password -d @soma_getstatus.xml https://DataPowerIP:Port/service/mgmt/current

Request

<?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/>

</dp:request>

</env:Body>

</env:Envelope>

Response

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">

<env:Body>

<dp:response xmlns:dp="http://www.datapower.com/schemas/management">

<dp:timestamp>2008-03-19T17:32:17+01:00</dp:timestamp>

<dp:status>

<CPUUsage xmlns:env="http://www.w3.org/2003/05/soap-envelope">

<tenSeconds>5</tenSeconds>

<oneMinute>3</oneMinute>

<tenMinutes>6</tenMinutes>

<oneHour>6</oneHour>

<oneDay>6</oneDay>

</CPUUsage>

</dp:status>

</dp:response>

</env:Body>

</env:Envelope>

So I have to set up curl first of all to run that command.