Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

  • Hello -

    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

    Regards,

    Daniel


  • No, POST parameters are not currently supported. But since you already have GET parameters in the url, can you not just say:

    http://webserver.web.com/~abspath/%23ac-c1a-01?as=action-set&oldlocation=7&device-id=anonymous
    

  • 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.


  • I see.

    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.


  • @mlohbihler said:

    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.

    -Daniel


  • 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.

    -Dan