I'm trying to use Http_poller input plugin, to get results from an API, it works fine while the access token is valid, however its only valid for one hour, I want to be able to refresh the access token with the refresh token that I already have, using a post request.
So I'm not sure how to make this post request for the refresh. and how to change the URL to have the new access token.
it doesn't have to be this plugin, I'm thinking I could use conditionals and other input plugins to accomplish the refresh every hour. however not sure which one can let me do post and how to store the value.
Thing is LS has no concept of time passed, it doesn't really track things like cron (for eg). Plus you'd have to restart LS every time you changed the config (at least until 2.X release).
@rmarji when I built HTTP Poller I put a lot of the client config and options setup in the HTTP Client mixin . I hope that's helpful as far as building your own plugin!
Is there any documentation of what a mixin is? I see them all the time in scanning github, so I know they are encapsulating something. Did you folks document that?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.