plugin for download/upload routers switches configuration

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

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

plugin for download/upload routers switches configuration

Post by pepj »

Configmanager plugin,
(you need the pugin architecture)

current version configmanager: 0.826
current version sharednetworkclass: 0.42

changes in configmanager 0.826 (see Manual.txt):correction bug when no days or months + unix scripts in unix format
changes in configmanager 0.825 (see Manual.txt):
  • adapt to PA 2.x Plugin Architecture.
    any SYSLOG DB for trap events
    correction bug for scheduling traps event
    correct bug scheduling jobs (only in v0.822, v0.823)
    in main menu first the action "reset in 5 minutes", second "delete".
    Sort-function in the views
    ignore the disabled devices.
    allow the possiblity to authorize any remote hosts to access to this plugin.
    add some information in the views + avaibility to sort in the list.
    compare module amelioration (+ new parameter in settings).

    Explanation:
    With this plugin you can easily schedule the download/upload of the configuration of your routers, switches AND NOW any devices (or change in one click some parameters of hundert of switches ... dangerous but possible now). It should function for all type of router or switches.

    There is two method "TFTP" and "script".
- "TFTP" is based of "pancho" http://www.pancho.org.
- "TFTP" with option "pure PHP". no need of pancho installation (you need to copy the "sharednetwork class"-module).
- "script" can use any scripts or SCP, FTP, SFTP or what you want. Some scripts for windows and linux are provided
[/list]
The any syslog/Traps DB could be used to active the scripts or TFTP-method for the host which has received a specific event and which the "trap event flag" is active.

read first the manual.txt in the zipped file

(for windows) copy the diff.exe and gzip.exe into /plugins/configmanager
if you don't have one.

UPGRADE: for upgrading
  • - take care about your own secure.cfg and securecompare.cfg files and your scripts under 'plugins/configmanager/scripts if you have some
    - (NO MORE NEEDED database_upgrade.php )
You see some views (and the full release including gzip.exe and diff.exe) in :
http://cactiusers.org/forums/viewtopic.php?p=1020#1020 or here below

-syslog/traps event activation

Next activities:
  • 1/ the temp folder for configmanager will be a setting parameter default(.../configmanager/temp)
    2/ the scripts folder for configmanager will be a setting parameter default(.../configmanager/scripts)
    easier for upgrade, security, ...
    3/ simplify the way to create scripts (will need only to copy the scripts and a help-file in order to be able to use it in the drop-down list of configmanager and get a example or help)
    4/ rewrite some parts to simplify the code and reuse more libraries of cacti
    5/ use cacti log
    6/ add other scripts
I will put in this post always the latest release.[/b]
Attachments
configmanager0.826.zip
version 0.826
(247.04 KiB) Downloaded 8248 times
configmanagerPictures.zip
some pictures
(438.74 KiB) Downloaded 6584 times
sharednetworkclass0.42.zip
shared network class 0.42.
0.42 correction for OID output format in linux
(144.55 KiB) Downloaded 5133 times
gzip.zip
gzip.exe (for windows users)
(44.38 KiB) Downloaded 4091 times
diff.zip
+ diff.exe (for windows users)
(112.25 KiB) Downloaded 4371 times
Last edited by pepj on Wed Oct 06, 2010 7:37 am, edited 60 times 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
mgb
Cacti User
Posts: 124
Joined: Mon Jun 21, 2004 4:06 am
Location: North of the Netherlands

Post by mgb »

Great, just what were looking for. :lol:

Does this tool also include versioning like rancid?

A feature from rancid that i realy like and it's abbility to compare a new version with the previous version.

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

here the views

Post by pepj »

Here some views ...

PS: sorry I dont know if my attached pancho file function under unix (better is a download from www.pancho.org)
Last edited by pepj on Fri Feb 01, 2008 5:54 pm, edited 5 times 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
N3NCY
Cacti User
Posts: 260
Joined: Thu Sep 22, 2005 7:50 pm
Location: Landenberg, PA
Contact:

Post by N3NCY »

I would like to get this working.

I can't even get pancho woking right from the command line.

pancho --download
ERROR (dhsslabsw1): Source Configuration doesnt exist.

I followed your instructions (I think)
Everything shows up in Cacti just fine.

Pancho itself seems broken.

I even edited my:
/usr/local/etc/pancho.conf
as per the instructions on the pancho site.

I have all the right Perl modules working.

Can you give an example of a command line that works for you?
Any idea what this means:
Source Configuration doesnt exist
Thank you,

Ernie
http://www.NMSWorld.com
[b]Dual Zeon Dual Core 2.6Ghz / 8GB RAM / 4x15k RPM SATA RAID5[/b]
[b]Cacti Version[/b] - 0.8.7b
[b]Poller Type[/b] - cactid 0.8.7 with Boost v1.7
[b]Server Info[/b] - FreeBSD 7.0-RELEASE
[b]Web Server[/b] - Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g DAV/2 PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8
[b]PHP[/b] - 5.2.6
[b]MySQL[/b] - 5.0.51b Mod: poller_output ENGINE = MEMORY
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Host Info (hostinfo - v0.2), Update Checker (update - v0.3), Network Tools (tools - v0.2), FlowView (flowview - v0.3), Read-only Devices Tab (devices - v0.4), Network Discovery (discovery - v0.8.3), Syslog Monitoring (syslog - v0.5.2), Thresholds (thold - v0.3.9), Device Monitoring (monitor - v0.8.2), PHP Network Weathermap (weathermap - v0.941), SuperLinks (superlinks - v0.72), Report Creator (reports - v0.1b)
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

Hi

Manually you can try this:
1/ change the "pancho-test-config.cfg" I 've attached for you needs:
- TftpServer=TO CHANGE
- LogFile=TO CHANGE \Pancho\pancho.log
- SnmpCommunity=TO CHANGE
- [nameOfSwitchTO_CHANGE]
- IpAddress=TO CHANGE

2/ on the command line try this:
/perl/bin/perl.exe -I/pancho/lib pancho.pl -download -config pancho-test-config.cfg
or
/perl/bin/perl.exe -download -config pancho-test-config.cfg
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 »

I have done some correction in the plugin:

I have corrected some bugs like :
correction bug with template = any.
correction bug with button switch up/down.
correction bug filter

I have something strange I can add only with the last drop_down button... PS: I am new in PHP .... 4 weeks
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
N3NCY
Cacti User
Posts: 260
Joined: Thu Sep 22, 2005 7:50 pm
Location: Landenberg, PA
Contact:

Post by N3NCY »

I tried this many ways now, but keep gettng some form of:
Can't call method "Sections" on an undefined value at /usr/local/bin/pancho line 139.

or

Can't call method "Sections" on an undefined value at /opt/pancho/modules/blib/lib/pancho.pl line 135.

I will read up on pancho and get the command line working.
Thank you,

Ernie
http://www.NMSWorld.com
[b]Dual Zeon Dual Core 2.6Ghz / 8GB RAM / 4x15k RPM SATA RAID5[/b]
[b]Cacti Version[/b] - 0.8.7b
[b]Poller Type[/b] - cactid 0.8.7 with Boost v1.7
[b]Server Info[/b] - FreeBSD 7.0-RELEASE
[b]Web Server[/b] - Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g DAV/2 PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8
[b]PHP[/b] - 5.2.6
[b]MySQL[/b] - 5.0.51b Mod: poller_output ENGINE = MEMORY
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Host Info (hostinfo - v0.2), Update Checker (update - v0.3), Network Tools (tools - v0.2), FlowView (flowview - v0.3), Read-only Devices Tab (devices - v0.4), Network Discovery (discovery - v0.8.3), Syslog Monitoring (syslog - v0.5.2), Thresholds (thold - v0.3.9), Device Monitoring (monitor - v0.8.2), PHP Network Weathermap (weathermap - v0.941), SuperLinks (superlinks - v0.72), Report Creator (reports - v0.1b)
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

