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  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Feature Requests
Author Message
WizardofAus



Joined: 09 Nov 2006
Posts: 7
Location: London

PostPosted: Wed Nov 15, 2006 4:20 pm    Post subject: Have done the nav fix but error Reply with quote

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.



error.JPG
 Description:
The rror when I kill spike
 Filesize:  19.85 KB
 Viewed:  6230 Time(s)

error.JPG



graph.JPG
 Description:
Th graph with spike
 Filesize:  17.75 KB
 Viewed:  6230 Time(s)

graph.JPG


Back to top
timi
Cacti User


Joined: 09 Nov 2005
Posts: 129
Location: Timisoara, Romania

PostPosted: Fri Nov 17, 2006 9:38 am    Post subject: Reply with quote

when i use the "kill spike" i get an error "Limit set to 0.6
No peaks found!", but the spike is there...



before.PNG
 Description:
 Filesize:  18.14 KB
 Viewed:  6188 Time(s)

before.PNG


Back to top
Alice
Cacti User


Joined: 28 Oct 2003
Posts: 88
Location: Bucharest, RO.

PostPosted: Fri Nov 17, 2006 6:19 pm    Post subject: Reply with quote

WizardofAus: you can ignore that error.
WizardofAus,timi: limit is set to 0.6, check the perl file.
Back to top
vaiojunkie



Joined: 19 Nov 2006
Posts: 9

PostPosted: Sun Nov 19, 2006 5:41 pm    Post subject: Reply with quote

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
Back to top
timi
Cacti User


Joined: 09 Nov 2005
Posts: 129
Location: Timisoara, Romania

PostPosted: Mon Nov 20, 2006 2:54 am    Post subject: Reply with quote

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 ?
Back to top
abadaba
Cacti User


Joined: 23 Nov 2005
Posts: 52

PostPosted: Thu Nov 23, 2006 2:55 pm    Post subject: Reply with quote

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= \.
Back to top
Alice
Cacti User


Joined: 28 Oct 2003
Posts: 88
Location: Bucharest, RO.

PostPosted: Thu Nov 23, 2006 2:59 pm    Post subject: Reply with quote

I THINK it's not working with 0.8.6h. Sorry
Back to top
laurent



Joined: 30 Jan 2006
Posts: 13

PostPosted: Fri Nov 24, 2006 5:19 am    Post subject: Reply with quote

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 ...
Back to top
WizardofAus



Joined: 09 Nov 2006
Posts: 7
Location: London

PostPosted: Sun Nov 26, 2006 2:07 pm    Post subject: HMM Reply with quote

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
Back to top
Pumpi
Cacti User


Joined: 14 Jan 2004
Posts: 256
Location: Germany

PostPosted: Mon Nov 27, 2006 5:33 am    Post subject: Reply with quote

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:
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
Back to top
macdaddy



Joined: 13 Jan 2006
Posts: 16

PostPosted: Fri Dec 01, 2006 7:58 pm    Post subject: Reply with quote

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
Back to top
Ahuber



Joined: 16 Nov 2006
Posts: 44
Location: BC, kootenays

PostPosted: Tue Dec 05, 2006 6:23 pm    Post subject: Word of warning Reply with quote

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.
Back to top
Alice
Cacti User


Joined: 28 Oct 2003
Posts: 88
Location: Bucharest, RO.

PostPosted: Wed Dec 06, 2006 5:05 am    Post subject: Re: Word of warning Reply with quote

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.



removespikes.pl
 Description:

Download
 Filename:  removespikes.pl
 Filesize:  4.23 KB
 Downloaded:  585 Time(s)


killspike.tgz
 Description:

Download
 Filename:  killspike.tgz
 Filesize:  1.85 KB
 Downloaded:  512 Time(s)

Back to top
macdaddy



Joined: 13 Jan 2006
Posts: 16

PostPosted: Wed Dec 06, 2006 10:58 am    Post subject: Ah ha! Reply with quote

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?local_graph_id=5&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



graph_image.php.png
 Description:
 Filesize:  26.68 KB
 Viewed:  5875 Time(s)

graph_image.php.png


Back to top
Alice
Cacti User


Joined: 28 Oct 2003
Posts: 88
Location: Bucharest, RO.

PostPosted: Wed Dec 06, 2006 12:44 pm    Post subject: Reply with quote

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
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  Next
Page 2 of 4

 



Powered by phpBB © 2001, 2005 phpBB Group