what is 'st' the param in ganglia web url - ganglia

i redirected to this url when i want json data from graph
http://xx.xx.xx.xx/ganglia/graph.php?c=my%20cluster&h=compute1&r=custom&z=default&jr=&js=&st=1467782481&cs=06%2F01%2F2016%2000%3A00&ce=06%2F30%2F2016%2000%3A00&v=100.00&m=pphjditimis2157.vmem_util&vl=%25&ti=pphjditimis2157%3A%20VM%20Memory%20Utilization&json=1
what is st parameter in the above url ?

st (source time) [Does not seem to be in use]
Current time of data source (in UNIX time)
https://github.com/ganglia/monitor-core/wiki/Web-GET-Vars.
From a wiki on Ganglia.

Related

How do I translate the following POST request into ESP8266 AT-command format?

I've got a working local website that takes in HTML form data.
The fields are:
Temperature
Humidity
The server successfully receives the data and spits out a graph updated with the new entries.
Using a browser tool, I was able to capture the actual POST request as follows:
http://127.0.0.1:5000/add_data
Temperature=25.4&Humidity=52.2
Content-Length:30
Now, I want to migrate from using the human interface browser with manual entries to an ESP01 device using AT commands.
According to the ESP AT-commands documentation, a POST request is performed using the following command:
AT+HTTPCPOST=
Find the link below for the full description of the command.
I cannot seem to get this POST request working. The ESP01 device immediately returns an "ERROR" message without any delay, as though it did not even try to send the request, that the syntax might be wrong.
Among many variations, the following is my best attempt:
AT+HTTPCPOST="http://MYIPADDR:5000/add_data",30,2,"Temperature: 25.4","Humidity: 52.2"
With MYIPADDR above replaced with my IP address.
How do I translate a post request into ESP01 AT command format, and are there any prerequisites needed to be in place to perform such a request?
I did connect the ESP01 device to the WiFi network.
Here's the link to the POST AT command description:
https://docs.espressif.com/projects/esp-at/en/release-v2.2.0.0_esp8266/AT_Command_Set/HTTP_AT_Commands.html#cmd-httpcpost
The documentation says:
AT+HTTPCPOST=url,length[,<http_req_header_cnt>][,<http_req_header>..<http_req_header>]
Response:
OK
The symbol > indicates that AT is ready for receiving serial data, and you can enter the data now. When the requirement of message length
determined by the parameter is met, the transmission starts.
...
Parameters
: HTTP URL. : HTTP data length to POST. The maximum
length is equal to the system allocable heap size.
<http_req_header_cnt>: the number of <http_req_header> parameters.
[<http_req_header>]: you can send more than one request header to the
server.
You're sending:
AT+HTTPCPOST="http://MYIPADDR:5000/add_data",30,2,"Temperature: 25.4","Humidity: 52.2"
The length is 30. The problem is that everything after the length is HTTP header fields; you need to send the variables in the body. So the command is:
AT+HTTPCPOST="http://MYIPADDR:5000/add_data",30
followed on the next line by after the ESP-01 send the > character:
Temperature=25.4&Humidity=52.2
Because you passed 30 as the body length, the ESP-01 will read exactly 30 characters after the end of the AT command and send that data as the post body. If the size of that data changes (for instance, maybe the temperature is 2.2, so one digit less), you'll need to send the new length rather than 30.

Providing the $timezone context variable does not change now() behavior in Watson Assistant

We want to work with timezones in the Watson Assistant responses.
Basically we want to implement the "good morning" sample as described here:
https://console.bluemix.net/docs/services/conversation/dialog-methods.html#date-time
When we post to this URL
https://gateway.watsonplatform.net/assistant/api/v1/workspaces/<workspaceid>/message?version=2018-02-16
using this payload (first call in the conversation)
{"context":{"$timezone":"Europe/Amsterdam"}}
We keep getting greetings based on the UTC.
When we add the now() output to the response we also do see the time according to the UTC.
The strange thing is, when we try this out in the try-out panel of the Watson Assistance workbench (browser) the output behaves as expected ?
The value should be, without the dollar sign:
{"context":{"timezone":"Europe/Amsterdam"}}
The $ is used to denote (context) variables for the short syntax, but in the payload you are working with the regular context struture and key/value pairs.

