-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Spikekill does not receive correct avgnan
value when launching from GUI
#3673
Comments
seems logical to me, you're doing some good work on spikekill 👍 Will you be submitting a PR for this, or should I go ahead and fix it tomorrow? |
This one, actually, I have not found the cause for yet. I feel like it's in a Javascript somewhere, but I haven't spent enough time looking yet. If you know where the problem is, either go ahead and fix it, or tell me where to find it. Otherwise, I can search for it and fix it once I've located it. The proper solution should be to drop the parameter from the query string, because the script will pull the user's setting from the database, thus it is not even needed in the HTTP query. |
Everything is in layout.js. My thoughts here are that we should not even be passing in the parameter. When we do that, the spikekill.php should be getting the default from the database. So, we just have to remove "method=blah" from layout.js selectively. |
lol, it's 'avgnan'. But again, hardcoded. That's a bug. Let me do dig in this morning. I'll have to be a pull request. |
Okay, got a good pull request now. Give it a look over. Some other things were wrong too, which @netniV will see strait away. This change will always pull the last stored value from the user settings, which was not happening before. So, if you changed something from the GUI and then expected it to just work, it would not. That's besides the fact that avgnan was always hardcoded. |
Awesome, thank you! |
Describe the bug
When launching Spikekill from the Cacti GUI, the incorrect value for
avgnan
(which is Replacement Method) is passed to the hook script if you choose either GapFill or Float. Choosing StdDev or Variance does not experience the issue.To Reproduce
Steps to reproduce the behavior:
Go to Cacti's Graph tab.
Identify a graph upon which to run Spikekill. Click the Spikekill icon next to the graph to open the menu. Hover on Settings. Hover on Replacement Method. Chose Average.
Click the Spikekill icon next to the graph again. Click 'Gap Fill Range'.
Observe in the
log/cacti.log
file the messgage indicatingavgnan
islast
:2020/07/08 18:21:18 - SPIKEKILL CactiUser:admin, File:eag-wan-rt02_traffic_in_72.rrd, Method:GapFill, OutStart:1594164011, OutEnd:1594250411, AvgNan:last
Observe via a packet capture tool the HTTP request indicating that
avgnan
islast
:Expected behavior
If the Replacement Method is set to 'Average', Spikekill should not be launched with 'Last Known Good', but rather with 'Average'.
Screenshots
Wireshark says the replacement is 'last'
The GUI says the replacement is 'average'
Desktop (please complete the following information)
n/a
Smartphone (please complete the following information)
n/a
Additional context
None
The text was updated successfully, but these errors were encountered: