-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interconnection with sinx stats aggregator #58
Comments
Yes, that would be a nice example for out-of-tree plugin. Sorry if I missed something, but how is that different from, well, querying redis directly (using, say, this library)? Or do you want it to interact with sinx via the HTTP API? If so, we already have an example of such a widget. |
I'm thinking about a module that interacts with redis but natively reads the configuration for the sinx tools, e.g. To auto-handle the user-configured sinx prefix.
…On Tuesday, 24 December 2019, Victor wrote:
Yes, that would be a nice example for out-of-tree plugin.
Sorry if I missed something, but how is that different from, well, querying redis directly (using, say, [this library](https://github.com/nrk/redis-lua))?
Or do you want it to interact with sinx via the HTTP API? If so, we already have [an example of such a widget](https://github.com/shdown/luastatus/blob/master/examples/i3/btc-price.lua).
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#58 (comment)
|
OK, so do you have a command to get the prefix? Are there any other configuration variables that need to be read? |
The prefix can be set in the configuration file, which can be found at the paths described [here](https://github.com/Arteneko/sinx/blob/master/README.md#configuration).
By default, the prefix is `sinx`.
The full key in redis is `<prefix>::<key>`.
…On Tuesday, 24 December 2019, Victor wrote:
OK, so do you have a command to get the prefix? Are there any other configuration variables that need to be read?
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#58 (comment)
|
I may look into implementing this, but never really worked with Lua.
If I start a poc before you do, I'll submit it for review so you can use it as a base to implement a clean version, I guess.
…On Tuesday, 24 December 2019, Victor wrote:
Okay, so we can just parse the config file(s) using [lua-toml](https://github.com/jonstoler/lua-toml), and then query redis using [redis-lua](https://github.com/nrk/redis-lua).
You can implement this yourself if you want, or wait until I do it.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#58 (comment)
|
Yeah, that would be nice. |
I have some issue with directly interacting with Redis, especially in the case in which the sinx instance is remote (I have this case). I'm thinking of two things:
How does this library handle lua dependencies on modules? |
luastatus is no library; rather, it is a platform.
It’s up to Lua to handle that:
luastatus just does not interfere with this, nor should it. As for popen vs. lua http library, I would go for the http library — it’s quite easy to install it via luarocks. Take a look at the following And at the |
Thanks for the info about libraries, I'm still not familiar with the lua tool environment, but trying to learn. As a side-note, using luastatus right now on my work laptop, it integrates nicely with i3! |
Hearing such things is the ultimate reason to do open-source development :) |
I built sinx a while ago, to simplify scheduled stats collection.
It's backed by a redis storage and a pretty simple UX, and I wanted to know your thoughts about providing a plugin to extract data from sinx right away.
The text was updated successfully, but these errors were encountered: