Killspike integration in webinterface

Anything that you think should be in Cacti.

Moderators: Moderators, Developers

Author
Message
WizardofAus
Posts: 7
Joined: Thu Nov 09, 2006 3:25 pm
Location: London

Have done the nav fix but error

#16 Post by WizardofAus » Wed Nov 15, 2006 4:20 pm

However when I actuallt try and kill a spike as attached that is widly different than normal it brings back the undefined error that went away when I added the nav code. Any ideas?
I have ckec the setup.php, checked the r/w access on rrd files - a bit lost.
Attachments
graph.JPG
Th graph with spike
graph.JPG (17.75 KiB) Viewed 13670 times
error.JPG
The rror when I kill spike
error.JPG (19.85 KiB) Viewed 13670 times

User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

#17 Post by timi » Fri Nov 17, 2006 9:38 am

when i use the "kill spike" i get an error "Limit set to 0.6
No peaks found!", but the spike is there...
Attachments
before.PNG
before.PNG (18.14 KiB) Viewed 13628 times

User avatar
Alice
Cacti User
Posts: 107
Joined: Tue Oct 28, 2003 4:54 pm
Location: Bucharest, RO.

#18 Post by Alice » Fri Nov 17, 2006 6:19 pm

WizardofAus: you can ignore that error.
WizardofAus,timi: limit is set to 0.6, check the perl file.
[url=http://www.x-graphs.com/]http://www.x-graphs.com[/url] [color=red]X[/color]-[color=blue]graphs[/color] :: All kind of graphs

vaiojunkie
Posts: 9
Joined: Sun Nov 19, 2006 5:34 pm

#19 Post by vaiojunkie » Sun Nov 19, 2006 5:41 pm

It's not working for me. I have 2 errors

1, Notice: Undefined index: local_graph_id in /var/www/cacti-0.8.6h/lib/functions.php on line 1407

2, Fatal error: Cannot break/continue 1 level in /var/www/cacti-0.8.6h/plugins/killspike/killspike.php on line 11

I can set permissions for my user and I've added "return $nav" but I do not see the Kill Spike Icon. I get the above errors when I browse to killspike.php. I'm running 0.8.6h all other plugins run ok and there are no errors in the Apache2 log

User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

#20 Post by timi » Mon Nov 20, 2006 2:54 am

Alice wrote:WizardofAus: you can ignore that error.
WizardofAus,timi: limit is set to 0.6, check the perl file.
what exactly represents that limit ?

abadaba
Cacti User
Posts: 52
Joined: Wed Nov 23, 2005 10:43 pm

#21 Post by abadaba » Thu Nov 23, 2006 2:55 pm

Is set it up like ive done every other plugin. Granted admin privs too the remove spikes. And i dont have a remove spikes icon on any of my graphs. What could have been done incorrectly? I have like 5 plugins, and they all were installed the same way with no probs= \.
| Cacti 0.8.6h | MySQL 5.0.22 | PHP 5.1.2
|Apache2.20 | RRDtool 1.2.13 | CentOS 4.3 | P4 3200Mhz | 2.5GB |

User avatar
Alice
Cacti User
Posts: 107
Joined: Tue Oct 28, 2003 4:54 pm
Location: Bucharest, RO.

#22 Post by Alice » Thu Nov 23, 2006 2:59 pm

I THINK it's not working with 0.8.6h. Sorry :(
[url=http://www.x-graphs.com/]http://www.x-graphs.com[/url] [color=red]X[/color]-[color=blue]graphs[/color] :: All kind of graphs

laurent
Posts: 13
Joined: Mon Jan 30, 2006 9:58 am

#23 Post by laurent » Fri Nov 24, 2006 5:19 am

Oh!!! , that's it so , almost lost my mind trying to figure out what was wrong , no killspikes icon as well in the graph windows and using version ... 0.8.6h

Bummer ...

WizardofAus
Posts: 7
Joined: Thu Nov 09, 2006 3:25 pm
Location: London

HMM

#24 Post by WizardofAus » Sun Nov 26, 2006 2:07 pm

Alice - I don't ignoring the error is right as if I run the cmd at the prompt is works correctly and removes the spike... just doesnt; work using the icon.

Hope that helps

User avatar
Pumpi
Cacti User
Posts: 256
Joined: Wed Jan 14, 2004 3:23 am
Location: Germany

#25 Post by Pumpi » Mon Nov 27, 2006 5:33 am

I have installed this interessting plugin, but i see no difference after clicking the killspike icon. Spikes are still visible.

I get always messages like:
Removing spikes for: /srv/www/htdocs/cacti/rra/router1_5min_cpu_2424.rrd

but nothing happens.

Any ideas ?

-----------------------------------------------------------------------------Cacti

Code: Select all

Version 0.8.6i 
Plugin Architecture 1.0 
Poller Type Cactid v0.8.6i 
Server Info Linux 2.6.5-7.252-bigsmp 
Web Server Apache/2.0.49 (Linux/SuSE) 
PHP Version 4.3.4 
PHP Extensions xml, tokenizer, standard, posix, pcre, overload, openssl, apache2handler, zlib, yp, xslt, wddx, odbc, sysvshm, sysvsem, swf, sockets, snmp, shmop, session, readline, qtdom, mysql, mime_magic, mhash, mcrypt, mcal, mbstring, ldap, iconv, gmp, gettext, gd, ftp, filepro, domxml, curl, ctype, calendar, bz2, bcmath 
MySQL Version 4.0.18 
RRDTool Version 1.2.15 
SNMP Version 5.1.3.1 

macdaddy
Posts: 39
Joined: Fri Jan 13, 2006 4:00 pm

#26 Post by macdaddy » Fri Dec 01, 2006 7:58 pm

I can't seem to get the plugin to work. I upgraded to 0.8.6i. I've added the security permission for my user. I've made the "return $nav;" change to setup.php. rra is group-writable by apache, as all all the file inside of it. Every time I click the kill icon I get the same error as was reported earlier:

PHP Notice: Undefined index: killspike.php:kill in /var/www/html/cacti-0.8.6i/lib/functions.php on line 1420

Any suggestions? My /var filled up early this AM. When I fixed that problem later in the morning Cacti added a huge spike to every graph. I'd love to get this fixed.

Thanks
J

Ahuber
Cacti User
Posts: 56
Joined: Thu Nov 16, 2006 1:57 pm
Location: BC, kootenays

Word of warning

#27 Post by Ahuber » Tue Dec 05, 2006 6:23 pm

Just a word of warning,
I like this plugin, but a few minutes ago, being hasty as I usually am at around this time, I clicked the killspike button before the graph was finished loading (I already knew there was a spike), I realized later, that it killed my entire graph. It had 2 weeks of data on it, now it only has 2 minutes.
Fortunately it wasn't important. So if you're hasty, wait it out.
Thanks for this plugin, saves me some time.

User avatar
Alice
Cacti User
Posts: 107
Joined: Tue Oct 28, 2003 4:54 pm
Location: Bucharest, RO.

Re: Word of warning

#28 Post by Alice » Wed Dec 06, 2006 5:05 am

Ahuber wrote:Just a word of warning,
I like this plugin, but a few minutes ago, being hasty as I usually am at around this time, I clicked the killspike button before the graph was finished loading (I already knew there was a spike), I realized later, that it killed my entire graph. It had 2 weeks of data on it, now it only has 2 minutes.
Fortunately it wasn't important. So if you're hasty, wait it out.
Thanks for this plugin, saves me some time.
That SHOULDN'T happen and it has nothing to do with not waiting for the graph to load.

Anyway, I attach my curent version here. It should work flawlessly on 0.8.6i.

Remember:

1. put removespikes.pl in |cacti_home|/scripts
2. tar zxvf killspike.tgz in the usual location
3. cmod a+rx |cacti_home|/scripts/removespikes.pl
4. modify first line of |cacti_home|/scripts/removespikes.pl with your perl location (#!/usr/bin/perl -w in my case)
5. chown <apache user> |cacti_home|/rra

***Not tested on windows.
Attachments
killspike.tgz
(1.85 KiB) Downloaded 847 times
removespikes.pl
(4.23 KiB) Downloaded 916 times
[url=http://www.x-graphs.com/]http://www.x-graphs.com[/url] [color=red]X[/color]-[color=blue]graphs[/color] :: All kind of graphs

macdaddy
Posts: 39
Joined: Fri Jan 13, 2006 4:00 pm

Ah ha!

#29 Post by macdaddy » Wed Dec 06, 2006 10:58 am

I've got it working now. You're last comment pointed to the error. I didn't have the removespikes.pl script executable. Then again no other script in scripts/ is executable either so why would removespikes.pl have to be? Anyhow, when I didn't have it executable I'd get the output page that says "Removing spikes for:..." followed on the next line by the "Back" link. With it executable I get these 2 lines in the middle:

Limit set to 0.6
No peaks found!

Maybe that will help someone else out.

BTW, I still get the same PHP error that everyone else mentioned even after implementing the fixes mentioned above and the executable bit change on the Perl script.

PHP Notice: Undefined index: killspike.php: in /var/www/html/cacti-0.8.6i/lib/functions.php on line 1449, referer: http://noc.sktc.net/cacti/graph.php?loc ... rra_id=all

Now, for a related question, when I run the script on that weekly image it doesn't remove the spike (see attached image). It says that it can't find any peaks. Well, there's a large peak on there that's 7 times the normal rate of traffic. It was caused by /var filling up and not being fixed until the next day. I have this on every graph in Cactu. How do I eliminate these spikes? Can this plugin do the job or is there another tool that's meant for the task at hand? Ideally there would be a way to configure Cacti to not log a difference after it hasn't been successfully run in long time and to keep track of the offset between itself and the remote device so that a spike isn't created. This is a simple fix in MRTG. Not so simple with RRDs apparently.

Thanks
J
Attachments
graph_image.php.png
graph_image.php.png (26.68 KiB) Viewed 13315 times

User avatar
Alice
Cacti User
Posts: 107
Joined: Tue Oct 28, 2003 4:54 pm
Location: Bucharest, RO.

#30 Post by Alice » Wed Dec 06, 2006 12:44 pm

Ok, my mistake, forgot about +x.

The reason is that the script file is called directly by cacti, not with <perl_bin_path>/perl <cacti_path>/scripts/removespikes.pl.

The removespikes.pl script is not made by me!.
The original readme is here.Sorry, I tought it's in the perl file too.

About "PHP Notice: Undefined index: killspike.php: in /var/www/html/cacti-0.8.6i/lib/functions.php on line 1449, referer: ": sorry, don't know how to fix that.

[quote]I was looking contributors' scripts to remove spikes in rendered graphs
and all they were very simple and, often, ineffective. So, I had no
choice but to build my own "killspike" script. It's finished and fully
operational and I think it could be useful to more people.

Script is written in perl and, despite comments are in spanish (my
natural language), script is relatively understandable. This is the way
the script works:

this script takes rrd values and dumps them in xml format, scans peaks
(checking for increments/decrements in exponential indexes) and creates
an internal hash with those deltas and another hash to store frequency
of those delta and percentages.

For example, if we're talking about a FastEthernet traffic graph, delta
between values will never reach 100mbps, so a peak will be giga or tera
deltas. Normal traffic means 99% graph, and peaks are very very rare
(less than 0.6%). Thus, script kills all deltas that appears less than 0.6%.

Thanks a lot and receive my most humble congratulations for rrdtool :)

Regards,

--------------------------------------------------
Vincent 'Vins' Vilaplana
Networking area
Production department
--------------------------------------------------
Terra Networks Espa
[url=http://www.x-graphs.com/]http://www.x-graphs.com[/url] [color=red]X[/color]-[color=blue]graphs[/color] :: All kind of graphs

Post Reply