-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
access global config in plugins #478
Comments
The way I understood the question is whether it's possible to access:
from the plugin and not whether it's possible to configure different interval per plugin. |
@zstyblik please read the link above, it describes how to set the interval per-plugin |
@sparrc - I understand your reply. I know you can set interval per plugin. And I'm telling you that's not how I understood the question. But I'm not the one whom asked and perhaps it's me who misunderstood the question. Still, if you have time, please, read again what I've written, resp. compare the last sentence and your reply. :) |
I don't see any reason plugins need access to the global |
Sure. Use-case that comes to my mind could be choosing retention policy, resp. embedding interval into metric name in order to choose retention policy later up in the chain. And what not. I don't know. Anyway ... |
Why not just add a tag then? This would be a pretty minor duplication...
|
@zstyblik per-plugin tags are coming in 0.3.0, see #437 and https://github.com/influxdata/telegraf#version-030-beta |
thank @zstyblik for reply. I want to monitor the network flow rate(Bytes per second) of every network interface. but the provided network provide only the accumulated network bytes. It's suggested to use derivative in SQL, bug I failed to get it to work. (maybe there is some issue in the function) So I decided to calculate my self. so I need to get the current
So I need to get the global interval setting. Is the request reasonable? Or is there any other elegant way? |
I wouldn't rely on interval for that, you should store the timestamp of the last gather. |
@sparrc great! @yuankui have you reported the bug with InfluxDB? As far as I can tell, the query works for me. Whether reported values are correct, that's another story(I haven't invested time into this). But I'd try to solve it outside of Telegraf.
|
Is any way to access global config like
interval
in plugins?The text was updated successfully, but these errors were encountered: