Killspike integration in webinterface

Anything that you think should be in Cacti.

Moderators: Moderators, Developers

Author
Message
User avatar
Instigater
Cacti User
Posts: 141
Joined: Mon Dec 13, 2004 5:14 pm
Location: Jurmala, Latvia

Killspike integration in webinterface

#1 Post by Instigater » Sat Oct 28, 2006 7:26 pm

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.
Attachments
killspike_from_web.gif
killspike_from_web.gif (5.82 KiB) Viewed 24411 times

User avatar
sizulku
Cacti User
Posts: 110
Joined: Mon Nov 04, 2002 9:15 am
Location: ACEH
Contact:

#2 Post by sizulku » Thu Nov 02, 2006 2:41 am

It's look great. Any pacthes for this?

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

#3 Post by Alice » Thu Nov 02, 2006 7:39 am

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.
Attachments
killspike.zip
Plugin
(2.12 KiB) Downloaded 1448 times
removespikes.zip
perl script to remove spikes
(1.83 KiB) Downloaded 1638 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

User avatar
Instigater
Cacti User
Posts: 141
Joined: Mon Dec 13, 2004 5:14 pm
Location: Jurmala, Latvia

#4 Post by Instigater » Mon Nov 06, 2006 4:12 am

Nice! Thank You! :D

mgb
Cacti User
Posts: 124
Joined: Mon Jun 21, 2004 4:06 am
Location: North of the Netherlands

#5 Post by mgb » Mon Nov 06, 2006 5:09 am

Briljant, works like a charm.

I think this is a much needed addon.

Michael

User avatar
TheWitness
Developer
Posts: 14834
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#6 Post by TheWitness » Mon Nov 06, 2006 6:22 am

I added this to the known list of Plugins.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

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

#7 Post by Alice » Wed Nov 08, 2006 11:34 am

BTW, anyone has a better icon? mine sux :(
[url=http://www.x-graphs.com/]http://www.x-graphs.com[/url] [color=red]X[/color]-[color=blue]graphs[/color] :: All kind of graphs

shakey_1
Posts: 42
Joined: Thu Feb 16, 2006 12:49 pm

#8 Post by shakey_1 » Tue Nov 14, 2006 2:33 pm

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?

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

#9 Post by Alice » Tue Nov 14, 2006 6:30 pm

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,
[url=http://www.x-graphs.com/]http://www.x-graphs.com[/url] [color=red]X[/color]-[color=blue]graphs[/color] :: All kind of graphs

User avatar
TheWitness
Developer
Posts: 14834
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#10 Post by TheWitness » Tue Nov 14, 2006 7:28 pm

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
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

User avatar
TheWitness
Developer
Posts: 14834
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#11 Post by TheWitness » Tue Nov 14, 2006 7:30 pm

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
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

shakey_1
Posts: 42
Joined: Thu Feb 16, 2006 12:49 pm

#12 Post by shakey_1 » Tue Nov 14, 2006 9:12 pm

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

Code: Select all

return $nav;
after

Code: Select all

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: Select all

}
then the "Notice: Undefined index: index.php: in /var/www/cacti/lib/functions.php on line 1420" error is resolved.

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

#13 Post by timi » Wed Nov 15, 2006 4:29 am

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 ?

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

#14 Post by Alice » Wed Nov 15, 2006 6:38 am

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

timi: console -> user management and add the right to use killspike to your user :)
[url=http://www.x-graphs.com/]http://www.x-graphs.com[/url] [color=red]X[/color]-[color=blue]graphs[/color] :: All kind of graphs

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

#15 Post by timi » Wed Nov 15, 2006 7:57 am

darn every time i install a new plugin i forget to check it in user management :oops:

Post Reply