Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Jul 20, 2017 5:58 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 100 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7  Next
Author Message
 Post subject:
PostPosted: Wed Apr 28, 2010 9:17 am 
Offline
Cacti User

Joined: Wed May 27, 2009 5:10 pm
Posts: 124
Also, just to be clear, the HP devices back up fine. Its just Cisco devices it no longer manages to back up.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 29, 2010 7:09 am 
Offline
Cacti User

Joined: Wed May 27, 2009 5:10 pm
Posts: 124
I tried updating the php version and broke everything on that server.
The PHP version is 5.1.6.

Anyway,
If I enter these lines before if ($enablepw != '') { then it enables and logs in but doesnt run any copy commands.. can you help me remove the IF commands so that it proceeds onwards? I've tried commenting them out but I get all sorts of PHP errors relating to something called nesting
Thanks!!

Code:
@fputs($this->fp, "en\r");
@fputs($this->fp, "$pass\r");


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 05, 2010 9:48 am 
Offline
Cacti User

Joined: Wed Feb 20, 2008 5:02 pm
Posts: 60
Sorry for the delayed response here. Things have been hectic @ the office lately and I haven't had a moment to spare. So at this point you've upgraded php and things are working other than cisco device backups? Heres my php ver:
Code:
PHP 5.1.6 (cli) (built: Jan 13 2010 17:13:05)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies


Also, do you use the same account (within router configs) to back up both ciscos and HP's?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 05, 2010 10:12 am 
Offline
Cacti User

Joined: Wed May 27, 2009 5:10 pm
Posts: 124
Hi,
I couldnt upgrade to 5.2 so I'm back using 5.1 (the same as you) which is okay as we have the same PHP ver.

I'm using different credentials, and have actually managed to try this on a different group of devices at a different location, without success.
If you see the post above, I can get the plugin to login to Cisco devices is I tell it not to check for the > prompt, so something is wrong with the checking the " > " feature.

I was going to try and replace the phptelnet class but I think I wont be able to, as I don't know enough to complete that task


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 05, 2010 10:26 am 
Offline
Cacti User

Joined: Wed Feb 20, 2008 5:02 pm
Posts: 60
OK, was just wondering about the different accounts as I'm using different accounts here. If you want to skip checking for > you'd want to comment out the following lines: (lines 469 - 501 in my functions file)
Code:
                               if ($enablepw != '') {

                                        # Get > to show we are at the command prompt and ready to input the en command
                                        $res = '';
                                        $x = 0;
                                        while ($x < 10) {
                                                sleep(3);
                                                $this->GetResponse($r);
                                                echo $r;
                                                $res .= $r;
                                                if (strpos($r, '>') !== FALSE) {
                                                        break;
                                                }
                                                $x++;
                                        }
                                        @fputs($this->fp, "en\r");

                                        # Get the password prompt again to input the enable password
                                        $res = '';
                                        $x = 0;
                                        while ($x < 10) {
                                                sleep(3);
                                                $this->GetResponse($r);
                                                echo $r;
                                                $res .= $r;
                                                if (strpos($res, $devicetype['password']) !== FALSE) {
                                                        break;
                                                }
                                                $x++;
                                        }
                                        $r=explode("\n", $r);
                                        @fputs($this->fp, "$enablepw\r");
                                }


...strange that were having issues getting it going there. It's working fine here for cisco, HP and Foundry ServerIrons.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 05, 2010 11:55 am 
Offline
Cacti User

Joined: Wed May 27, 2009 5:10 pm
Posts: 124
Sweet as. That now logs in to HP and Cisco.
There is an issue somewhere as the HP reports "protocol error" when it tries to back up, and the Cisco ASA reports "%Error opening system:150.20.1.140 (No such file or directory)" but, I can fix this when I have more time I'm quite certain.

Many thanks for your help for the past 6 pages. Each time I came to a dead end you have assisted. Cheers!

Once I test / fix my issues I will re-upload the functions.php


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 05, 2010 11:56 am 
Offline
Cacti User

Joined: Wed Feb 20, 2008 5:02 pm
Posts: 60
Sounds good.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 06, 2010 9:49 am 
Offline

Joined: Wed Nov 11, 2009 12:13 pm
Posts: 6
Location: Germany
Hello,

i have installed the lates routerconfigs from www.cacti.net .
I am using cacti 0.8.7e and PIA 2.6. My php version is
Code:
PHP 5.3.1 (cli) (built: Feb 15 2010 17:27:14)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies


if i run from cli as cacti user
Code:
php /srv/www/htdocs/cacti/plugins/routerconfigs/router-download.php


the configs of my devices are stored in the DB. I can compare config and so on.

My problem is, that the download doesn't run automaticly. What triggers the automatic download? How can i debug this? What information do you need to help to solve this issue?

Thanks
Heiko


Last edited by dertoaster on Thu May 06, 2010 9:56 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu May 06, 2010 9:50 am 
Offline
Cacti User

Joined: Wed May 27, 2009 5:10 pm
Posts: 124
Are you using windows or linux?

Does your Cacti plot any graphs at all?


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 06, 2010 10:17 am 
Offline

Joined: Wed Nov 11, 2009 12:13 pm
Posts: 6
Location: Germany
Thanks for reply!

I have graphs of ca. 350 devices. My OS is OpenSuse 11.2.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 06, 2010 10:38 am 
Offline
Cacti User

Joined: Wed May 27, 2009 5:10 pm
Posts: 124
have you looked in the logs? I asked whether the graphs were being plotted as if they were not it may have pointed to a cron issue.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 06, 2010 10:50 am 
Offline

Joined: Wed Nov 11, 2009 12:13 pm
Posts: 6
Location: Germany
I have looked in the logs. I can't see any issu that's indicate to the routerconfigs.

That's my crontab for the cacti user:
Code:
php -q /srv/www/htdocs/cacti/poller.php >> /srv/www/htdocs/cacti/log/poller.log  2>&1


Can you give me a short explanation how routerconfigs work?


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 06, 2010 11:00 am 
Offline
Cacti User

Joined: Wed May 27, 2009 5:10 pm
Posts: 124
I personally don't know. But, I summise that, when the crontab runs, it also runs the routerconfigs plugin. The plugin checks the length of time since it last run, and if its larger than the time you specified (one day, etc) then it continues to run the routerconfigs plugin.

You may wish to start a thread on your exact issue, as this thread was to enable HP and ALL Cisco devices to be backed up by the routerconfigs plugin.

If I were you (If you can do this) look at the SQL database for the times of when the last routerconfigs run. And also look under each device in cacti how long you have specified to back up devices i.e. every day, every week etc.


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 09, 2010 3:26 pm 
Offline
Cacti User

Joined: Wed May 27, 2009 5:10 pm
Posts: 124
grady wrote:
Sounds good.


Okay so I have been working on the routerconfigs / cacti server. It backs up both HP and Cisco but when it does HP it doesnt realise it has saved the config so it reports as failed. However if I go to the TFTP directory then the config is there. Any ideas? Here is the output when run from the CLI

Code:
2610-01# copy start tftp 192.168.250.39 172.23.3.250
2610-01# Saving Debug
05/09/2010 03:23:51 PM - RouterConfigs: Poller[0] -1273436576 seconds
0 devices backed up successfully.
1 devices failed to backup.

These devices failed to backup
--------------------------------
172.23.3.250  -
[root@localhost ~]#


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 26, 2010 6:03 am 
Offline
Cacti User

Joined: Wed May 27, 2009 5:10 pm
Posts: 124
Any ideas on the above issue? The config is saved simply as the filename. It seems to miss the script where it gets renamed to something logical, and has no database entry either.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 100 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group