Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
This is the output (what I expected):
your cacti system is: unix
here some tests from template.txt (did not work but just to see the logfile output). I tried these scripts in this order: test, telnet-cisco-unix, scp-cisco-linux
2007-11-21 09:35:49 purge log.
2007-11-21 09:40:12 INFO: execute Multi method configuration 1 (configmanager).
2007-11-21 09:40:12 createconfig for configmanager(configid=1)!
2007-11-21 09:40:12 exec_background(echo user:username password:*** TEST:\test.txt testhost log:configmanagerid1.log short:\data\configmanagerid1.log path:\data date:2007-11-21 >\usr\share\webapps\cacti\0.8.6j-r6\htdocs\plugins\configmanager\TEST.txt) for following hosts:testhost
2007-11-21 09:42:23 INFO: execute Multi method configuration 1 (configmanager).
2007-11-21 09:42:24 createconfig for configmanager(configid=1)!
2007-11-21 09:42:24 exec_background(/usr/share/webapps/cacti/0.8.6j-r6/htdocs/plugins/configmanager/scripts/telnetdownloadunix.sh testhost username *** \var\depot\testhost.cfg 4) for following hosts:testhost
2007-11-21 09:46:18 INFO: execute Multi method configuration 1 (configmanager).
2007-11-21 09:46:18 createconfig for configmanager(configid=1)!
2007-11-21 09:46:18 exec_background(scp username@testhost:flash:\config.text \data\testhostscp.txt) for following hosts:testhost
As you can see, some times it takes slash, sometimes backslash. I have no clue how this comes...
by the way, I am running gentoo linux, kernel 2.6.17.
ranug wrote:Hi pepj,
I cant get any result from my config scheduler even if I write "echo test > %g%/test.txt" into command field. no success.
The log output seems okay:
2007-11-22 17:17:20 exec_background(echo test > /tmp/test.txt) for following hosts:testhost
The function of cacti exec_background expect a program or script as first parameter not a command line.
In your case the echo has been excuted but with "test > /tmp/test.txt" as parameter (not redirection).
Try again with a shell script ex: test.sh for ex. like
ranug wrote:Hi pepj,
I cant get any result from my config scheduler even if I write "echo test > %g%/test.txt" into command field. no success.
The log output seems okay:
2007-11-22 17:17:20 exec_background(echo test > /tmp/test.txt) for following hosts:testhost
The function of cacti exec_background expect a program or script as first parameter not a command line.
In your case the echo has been excuted but with "test > /tmp/test.txt" as parameter (not redirection).
Try again with a shell script ex: test.sh for ex. like
I did what you proposed. It worked. But the most annoying thing is that I can't see any error message before. Neither in /var/log/messages nor in cacti log nor in cfgmng_logfile.txt. There was no message about missing things.
I will do further tests to get my expect script running...
ranug wrote:I did what you proposed. It worked. But the most annoying thing is that I can't see any error message before. Neither in /var/log/messages nor in cacti log nor in cfgmng_logfile.txt. There was no message about missing things.
I will do further tests to get my expect script running...
- configmanager & cacti can not receive the state of your script ....
- Could you upload your script ?
- I have see now that you give ">" in the parameter list !!! exec_background interprets this not as deviation. Try doing this ">" in your script like in the example with echo ...
My expect script is working now and produce output like I want. There are still some issues with parameters to expect-script but I think I can work it out. When I'm finished I will provide the whole script because I think expect is the better solution than autouser or scp.
I'm a bit closer to the solution, thanks to you man, you rock.
My problem was with the user name running tftp daemon. Having it resolved I was able to save config files from CISCO devices manually.
Hello i am using SuSE enterprise server yast2-tftpserver.
and it seems i am getting same problem the configuration file is not working ,it is always empty and not created.
Can you please tell me what u did for the tftp server user, how did u solve it.
i tried teh debug issue above but same thing, what do u mean by executable, to what file it should be added, another issue should i create the data folder in tftp or the script should create it as i think, cos it is not doing so now.
shahbour wrote: it seems i am getting same problem the configuration file is not working ,it is always empty and not created.
1/ please more information about what you do and insert .
2/ is your config "active" (not paused)
3/ did you insert some hosts
PS: localhost is not possible because the switch/router will try to use localhost as tftp server ... it is itself and will do no download ... insert an IP which can be reached from switch
pepj wrote:
1/ please more information about what you do and insert .
I installed the plugin normalling and i put the real IP of my machine which contain TFTP and cacti, so i am not getting error when trying to add a new configuration, path for data and configuration is /tftpboot/data.
when i click on show file it is always empty and when i go there i didn't find any file
pepj wrote:
2/ is your config "active" (not paused)
yes it is active
pepj wrote:
3/ did you insert some hosts
yes
pepj wrote:
PS: localhost is not possible because the switch/router will try to use localhost as tftp server ... it is itself and will do no download ... insert an IP which can be reached from switch
yes i am using the real ip.
Is there a way i can debug so i can get more info where is the problem i tried to add debug but i didn't find any info, and will the plugin create the folder Data in tftp root, cos it didn't and i did it manually.
1/ I need more information about what you do and insert.
2/ Can you give some printscreens?
3/ Do you want use this with pancho or "pure PHP" ?
4/ Do you have had some hosts ?
5/ some paths are important (not important for method multi):
- TFTP path ("cacti settings" Tab "Up/Download Config Manager") tftp rootpathname
- either "data default path" from ("cacti settings" Tab "Up/Download Config Manager") or "path for the data" from your config
- either "configurations file default path" from ("cacti settings" Tab "Up/Download Config Manager") or "path for configurations files" from your config
PS: you can active the debug in cacti settings (Tab Up/Download Config Manager) and select the option "debug mode". But I don't think this will give something because you have a problem before the poller execution.
1/ I need more information about what you do and insert.
i didn't get you here but what i do , i create a configmanage and activate it then add hosts then check for the file and it is empty. i will try to post some screen shots hope it make it easier.
2/ Can you give some printscreens?
please find them attached.
3/ Do you want use this with pancho or "pure PHP" ?
i am trying to use pancho , please advice me which is better.
4/ Do you have had some hosts ?
yes i added one host.
5/ some paths are important (not important for method multi):
- TFTP path ("cacti settings" Tab "Up/Download Config Manager") tftp rootpathname
/tftpboot/
- either "data default path" from ("cacti settings" Tab "Up/Download Config Manager") or "path for the data" from your config
/tftpboot/data i tried before /data only
- either "configurations file default path" from ("cacti settings" Tab "Up/Download Config Manager") or "path for configurations files" from your config
/tftpboot/data i am using same path also before i tried .data
PS: you can active the debug in cacti settings (Tab Up/Download Config Manager) and select the option "debug mode". But I don't think this will give something because you have a problem before the poller execution.