Help with command to download config - Plugin Configmanager

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
robertol1971
Posts: 6
Joined: Wed Jan 04, 2012 2:59 pm
Location: Rosario, Santa Fe, Argentina

Help with command to download config - Plugin Configmanager

Post by robertol1971 »

Hi to all.
I have the next problem.

I need to backup the config of variuos mikrotik hosts at weekly periods, with the plugin Configmanager
I run this command from my linux cacti box.
lftp -u %u%,%w% -e "get today.backup -o %n%-%d%-%m%-%y%.backup; bye" %i%
If i run from the command line in terminal mode (in my directory /var/backups/mikrotik) with the variables replaced for the actual values, it works perfect.
But if i run the same command with variables and from the cacti plugin interface, dont work at all.
Any ideas ?

Thanks in advance !
Last edited by robertol1971 on Thu Apr 12, 2012 12:46 pm, edited 1 time in total.
__________________________
Roberto Longo
Rosario - Santa Fe - Argentina
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Help with command to download config

Post by gandalf »

Please mention the plugin your question is related to; else nobody will find your context
R.
robertol1971
Posts: 6
Joined: Wed Jan 04, 2012 2:59 pm
Location: Rosario, Santa Fe, Argentina

Re: Help with command to download config - Plugin Configmana

Post by robertol1971 »

Thanks Gandalf.
The plugin is Configmanager.

The log of activity in the file cfgmng_logfile.txt is:
2012-04-12 18:10:08 CFG MANAGER: INFO: execute Script method configuration 2 (backupMikrotik).
2012-04-12 18:10:09 CFG MANAGER: DEBUG: exec_background(lftp -u admin,passwd -e "get today.backup -o /var/backups/Mikrotik/192.168.175.1-12-04-2012.backup; bye" 192.168.175.1) for following hosts:192.168.175.1

The command, works perfect from the cacti box command line. But i dont know why don´t work from the plugin interface.

The script in the file template.txt is:
name=lftp-mikrotik-linux
command=lftp -u %u%,%w% -e "get today.backup -o /var/backups/Mikrotik/%n%-%d%-%m%-%y%.backup; bye" %i%
help=(linux) XXXX XXXX XXXX XXX

Any ideas ? thanks !
__________________________
Roberto Longo
Rosario - Santa Fe - Argentina
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest