Killspike integration in webinterface

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

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

Killspike integration in webinterface

Post by Instigater »

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 25825 times
User avatar
sizulku
Cacti User
Posts: 110
Joined: Mon Nov 04, 2002 9:15 am
Location: ACEH
Contact:

Post by sizulku »

It's look great. Any pacthes for this?
User avatar
Alice
Cacti User
Posts: 111
Joined: Tue Oct 28, 2003 4:54 pm
Location: Bucharest, RO.

Post by Alice »

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 1503 times
removespikes.zip
perl script to remove spikes
(1.83 KiB) Downloaded 1701 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

Post by Instigater »

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

Post by mgb »

Briljant, works like a charm.

I think this is a much needed addon.

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

Post by TheWitness »

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 dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
Alice
Cacti User
Posts: 111
Joined: Tue Oct 28, 2003 4:54 pm
Location: Bucharest, RO.

Post by Alice »

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

Post by shakey_1 »

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

Post by Alice »

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: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

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 dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

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 dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
shakey_1
Posts: 42
Joined: Thu Feb 16, 2006 12:49 pm

Post by shakey_1 »

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:

Post by timi »

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

Post by Alice »

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:

Post by timi »

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

Who is online

Users browsing this forum: No registered users and 2 guests