-
Notifications
You must be signed in to change notification settings - Fork 493
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
Eval clears all variables #984
Comments
@wanaryytel Your example looks correct. Can you share some sample data that can reproduce the error? |
@nathanielc How should that data be gathered? By recording and saving it to a file? |
Sure that works well, the recording data files are stored in |
@nathanielc Is there a way to go through the .srpl file data to make sure there isn't any sensitive data in that? It seems to be binary format by default. Or another way to get the output of the recording? |
@wanaryytel Sure, the |
@nathanielc |
@nathanielc Hey, I updated to the latest release but it didn't fix the problem. I think you missed the part in the initial description that said "I guess one problem might be that I'm passing more variables to keep() than are changed in that |eval(), but I tried it with only free as well and got the same results." That's exactly what I'm seeing. Output from the same script's
No alerts are triggered with this script. When I comment out the |
@wanaryytel I tested this again with your replay file and the above script. It works as is. Both the Specifically which version did you test? |
@nathanielc Both v1.0.2 and v1.1.0-rc2. Exactly the same behavior. I'm not 100% sure if all the variables are cleared, but when the |
@wanaryytel Hmm, that is odd. Can you try this TICKscript? It just has a few log nodes added in:
Then could you share the log lines that start with |
@nathanielc Ran your script (and added the
File at /var/log/kapacitor/ld.log wasn't created, but I do have logfiles for all the other scripts that don't include an |
Can you check the |
@nathanielc
|
@wanaryytel Great, the logs show that the fields are being kept correctly. As for why the alert is not triggering it seems to be a different issue. Could it be that these conditions are not correct?
|
@nathanielc It is the first thing that comes to mind, but considering
it seems improbable at best. Is there anything else I can try? |
@wanaryytel Use the |
Hey,
I have a small TICKscript for monitoring when the server runs out of free disk space. Looks like this:
PS. Although Github displays it weird, I don't have indentation like that in the actual script.
Problem is the commented out
|eval()
part that for some reason clears all my incoming variables and if I comment that in, no alerts are triggered since all variables are<nil>
. Is this desired behavior? I guess one problem might be that I'm passing more variables tokeep()
than are changed in that|eval()
, but I tried it with onlyfree
as well and got the same results. It seems to me that I copied the|eval()
directly from documentation and can't figure out what's wrong with it.But the reason I need it at all is that the incoming data gives free space on disk in bytes and I would like to send out MB-s or GB-s instead of 6584745867 bytes. :) So another question, is there a way to
a) add the
eval()
output tomessage()
?or b) do that in any other way? I tried to do some magic with the
printf
thingie, but I couldn't find any documentation for it anywhere so didn't get anywhere with that either.I'm running on a 64bit Ubuntu 14.04 and have the latest Kapacitor installed from https://dl.influxdata.com/kapacitor/releases/kapacitor_1.0.2_amd64.deb.
The text was updated successfully, but these errors were encountered: