export configuration as cli script

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
reverseeng
Posts: 8
Joined: Thu Dec 12, 2013 2:17 am

export configuration as cli script

Post by reverseeng »

is there a way to extract the configuration as a set of cli
commands that can be used to create an similar configuration
on another cacti server? No need to transfer the (rrd) data that is
already gathered.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: export configuration as cli script

Post by phalek »

Why not just backup/restore the mysql database to the other server ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
reverseeng
Posts: 8
Joined: Thu Dec 12, 2013 2:17 am

Re: export configuration as cli script

Post by reverseeng »

sorry to have to say but an answer to a question never
ends with a question mark.

So I assume the answer to my question is no.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: export configuration as cli script

Post by phalek »

Then I rephrase it:

You could just backup/restore the mysql database to the other server.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
reverseeng
Posts: 8
Joined: Thu Dec 12, 2013 2:17 am

Re: export configuration as cli script

Post by reverseeng »

I'll rephrase also and limit the possible answers:

is there a way to extract the configuration as a set of cli
commands that can be used to create a similar configuration
on another cacti server? yes or no?

if yes: how?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: export configuration as cli script

Post by phalek »

There's no CLI for that, but what do you intend to do anyway ?

If you only want to have the config on another system, then firstly, please define what you understand under "config".

Also, all configuration is stored in the database, so a backup/restore would in effect move all configuration to another server.

Do you want to automatically create Cacti systems "on-demand" ? then you could still create one cacti, configure it accordingly and then use the database from that system as the base for others.

So if you could describe the issue you have and want to solve, then we could provide you with a solution to your issue.

If you limit your question to a simple yes/no, then you're out of luck.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
reverseeng
Posts: 8
Joined: Thu Dec 12, 2013 2:17 am

Re: export configuration as cli script

Post by reverseeng »

"So if you could describe the issue you have and want to solve, then we could provide you with a solution to your issue."

I have a configuration with devices, data inputs, graphs etc..

Now I want to apply this to a number of other machines. So I need to create all this over and over again unless of course...
reverseeng
Posts: 8
Joined: Thu Dec 12, 2013 2:17 am

Re: export configuration as cli script

Post by reverseeng »

BTW by other machines I mean not other cacti servers but other devices for which i want the same graphs etc..
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: export configuration as cli script

Post by phalek »

Now that clariefies a lot.

You should be able to do what you want to by using one of the two things here:

1. The CLI. These can be used to create new devices and add graphs to it. It doesn't copy existing configuration, but if it's always the same you can create a bunch of CLI commands to always do the same thing
2. The Autom8 plugin. This plugin actually allows you to define specifc actions which Cacti will execute, E.g If the device is of type "Cisco" then add the "Interface 64bit" Graph template to all interfaces which are "up" and have "Upload-Link" in its description.

The CLI commands have "--help" implemented and should be pretty straight forward. The Autom8 plugin comes with a PDF documentation explaining what you need to do.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest