Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Killspike integration in webinterface
Goto page Previous  1, 2, 3, 4
 
Post new topic   Reply to topic    Cacti Forum Index -> Feature Requests
Author Message
leonardo_gyn
Cacti User


Joined: 22 Jan 2005
Posts: 65

PostPosted: Thu Jun 21, 2007 5:07 am    Post subject: Reply with quote

OK, i have figured that. The question was if i need to apply some patch for getting plugin support, if plugin support is present in some 'beta' cacti version, if it's already only on development branch (SVN), etc etc
Back to top
leonardo_gyn
Cacti User


Joined: 22 Jan 2005
Posts: 65

PostPosted: Thu Jun 21, 2007 5:22 am    Post subject: Reply with quote

Forget it ...... i found the plugin architeture and install instructions, i think i can handle it
Back to top
eddievenus
Cacti User


Joined: 18 Jul 2005
Posts: 56

PostPosted: Mon Jul 02, 2007 3:19 pm    Post subject: has this been shot down yet? Reply with quote

I am no evil coding genius, though sometimes I can see how that would be nice, but I think I have found a solution to some of the troubles people have had with this plugin.

In particular the troubles where your graphs disappear after you run this killspike plugin on it. My solution may be too simple to be affective mainstream but for anyone who is already changing the perl script file it should be OK.

Simply add a chown command in the perl script to change the owner of the chagned file back to the owner it should be. This is a static thing, I do not know how to change it in a dynamic fashion. Here is what I mean.

This is the last section of the removespikes.pl file

Quote:
###########################################################################
# Cleanup and move new file to the place of original one
# and original one gets backed up.
if ($cont == 0) { print "No peaks found!<BR>"; }
else {
rename($ARGV[0],"$ARGV[0].old");
$lino="rrdtool restore $tempfile.xml $ARGV[0]";
system($lino);
chown apache, apache $ARGV[0];
die "$0: Unable to execute the rrdtool restore on $ARGV[0] - $! - $@\n" if $? != 0;
}

# cleans up the files created
unlink("$tempfile");
unlink("$tempfile.xml");


please make note of the line in bold as it was not there in the original file. That is the only change I have made.

I am running this on a CactiEZ install with Cacti 8.6i and a whole slew of plugins. My apache user is the one that Cacti runs as, so I used that user but you can use whatever user you need to of course.

Now when I run the script it does not start the file over again, it works like Alice inteneded it to.

It is a good thing I am no evil coding genius too since if I were I would have shared. Plus this would have been way more complicated too, and would have likely helped me take over the world one cacti user at a time. <cue maniacal laughter>

EddieVenus
Back to top
eddievenus
Cacti User


Joined: 18 Jul 2005
Posts: 56

PostPosted: Tue Jul 03, 2007 11:19 am    Post subject: Reply with quote

I want to say that I have been using this now for a day, cleaning up misc graphs from various sources and I have to say that it is the single greatest addition to Cacti yet.

I am not kidding, this should have been core functionality from the get go. The fact that it was not is not important, what is is that many people contributed to the effort of fixing that glarring shortcoming and producing what I have to say is the best plugin created to date.

Sure other plugins are great and I use them often, but this is the first one that I have actually hoped would some day be created.

So to all who made this plugin possible, thank you.

EddieVenus
Back to top
YoMarK
Cacti User


Joined: 02 Feb 2007
Posts: 59
Location: Eindhoven/The Netherlands

PostPosted: Wed Sep 19, 2007 5:49 am    Post subject: Reply with quote

Great plugin!
Removed some ugly spikes in SQL Server,Exchange and Blackberry graphs(from WMI, occurring mostly when rebooting the servers).

Running it on windows, works fine with the edits suggested by cjennings_c.
Back to top
BSOD2600
Cacti Moderator


Joined: 08 May 2004
Posts: 6789
Location: WA, USA

PostPosted: Wed Sep 19, 2007 10:16 am    Post subject: Reply with quote