Sending HttpRequest to 2 different applications and comparing their results and performance

I have a module in an application 'A' that serves a HttpRequest and computes a redirect url. I have developed another application 'B' that was written in another language that would do the same thing as that module in A plus some more amount of computation and redirect the client to another webpage.
I require ideas on the following
Q. How do I check if B redirects to the correct Url as the module in A? ( do note that the module in A would compute some url but A might do some more additional computation and redirect to another url. I am only interested in comparing the output from the module vs B)
Q. How do I performance test B against A (load, response time, etc)?
Any ideas on this would be greatly appreciated
Thanks
You can achieve this in 2 ways, server side and client side.
For server side you can use Date object in java or any other defined way in the language you are using to get the start time for http request received and the end time after redirect url call.
Print these 2 times in log for both the cases.
For client side you can also write simple code on local machine for rest calls and log the times as I mentions for server side
Please find the demo code below:
Date start1 = new Date() ;
// first http call
//process data
// redirect call http call
Date end1 = new Date()
// print time for start1 and end1
Date start2= new Date() ;
// first http call
//process data
// redirect call http call
Date end2= new Date()
// print time for start2 and end2

Receive Prompts from a report using REST services for Pentaho

I was wondering if it is possible to receive the prompts used (with possibly all it's options) in a report using REST services.
What I like to achieve is receiving the prompts and if possible all the options for those prompts in an XML format from any given Pentaho report. I know there are rest calls for basic repository listings etc... but I can't seem to find this specific call.
It is possible to get full parameters xml (which includes parameters, parameters values, parameters attributes as far as info which is used to create report prompts) - full parameter info. You need bi server and reporting plugin. The url is:
http://localhost:8080/pentaho/api/repos/"%"3Apublic"%"3ASteel"%"20Wheels"%"3AInventory"%"20List"%"20(report).prpt/parameter
And we have to pass parameter renderMode with value: PARAMETER.
Here we call to report under /public/Steel Wheels/Inventory List (reprot).prpt
or simplifying -
"http://localhost:8080/pentaho/api/repos/<path_to_report>.prpt/parameter"
You can open browser and inspect requests responses just on fly:
On a screen is actually parameter requests you are looking for.

PayPal Rest API date filtering not working. What am I doing wrong?

I am using the ruby paypal rest api and everything I do seems to be right but PayPal keeps saying my date format is incorrect.
Here is my call:
Payment.all(:start_time => '2013-03-06T11:00:00Z', :end_time => '2013-03-06T11:00:00Z')
After many attempts I literally took the date example in the documentation: https://developer.paypal.com/webapps/developer/docs/api/
Because no matter what I do I keep getting the same response:
'{"name":"VALIDATION_ERROR","details":[{"field":"start_time","issue":"Must
be a date_time string of form yyyy-mm-ddThh:mm:ss(.sss)?Z"},{"field":"end_time","issue":"Must
be a date_time string of form yyyy-mm-ddThh:mm:ss(.sss)?Z"}],"message":"Invalid
request - see details","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#VALIDATION_ERROR","debug_id":"dcd8a9ce6a5e7"}'
Am I blind or does it not make sense?
Looks like it's a bug in our API where it's expecting raw value rather than url encoded value. The SDK was always url encoding the value of the start_time and end_time (or as a matter of fact all url parameters as per the HTTP spec). We have filed a bug and get this fixed as soon as possible. Meanwhile if this is something you need to work, we can possibly make the SDK not url encode the params or you can just modify the code for now locally.
I think your issue might be that you're setting both the start time and the end time to the same exact value. If you want a single day's worth of transactions the end time would be 2013-03-06T23:59:59Z.