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 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Feature Requests
Author Message
Instigater
Cacti User


Joined: 13 Dec 2004
Posts: 94
Location: Jurmala, Latvia

PostPosted: Sat Oct 28, 2006 7:26 pm    Post subject: Killspike integration in webinterface Reply with quote

It would be nice to have killspike feature in web interface. It is quite hard to find the right filename for specific graph if they are thousands. Spikes in that amount of graphs show up quite frequenty.


killspike_from_web.gif
 Description:
 Filesize:  5.82 KB
 Viewed:  11606 Time(s)

killspike_from_web.gif


Back to top
sizulku
Cacti User


Joined: 04 Nov 2002
Posts: 102
Location: ACEH

PostPosted: Thu Nov 02, 2006 2:41 am    Post subject: Reply with quote

It's look great. Any pacthes for this?
Back to top
Alice
Cacti User


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

PostPosted: Thu Nov 02, 2006 7:39 am    Post subject: Reply with quote

Nice ideea

Done.

use killspike as any ordinary plugin (grant access to users first).
also, unpack removespikes.zip in <cacti_dir>/scripts (removespikes.pl)

WARNING: The user that runs the webserver MUST have r/w access to the rra files.



removespikes.zip
 Description:
perl script to remove spikes

Download
 Filename:  removespikes.zip
 Filesize:  1.83 KB
 Downloaded:  941 Time(s)


killspike.zip
 Description:
Plugin

Download
 Filename:  killspike.zip
 Filesize:  2.12 KB
 Downloaded:  861 Time(s)

Back to top
Instigater
Cacti User


Joined: 13 Dec 2004
Posts: 94
Location: Jurmala, Latvia

PostPosted: Mon Nov 06, 2006 4:12 am    Post subject: Reply with quote

Nice! Thank You!
Back to top
mgb
Cacti User


Joined: 21 Jun 2004
Posts: 102
Location: North of the Netherlands

PostPosted: Mon Nov 06, 2006 5:09 am    Post subject: Reply with quote

Briljant, works like a charm.

I think this is a much needed addon.

Michael
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9671
Location: MI, USA

PostPosted: Mon Nov 06, 2006 6:22 am    Post subject: Reply with quote

I added this to the known list of Plugins.

TheWitness
Back to top
Alice
Cacti User


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

PostPosted: Wed Nov 08, 2006 11:34 am    Post subject: Reply with quote

BTW, anyone has a better icon? mine sux
Back to top
shakey_1



Joined: 16 Feb 2006
Posts: 42

PostPosted: Tue Nov 14, 2006 2:33 pm    Post subject: Reply with quote

I'm not sure why, but I am receiving the same error after installing this plugin that I did when installing the dataquery plugin (before pestilence fixed it). The error is "Notice: Undefined index: index.php: in /var/www/cacti/lib/functions.php on line 1420". This is on a fresh install of cacti-0.8.6i that I am putting up to test with. Any ideas on how I can fix this?
Back to top
Alice
Cacti User


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

PostPosted: Tue Nov 14, 2006 6:30 pm    Post subject: Reply with quote

I have no ideea.
I get a lot of errors in the apache log too:
[Wed Nov 15 01:28:29 2006] [error] [client 192.168.200.21] PHP Notice: Undefined index: killspike.php:kill in /home/cacti/lib/functions.php on line 1421
[Wed Nov 15 01:29:04 2006] [error] [client 192.168.200.21] PHP Notice: Undefined index: graph_view.php:tree in /home/cacti/lib/functions.php on line 1421,
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9671
Location: MI, USA

PostPosted: Tue Nov 14, 2006 7:28 pm    Post subject: Reply with quote

Alice,

The plugin is incomplete. Every command/subcommand must be registered. If you look at the MacTrack plugin, for example, there is a register function that makes sure that all the variables are set. This registration allows the navigation to work correctly. Look for the keyword "nav" in your search of the setup.php for that plugin.

TheWitness
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9671
Location: MI, USA

PostPosted: Tue Nov 14, 2006 7:30 pm    Post subject: Reply with quote

Alice,

Also, being that this is an operation that you actually have "Write" access to, it should have a security setting per user. So, make sure you setup a distinct security pick for this so that not all users have accesss.

TheWitness
Back to top
shakey_1



Joined: 16 Feb 2006
Posts: 42

PostPosted: Tue Nov 14, 2006 9:12 pm    Post subject: Reply with quote

That was the answer, TheWitness. Thanks. If you place

Code:
return $nav;


after

Code:
function killspike_draw_navigation_text ($nav) {
            $nav["killspike.php:"] = array("title" => "killspike", "mapping" => "graph_view.php:,?,graph.php:view", "level" => "3");


but before the trailing

Code:
}


then the "Notice: Undefined index: index.php: in /var/www/cacti/lib/functions.php on line 1420" error is resolved.
Back to top
timi
Cacti User


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

PostPosted: Wed Nov 15, 2006 4:29 am    Post subject: Reply with quote

the plugin does not work for me

i puted $plugins[] = 'killspike'; in config.php
and moved the php scripts $cacti_dir/plugins/killspike

do i need to make any more modifications ?
Back to top
Alice
Cacti User


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

PostPosted: Wed Nov 15, 2006 6:38 am    Post subject: Reply with quote

shakey_1: right. forgot to add "return $nav;", sorry.

timi: console -> user management and add the right to use killspike to your user
Back to top
timi
Cacti User


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

PostPosted: Wed Nov 15, 2006 7:57 am    Post subject: Reply with quote

darn every time i install a new plugin i forget to check it in user management
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 1, 2, 3, 4  Next
Page 1 of 4

 



Powered by phpBB © 2001, 2005 phpBB Group