While this might be a very handy addon, IMO this wouldn't be needed at all if data templates were properly defined; i.e. correctly set max/min data sources. Those of you who experience spikes in graphs from server reboots, should modify the existing data templates and rrd files so they don't occur again.
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12275
Location: Muenster, Germany

PostPosted: Sat Oct 20, 2007 5:50 am    Post subject: Reply with quote

Please replace killspike_draw_navigation_text by this code to avoid
Quote:
PHP Notice: Undefined index: killspike.php: in /var/www/html/workspace/cacti-plugins/lib/functions.php on line 1432, referer: http://localhost/workspace/cacti-plugins/graph_view.php?action=tree&tree_id=1&leaf_id=7&select_first=true
errors:
Code:
function killspike_draw_navigation_text ($nav) {
   $nav["killspike.php:"]       = array("title" => "Kill Spikes", "mapping" => "graph_view.php:,?,graph.php:view", "url" => "", "level" => "3");
   $nav["killspike.php:kill"]    = array("title" => "This Graph", "mapping" => "killspike.php:", "url" => "killspike.php", "level" => "1");
   return $nav;
}

Reinhard
Back to top
inetquestion
Cacti User


Joined: 01 Feb 2006
Posts: 58
Location: Charlotte NC

PostPosted: Tue Nov 27, 2007 2:08 pm    Post subject: return to original page Reply with quote

I haven't seen this modification, but it seemed like a necessary evil unless you like looking at output.


Code:


print "<BR><B><a href=\"javascript:history.go(-1)\">Back</a></b>";
print "<script type=\"text/javascript\">";
print "<!--\n";                                                                                                                             
print "window.location = \"javascript:history.go(-1)\"\n";                                                                                 
print "//-->\n";                                                                                                                           
print "</script>";

Back to top
Findarato



Joined: 06 Feb 2008
Posts: 12

PostPosted: Tue Mar 04, 2008 10:58 am    Post subject: Reply with quote

I seem to have an issue, Its the same install, but after upgrading to v2 of PIA and 8.7b of Cacti the script runs but the spikes are still showing up in the graph.

Btw it worked fine with 8.7a and 1.4PIA
Back to top
ruud
Cacti User


Joined: 22 Aug 2006
Posts: 64
Location: Rotterdam, The Netherlands

PostPosted: Wed Apr 09, 2008 5:32 am    Post subject: Reply with quote

Thought i had the same problem but solved it.. Perhaps you have the same problem as me ? :

I did copy the killspike plugin from my previous cacti installation but forgot to copy the removespikes.pl script to the scripts directory.


Hence : killspike runs but does nothing..

Killspike works now but with some hickups :
- The rights on the rra files are changed from my cactiuser to apache, this was the case on my old install as well.
- Killspike used to give a nice account of the actions it took, now it just spits out a bunch of "Chopped at Chopped at chopped at" lines.
Back to top
gninja
Cacti User


Joined: 24 Aug 2004
Posts: 291
Location: San Francisco, CA

PostPosted: Fri Apr 18, 2008 2:32 pm    Post subject: no icon? Reply with quote

I've installed it, and clicked the checkbox in the user realm page.. But I'm still not seeing the icon next to the graph.

file permissions all look fine...

Any ideas?
Back to top
mcutting
Cacti Pro User


Joined: 16 Oct 2006
Posts: 977

PostPosted: Fri Jul 04, 2008 6:21 am    Post subject: Reply with quote

Does anyone have a version of killspike that works with Windows ?

Thanks
Back to top
TFC
Cacti Pro User


Joined: 09 Apr 2003
Posts: 611
Location: Izmir/Turkey

PostPosted: Wed Nov 19, 2008 4:39 am    Post subject: Reply with quote

I think this plugin is completely wrong..
Because its developer cant give any solution.
Plugind says Removing spikes for: /var/www/cacti/rra/btg3640_traffic_in_17.rrd
but nothing change..
Permissions are ok..
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Feature Requests All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 



Powered by phpBB © 2001, 2005 phpBB Group