aggregate plugin command line script

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
mskaralar
Posts: 10
Joined: Fri Sep 17, 2010 6:55 am
Location: Turkey

aggregate plugin command line script

Post by mskaralar »

Hi, I'm using aggregate plugin and now I'm going to write a script that total graphs automatically based on an external database.
Like in this page "http://www.cacti.net/downloads/docs/html/scripts.html"(Command Line Scripts), aggregate plugin has functions that ı can use in my php script? like aggregate_graph --graphname etc.

Thanks for your answers.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: aggregate plugin command line script

Post by gandalf »

The aggregate plugin was not written with any cli interface in mind.
But the segmentation into functions may allow for such a use case. In case you come up with some ideas, this is the place to discuss them
R.
tfpbl
Posts: 3
Joined: Fri Feb 03, 2012 8:25 am

Re: aggregate plugin command line script

Post by tfpbl »

Hello mskaralar,

have you been able to add cli features to that plugin?

I need to create a lot of aggregate graphs for a lot of graphs, and for a lot of hosts (~70 graphs on 3 groups of hosts) so a script would be handy.

I've looked into the possibilities for scripting (including faking a browser interaction with curl), but haven't started anything yet.

thanks
Thomas
Last edited by tfpbl on Thu Feb 09, 2012 11:26 am, edited 1 time in total.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: aggregate plugin command line script

Post by gandalf »

Unpublished 1.x code of that plugin (see SVN) supports aggregate templates. Would this help?
R.
tfpbl
Posts: 3
Joined: Fri Feb 03, 2012 8:25 am

Re: aggregate plugin command line script

Post by tfpbl »

Hi Gandalf,

This could somewhat help, but I would still have to create the 70 graphs aggregate template, each being used only once by group of host.
Obviously with that many graphs and hosts, my aim is not to customize each graph, but to have

I'm about to finish a cli script to create aggregate graphs, but I'll need to test it (heavily) before using it, I may at this point need more information.

Do you mind if I post it here once done? you'll be able to integrate it to your plugin (probably pending some code improvement it's been years since I've used php).

Thanks for all your work with Cacti!
Thomas
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: aggregate plugin command line script

Post by gandalf »

In case you publish free of copyrights, I may test and, if fine, add it to AGGREGATE. Got quite a lot of contributions, lately. So it may need some fixes related to latest patches/features. But don't care ...
R.
prosodie
Posts: 7
Joined: Thu Feb 24, 2011 10:32 am

Re: aggregate plugin command line script

Post by prosodie »

Hi,

I need a cli script too in order to create a lot of aggregate graph automatically.

Is there a version of this script to avoid writing the same script from scratch ?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: aggregate plugin command line script

Post by gandalf »

There's not more as already discussed. I did not receive any contribution for a script interface.
A custom project would be possible, but charged.
R.
prosodie
Posts: 7
Joined: Thu Feb 24, 2011 10:32 am

Re: aggregate plugin command line script

Post by prosodie »

Hi Gandalf,

Thanks for your quick answer.

In this case i will write it from scratch :lol:
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: aggregate plugin command line script

Post by gandalf »

Perfect.
In case you want to share the code, I might include it into the next official version
happy coding
R.
bilaljq
Posts: 5
Joined: Mon Oct 21, 2013 11:49 am

Re: aggregate plugin command line script

Post by bilaljq »

Hi,

I was wondering if a script is now available to add aggregate graphs via the command line. I am attempting to graph the ports or routers on my network and there are hundreds of devices. Any help would be appreciated.

Thanks,

Bilal
mathong
Posts: 2
Joined: Wed May 07, 2014 7:16 am
Location: France

Re: aggregate plugin command line script

Post by mathong »

Hi,

I found no script too, but I have a solution (which is not 100% reliable at all).
I used a macro software ( http://doc.ubuntu-fr.org/xmacro for exemple) to aggregate graphs by "recording" the aggregate graph creation I wanted to repeat. Yet it is not the safest way to proceed : this kind of software reproduces mouse movements, clicks and key strokes but not the delay between these events. This is set when you replay the macro, so if there is an unexpected latency with the web interface, some events might be skipped so the macro can execute unwanted actions.
However, if the graphs you want to create are exactly identical and if the macro is well written (with additional delay between clicks) everything should be ok.


note : you might have to set your keyboard to qwerty (if not, input keystrokes can be mistaken)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest