CLI; Adding graph related with source

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
mantiss
Posts: 4
Joined: Tue Apr 03, 2012 10:50 am

CLI; Adding graph related with source

Post by mantiss »

I need to add new graph ["graphname"] with template id ['template_id'] related with data source [data_source_name] via cli.
Standart cli interface provides adding graph related with some template; But it always create new date_source ( instead of checking existance of it )
For example:
We have data source provides different item fields;
We need to show different fields on different graphs
We can not separate this source to different sources(cause of increasing amount of requests)
But every time we creating new graph related with this data source - we getting new clones of this data source.
How can I create new graph connected with only one data source over CLI?
Sorry for my language mistakes if any. I'm not an native English speaker.
Dear administrators of forums.cacti.net!
My primary nickname is "Checker" and this is not a SPAM!;
mantiss
Posts: 4
Joined: Tue Apr 03, 2012 10:50 am

Re: CLI; Adding graph related with source

Post by mantiss »

UP! PLZ HELP SOMEBODY!
Dear administrators of forums.cacti.net!
My primary nickname is "Checker" and this is not a SPAM!;
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: CLI; Adding graph related with source

Post by gandalf »

mantiss wrote:I need to add new graph ["graphname"] with template id ['template_id'] related with data source [data_source_name] via cli.
Standart cli interface provides adding graph related with some template; But it always create new date_source ( instead of checking existance of it )
This is the way we designed it.
Please explain your data gathering in deeper details; perhaps we find a solution
R.
mantiss
Posts: 4
Joined: Tue Apr 03, 2012 10:50 am

Re: CLI; Adding graph related with source

Post by mantiss »

I have 2 data sources gathering all data i need;
I need to add few graphs, who uses different fields from that data source using CLI.
But any time i' adding graphs with

Code: Select all

'add_graphs.php --host-id='+nodeid+' --graph-type=cg --graph-template-id='+graph_template_id
Cacti creates new data source, related with that graph-template-id.
p.s. Sorry for my bad language.
Dear administrators of forums.cacti.net!
My primary nickname is "Checker" and this is not a SPAM!;
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: CLI; Adding graph related with source

Post by gandalf »

In case all graphs refer to the same data template, they will indeed generate a new data source which is mimicked after the same data template.

Currently, we do not have a detection mechanism to verify, that the same data source is already available. So what you get is "by design". You will get same results via cli and via browser.
For the latter, you may manually create a new graph and THEN refer to an already existing data source without creating a new one. This is quite a boring workaround but the best I can offer right now
R.
jeffvoice
Posts: 6
Joined: Mon Jul 23, 2012 1:18 pm

Re: CLI; Adding graph related with source

Post by jeffvoice »

Sorry to resurrect old topics, but is there any update on this?
I know it's been a feature request for some time and I'm curious if I had missed it.


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

Re: CLI; Adding graph related with source

Post by gandalf »

We still are in need for someone who does the coding; we will happily accept contributions
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests