Killspike integration in webinterface

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

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

Have done the nav fix but error

Post by WizardofAus »

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
Th graph with spike
Th graph with spike
graph.JPG (17.75 KiB) Viewed 16210 times
The rror when I kill spike
The rror when I kill spike
error.JPG (19.85 KiB) Viewed 16210 times
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Post by timi »

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 16168 times
User avatar
Alice
Cacti User
Posts: 111
Joined: Tue Oct 28, 2003 4:54 pm
Location: Bucharest, RO.

Post by Alice »

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

Post by vaiojunkie »

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:

Post by timi »

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

Post by abadaba »

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: 111
Joined: Tue Oct 28, 2003 4:54 pm
Location: Bucharest, RO.

Post by Alice »

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

Post by laurent »

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

Post by WizardofAus »

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: 259
Joined: Wed Jan 14, 2004 3:23 am
Location: Germany

Post by Pumpi »

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

Post by macdaddy »

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: 59
Joined: Thu Nov 16, 2006 1:57 pm
Location: BC, kootenays

Word of warning

Post by Ahuber »

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: 111
Joined: Tue Oct 28, 2003 4:54 pm
Location: Bucharest, RO.

Re: Word of warning

Post by Alice »

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 880 times
removespikes.pl
(4.23 KiB) Downloaded 950 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!

Post by macdaddy »

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 15855 times
User avatar
Alice
Cacti User
Posts: 111
Joined: Tue Oct 28, 2003 4:54 pm
Location: Bucharest, RO.

Post by Alice »

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

Who is online

Users browsing this forum: No registered users and 1 guest