N3NCY wrote:I tried this many ways now, but keep gettng some form of:
Can't call method "Sections" on an undefined value at /usr/local/bin/pancho line 139.

or

Can't call method "Sections" on an undefined value at /opt/pancho/modules/blib/lib/pancho.pl line 135.

I will read up on pancho and get the command line working.
Hi
Do you have install the PERL module config-IniFiles ? I have version 2.38 but in the pancho you could find 2.30

This PERL module is responsable for the read of the section list.
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
N3NCY
Cacti User
Posts: 260
Joined: Thu Sep 22, 2005 7:50 pm
Location: Landenberg, PA
Contact:

Post by N3NCY »

I have installed Config-IniFiles-2.39

I still get:
/usr/local/bin/pancho --download --config /tmp/test.cfg
Can't call method "Sections" on an undefined value at /usr/local/bin/pancho line 139.
Thank you,

Ernie
http://www.NMSWorld.com
[b]Dual Zeon Dual Core 2.6Ghz / 8GB RAM / 4x15k RPM SATA RAID5[/b]
[b]Cacti Version[/b] - 0.8.7b
[b]Poller Type[/b] - cactid 0.8.7 with Boost v1.7
[b]Server Info[/b] - FreeBSD 7.0-RELEASE
[b]Web Server[/b] - Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g DAV/2 PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8
[b]PHP[/b] - 5.2.6
[b]MySQL[/b] - 5.0.51b Mod: poller_output ENGINE = MEMORY
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Host Info (hostinfo - v0.2), Update Checker (update - v0.3), Network Tools (tools - v0.2), FlowView (flowview - v0.3), Read-only Devices Tab (devices - v0.4), Network Discovery (discovery - v0.8.3), Syslog Monitoring (syslog - v0.5.2), Thresholds (thold - v0.3.9), Device Monitoring (monitor - v0.8.2), PHP Network Weathermap (weathermap - v0.941), SuperLinks (superlinks - v0.72), Report Creator (reports - v0.1b)
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

Hi

I think I have understand your problem:
You need the parameters [global] before the global commands at the top !(not commented with #)

After this parameter you should have the global variables like TftpServer .... (to notice that yhou cannot use 127.0.0.0.1 for tftp because this this the parameter which is use in the router/switche.
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 »

This plugin would almost replace my system, except that it uses tftp servers ( a no-no in the security certification we are now persuing). Are there ways around it?

The system I have now is a series of scripts that run and fetch configs via telnet (which will soon need to be converted to SSH for same security certification, if possible). It then places those configs into a subversion project for versioning and such. I then use viewcvs for viewing and comparing/diffing them. This is done each time the system recieves a SNMP trap that the config has changed, or on a dialy basis via a cron script for those systems too far out on the network to send SNMP traps.

Just some more ideas for a plugin like this I suppose. I would enjoy a way of making mass changes to switches though. Once we have port configurations standardized throughout the network, that ability could be handy!
mgb
Cacti User
Posts: 124
Joined: Mon Jun 21, 2004 4:06 am
Location: North of the Netherlands

Post by mgb »

@knobdy

Are you using rancid? We are currently using rancid for getting the configs but would love to see a plugin for configuration and browsing through the subversion tree.
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

No, this is a home-spun system, loosely based on an article I found on the 'Net: http://www.devx.com/enterprise/Article/21647/0/page/1
Exo7
Cacti User
Posts: 136
Joined: Wed Jul 13, 2005 4:50 pm

Post by Exo7 »

would love to see a plugin for configuration and browsing through the subversion tree.
You can always have the "link" plugin setup to link to the viewcvs page.
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

Where's the "link plugin"? I'm not getting anything back with the forum search. Well, actually, I'm getting too much back. Same difference.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests