Http retriever and cookies
Any way to pass post variables and/or cookie information for the http retriever data source?
From the command line using curl, the string would look something like this:
curl -b "device-id=anonymous" http://webserver.web.com/~abspath/%23ac-c1a-01?as=action-set&oldlocation=7
No, POST parameters are not currently supported. But since you already have GET parameters in the url, can you not just say:
The webserver is looking for a cookie, apparently that's how the server authenticates. Using the -b with curl sets the cookie variables, but passing the same variable as a get does not seem to work.
Is there a place in source code to modify the retriever?
Is there a place in data source to run a script every x minutes? I could easily write a perl script or shell script to run the curl and parse the results as an output.
Mango doesn't do scripts because it is meant to be O/S agnostic. Ok, yeah, there is a vmstat data source, so that ideal has been blown. I guess it should be easy enough to create a new data source that can initiate a process and then handle the results.
I guess it should be easy enough to create a new data source that can initiate a process and then handle the results.
I can write this, as I need it, and pass it back to you. I'll take a look at the vmstat and see how that goes.
I ended up using net-snmp locally on the box, and passing an exec command. Then via mango, use SNMP data source to query the values. An expensive hack, but works fine on a small scale.