plugin for download/upload routers switches configuration

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
Exo7
Cacti User
Posts: 136
Joined: Wed Jul 13, 2005 4:50 pm

Post by Exo7 »

pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

Hi

For the "link plugin" I think you are thinking about this one, there is a discussion Forum in http://cactiusers.org/forums/viewforum.php?f=9

About my plugin:
My first goal is to have the possiblity to have an automatic backup of the routers and switches configuration, or to do some changes on severall switches/routers. This is almost ok ... still some optimization and to check if all is ok with unix.
After that I think we can add other functions like diff.

It is easy to add some functions which are writting in PHP/HTML/javascript. So if you have some programs .... I or someone else could try to integrate it.
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

<finding all kinds of tools I missed before, first rrdcleaner and now links!>

pepj: I think what you're working on is one of the more important functions of a complete network management system. That said, if you'd like copies of the scripts I'm running (and promise not to tell anyone how horrible they are), let me know. I'd love to do all of this via Cacti - but it has to do what I'm doing now, but better, and it has to pass muster later on (meaning it can't use an ftp server).
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

Hello

This subversion seems very powerfull. But I think it should be a another plugin which could shows the version. (I ask me if Mantis is also using the same subversion or could be an alternative : could be linked with the plugin http://wotsit.thingy.com/haj/cacti/links-plugin.html for the current version.).

You know in my plugin you can start a file before or after the download. What I could do is to adapt the "file to start after" parameter in order to be able to pass the "location where the files have been saved" (like %d%). So You could copy these in a "subversion" or "Mantis" directory.
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

sorry

When I say an another plugin ... I mean only it has to be a plugin which is separate of the pancho configmanager. Subversion could be also very good possibility.

sorry for my english ... sometimes I 'm writing to quickly. I'm not an english people.
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
JJX
Cacti User
Posts: 402
Joined: Thu Oct 06, 2005 5:03 am

Post by JJX »

really nice plugin!!!
however, i havent succed configuring yet but i hope i will tomorow :)

Is it working under linux? Has nayone test it?
cacti rulez!
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

little bug

Post by pepj »

Hello

There is a little cosmetic bug (I will correct it).

In this version when you want to add router/switches you have to use:
the last (below) "go" button to insert them.
To remove no problem.

I have also changed the filter in order to not look at the description too. I thought it was good at this, but it gives too many not desired results. So I will keep it simple.

The possibility to use also the Mactrac devices is coming soon.
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

Hello

Here the new version with the possibility to choose the devices of Mactrac.

I ve corrected some bugs. I think it should be all ok now.
14.03.2005 possibility to use mactrac devices
14.03.2005 no more problem with the drop list
13.03.2006 the filter look now only at the name not the description
12.03.2006 correction bug with any.
12.03.2006 correction bug switch up/down.
12.03.2006 correction bug filter
Last edited by pepj on Fri Mar 24, 2006 5:01 pm, edited 1 time in total.
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

Here some little correction again:

I hope the last for this part of this plugin

16.03.2006 add show "last log file"
16.03.2006 problem with select all solved

In developpement:
----------------
- option for using SCP/SSH instead TFTP.
- comparaison of to file / like diff
Last edited by pepj on Fri Mar 24, 2006 5:02 pm, edited 1 time in total.
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
User avatar
Viggy
Posts: 23
Joined: Fri Sep 16, 2005 5:15 pm
Location: MI, USA

GUI works but files don't download

Post by Viggy »

I am using
Cacti 0.8.6h
Win2K
Pumpkin TFTP

I think I have the plugin and pancho configured correctly but I have some issues.

Issue 1
I can add hosts in the GUI. The conf file is created correctly in the data directory. However when I click on the show fianl config button I recieve a page cannot be displayed error

Sample config file:

[global]
TftpServer=192.168.11.130
TftpRoot=\
LogFile=d:\tftp\data\Cat5005id2.conf.log
ForkLimit=10
StylePattern=::HOST::.::DATE::.cfg
StyleDate=%Y%m%d
SnmpVersion=2c
SnmpRetries=1
SnmpWait=5.2
SnmpMtu=1500
SnmpDebug=1
SnmpCommunity=sniffle
[192.168.11.5_83]
IpAddress=192.168.11.5
post=move ::FULLPATH::\::FILENAME:: d:\tftp\data\20060318\


Issue 2
When I try and compare two files I recieve the following error:
Notice: Undefined index: compare.php:file in D:\apache2\Apache2\htdocs\cacti\lib\functions.php on line 1361

Issue 3
No files get downloaded

Issue 4
When I run Pancho from the command line with the above config file I recieve the following output

D:\>pancho --download --config d:\tftp\data\cat5005id2.conf
Net::SNMP::Transport::dstname() is deprecated, use dest_hostname() instead at D:
/Perl/lib/Net/SNMP.pm line 388.
Net::SNMP::Transport::dstname() is deprecated, use dest_hostname() instead at D:
/Perl/lib/Net/SNMP.pm line 388.
error: [1891] Net::SNMP::__ANON__(): Received noAccess(6) error-status at error-
index 1

ERROR (192.168.11.5_83): Received noAccess(6) error-status at error-index 1


D:\>

Any help would be greatly appreciated
User avatar
Viggy
Posts: 23
Joined: Fri Sep 16, 2005 5:15 pm
Location: MI, USA

GUI not working

Post by Viggy »

OK I got Pancho working from the command line, but I still don' t get downloads from within Cacti - the jobs show as never having been run.

I have debugging checked but I am not seeing anything in the logs.

Any ideas wher I have gone wrong?
User avatar
Viggy
Posts: 23
Joined: Fri Sep 16, 2005 5:15 pm
Location: MI, USA

Getting closer

Post by Viggy »

I am getting closer

I fixed the show config issue.

I can run

d:\perl\bin\perl.exe -Id:\pancho\lib d:\pancho\modules\blib\lib\pancho.pl --download --config d:\tftp\data\apid1.conf

from the command line and it works.

However I still can not do a compare, and it appears as if the Poller is never caller the application to download the files.

Can anyone help?
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

Hi

0/ First: forget the compare function it is comming soon. I though I had put the "message under developpement". I had to solve the possibility to browse the server and not the client. But I think I have solved this.

1/ when you click on "manage config" you can see the last run time. What can you see ?
Do you have set your configuration to "up" !!

2/ to force it schedules immediatly again you can click on litte icon under the column "config" like "a paper and pencil". So you will see the schedule configuration of your config. When you click on save the last time is reset to "0000-00-00 00:00:00" and the scheduler will retry to start it in 5mins
but you can for it with (on command)
"php yourdirectoryinlowercases/plugins/configmanager/configmanager_poller.php -d "
(in lower case !! because PHPbug ). "-d" is here to force a debug in cacti log.

3/ after this can you see on the "View Cacti Log File" something ?
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
User avatar
Viggy
Posts: 23
Joined: Fri Sep 16, 2005 5:15 pm
Location: MI, USA

That Fixed it

Post by Viggy »

Smack the stupid user....

I thought the Up/Down refered to uploading/downloading

Switched to up and it kicked off like a champ.

Thanks for the great plugin and the quick reply

I look forward to the compare feature.

-Dave
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

Ok my language is not english:

What would be better than up / down in order to refer to "activ/not activ configuration"? It would be good at having a very short word.
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests