plugin for download/upload routers switches configuration

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
kos
Posts: 25
Joined: Wed Nov 01, 2006 2:29 am
Location: Singapore

config manager installed under Windows IIS

Post by kos »

I installed configmanager according to the manual but still facing some problems:

I can not get access to the "manage configs" page (error no right) even I added the IP address (visible under the tab "settings|up/download config manager).

Local access via 127.1.1.1 is working, but I can not add a config. Selecting the button "create" just refreshes the page and all changed settings are gone.
if I run configmanager.php at command line he shows me some


C:\Inetpub\wwwroot\cacti\plugins\configmanager>php.exe configmanager.php
<html>
<head>
<title>Login to Cacti</title>
<STYLE TYPE="text/css">
<!--
BODY, TABLE, TR, TD {font-family: Verdana, Arial, Helvetica, san
s-serif; font-size: 12px;}
A {text-decoration: none;}
A:active { text-decoration: none;}
A:hover {text-decoration: underline; color: #333333;}
A:visited {color: Blue;}
-->
</style>
</head>

<body bgcolor="#FFFFFF" onload="document.login.login_username.focus()">

<!-- apparently IIS 5/4 have a bug (Q176113) where setting a cookie and calling
the header via
'Location' does not work. This seems to fix the bug for me at least... -->
<form name="login" method="post" action="configmanager.php">


<table align="center">
<tr>
<td colspan="2"><center><img src="C:\Inetpub\wwwroot\cacti\image
s/auth_login.gif" border="0" alt=""></center></td>
</tr>
<tr height="10"><td></td></tr>
<tr>
<td colspan="2">Please enter your Cacti user name and password b
elow:</td>
</tr>
<tr height="10"><td></td></tr>
<tr>
<td>User Name:</td>
<td><input type="text" name="login_username" size="40" style="wi
dth: 295px;"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="login_password" size="40" style
="width: 295px;"></td>
</tr>
<tr height="10"><td></td></tr>
<tr>
<td><input type="submit" value="Login"></td>
</tr>
</table>

<input type="hidden" name="action" value="login">


</form>

</body>
</html>
Are you sure, configmanager is running under IIS?
Cacti Version - 0.8.6i
Plugin Architecture - 1.0
Poller Type - Cactid v0.8.6f
Server Info - Windows NT 5.2
Web Server - Microsoft-IIS/6.0
PHP - 5.1.4
PHP Extensions - bcmath, calendar, com_dotnet, ctype, date, ftp, hash, iconv, odbc, pcre, Reflection, session, libxml, standard, tokenizer, zlib, SimpleXML, dom, SPL, wddx, xml, xmlreader, xmlwriter, ISAPI, gd, mysql, snmp, sockets
MySQL - 5.0.24-community-nt
RRDTool - 1.2.15
SNMP - 5.3.0.1
Plugins
  • Read-only Devices Tab (devices - v0.4)
    PHP Network Weathermap (weathermap - v0.82)
    Update Checker (update - v0.3)
    Device Monitoring (monitor - v0.7)
    Host Info (hostinfo - v0.1)
    Simple Links page (links - v0.3)
    RRD Cleaner - v1.2
    configmanager - v0.2
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Re: Help with install

Post by pepj »

TheTick wrote:Ok, I was able to get through the first three steps.
0/ You will need the plugin-architectur of Jimmy http://cactiusers.org
1/ Only If you want to use the "TFTP" method Install "pancho" www.pancho.org (with perl!!).
2/ copy the plugin under "your_cacti/plugins/configmanager"
3/ create the sql database
- "mysql --user=root --password cacti < your_cacti/plugins/configmanager/configmanager.sql"
But on the fourth step I got this error.
ERROR 1046 (3D000) at line 2: No database selected
Do I need to create a database first?
I
Yes you need it (until the next release) and it is the step 3/ with the execution of the command under shell:

Code: Select all

mysql --user=YourDatabaseCactiuser --password cacti < your_cacti/plugins/configmanager/configmanager.sql
You can check in the SQL database with :
mysql --user=YourDatabaseCactiuser --password cacti
mysql> show tables;
+------------------------------+
| Tables_in_cacti |
+------------------------------+
| cdef |
......
.....
| configmanager |
| configmanager_data |
You should see configmanager and configmanager_data
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

Re: config manager installed under Windows IIS

Post by pepj »

[quote="kos"] page (error no right) [quote]
it is normal for your security. Because with confgmanager you can change / see all your network configuration's device with few clicks.

For more security you have to set which worstation have the right the do it.

create the file 'secure.cfg' as the example secure.cfg.example in oder to permit your worstation. (it is the same idea as for the firewall where you have to permit some worstation which are able to use the management)
it is the step 6/ of the manual
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
didx
Posts: 31
Joined: Fri Jun 16, 2006 5:25 am
Location: Lille France

configmanager pancho and nat

Post by didx »

Hi pepj!

I'm currently using your plugin to save many cisco config (pancho mode).
My problem is that few of them are behind a firewall with nat so that the tftp server address is not the same as the one I use for other switches.

It seems that the tftp server address is defined in Cacti/configuration/settings/up-download config manager/ TFTP server

I've already tried to create a new configuration and modify the config file with a pre command script (substituing the "TftpServer=A.B.C.D" line with TftpServer=E.F.G.H). When I look at "show final configuration file", the config is good, but on the switch side I still get snmpset packets with the wrong address (I can see that with "debug snmp packet")

Is it possible to configure more than one address for the tftp server?
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Re: configmanager pancho and nat

Post by pepj »

didx wrote:Is it possible to configure more than one address for the tftp server?
At this time the TFTP server of the config is rewrited before the start of the config (because it could be that someone remove the config file before).

But good Idea I will put the possibility to change the TFTP server for each managerconfig. I did not think about the NAT.

It is comming soon (few days) with new features.

in the next version (soon) I will:
+ version 0.5 : (very soon)
- new logs,
- display of no more used devices
- simplify GUI of TFTP method
- update/installation of SQL DB automatically
- format for compatibility with plugin update
- possibility to change the TFTP server for each configmanager config (will solve NAT problem)

+ version 0.6: (also soon)
- pure PHP version for TFTP (no need of Pancho installation if wishes)
Here I need Beta tester for Nortel products
- when SNMP config-trap (in SYSLOG) automatically config download
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

Re: configmanager pancho and nat

Post by pepj »

version 0.5 available (in the first post)

- new logs,
- display of no more used devices
- simplify GUI of TFTP method
- update/installation of SQL DB automatically (wait only 5 minutes)
- format for compatibility with plugin update
- possibility to change the TFTP server for each configmanager config (will solve NAT problem)

Future version 0.6:
- pure PHP version for TFTP (no need of Pancho installation if wishes)
Here I need Beta tester for Nortel products
- when SNMP config-trap (in SYSLOG) automatically config download
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
airwalk
Cacti User
Posts: 103
Joined: Fri Aug 18, 2006 11:22 am
Location: MSK, RU

Post by airwalk »

I've just installed your plugin and facing a problem - looks like style is not being applied to the plugin. What could be wrong?

Here's the configuration I use:
Cacti Version - 0.8.6i
Plugin Architecture - 1.0
Poller Type - CMD.php
Server Info - Windows NT 5.2
Web Server - Apache/2.2.3 (Win32) PHP/5.2.1-dev
PHP - 5.2.1-dev
PHP Extensions - bcmath, calendar, com_dotnet, ctype, session, filter, ftp, hash, iconv, json, odbc, pcre, Reflection, date, libxml, standard, tokenizer, zlib, SimpleXML, dom, SPL, wddx, xml, xmlreader, xmlwriter, apache2handler, mbstring, gd, ldap, mysql, snmp, sockets, Zend Optimizer
MySQL - 5.0.24-community-nt
RRDTool - 1.2.15
SNMP - snmpwalk [OPTIONS] AGENT [OID]

Version: 5.3.1
Web: http://www.net-snmp.org/
Email: net-snmp-coders@lists.sourceforge.net

Plugins
  • Thresholds (thold - v0.3.0)
    Syslog Monitoring (haloe - v0.4)
    Host Info (hostinfo - v0.1)
    Read-only Devices Tab (devices - v0.4)
    Network Discovery (discovery - v0.6)
    Update Checker (update - v0.3)
    Network Tools (tools - v0.2)
    PHP Network Weathermap (weathermap - v0.82)
    Poller Performance Report (pollperf - v0.1)
    rrdclean (RRD Cleaner - v1.2 (Hack Gilles Boulon))
    Dataquery (dataquery - v0.1.2a)
    Device Tracking (mactrack - v0.0.1b)
    Configuration manager (configmanager - v0.5)
Attachments
configmanager.PNG
configmanager.PNG (47.81 KiB) Viewed 8471 times
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

airwalk wrote:What could be wrong?
airwalk wrote:What could be wrong?
Oupss .. sorry I had a link to my new plugins (almost finished)

manually correction:
1/ copy main.css file from your-cacti\include\main.css to your-cacti\plugins\configmanager\html
2/ change the line 34 of your-cacti\plugins\configmanager\html\top_header.php file
replace

Code: Select all

	<link href="<?php echo $config['url_path']; ?>plugins/ide/html/main.css" rel="stylesheet">
to

Code: Select all

	<link href="<?php echo $config['url_path']; ?>plugins/configmanager/html/main.css" rel="stylesheet">
I will update the first post now.

Thanks for the feedback .
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
airwalk
Cacti User
Posts: 103
Joined: Fri Aug 18, 2006 11:22 am
Location: MSK, RU

Post by airwalk »

thanks, that fixed the problem.
airwalk
Cacti User
Posts: 103
Joined: Fri Aug 18, 2006 11:22 am
Location: MSK, RU

Post by airwalk »

Pepj,

You've mentioned in manual a precompiled pancho (for Windows) but I failed to find it here or on cactiusers. Could you post it as I fail to compile it myself with nmake 1.5.

nmake says me "fatal error U1002: syntax error : invalid macro invocation '$'"
lga
Posts: 21
Joined: Mon May 23, 2005 4:39 am
Location: Belgium

Post by lga »

Hi,

I upgraded configmanager from 0.1 to 0.5.
I have this problem when I want look the log file:

Code: Select all

Fatal error: Call to undefined function: tail_file() in /usr/local/cacti-0.8.6h/plugins/configmanager/cfgmngutilities.php on line 148
Do you have an idea for a solution ?

Thks in advance,

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

Post by pepj »

lga wrote:I upgraded configmanager from 0.1 to 0.5.

Code: Select all

Fatal error: Call to undefined function: tail_file() in /usr/local/cacti-0.8.6h/plugins/configmanager/cfgmngutilities.php on line 148
You're right . It is a function of cacti 0.8i
If you don't want to upgrade cacti to 0.8i then do the following:
1/ copy the file "compatibily_cacti_before0.8i.php" into ..your-cacti/plugins/configmanager/include folder
2/ in line 36 of "cfgmngutilities.php" insert

Code: Select all

include("./plugins/configmanager/include/compatibily_cacti_before0.8i.php");
I will put the changes (version0.5b) in the first post.
Attachments
compatibily_cacti_before0.8i.zip
correction for cacti before 0.8i and configmanager0.5a
(780 Bytes) Downloaded 402 times
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 »

airwalk wrote: precompiled pancho (for Windows)
please check your pm.
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
lga
Posts: 21
Joined: Mon May 23, 2005 4:39 am
Location: Belgium

Post by lga »

Hi pepj,

I still have a problem ;-)
When I create a scheduler, I choose tftp method.
I need a pre command in pancho which will create the directory to store the config files but as soon as I have ";" in the command, it withdraws it

For example:

Code: Select all

if ! test -d '/tftpboot/config/%y%%m%%d%'; then mkdir /tftpboot/config/%y%%m%%d%; fi
become in the pancho config file:

Code: Select all

if ! test -d '/tftpboot/config/%y%%m%%d%' then mkdir /tftpboot/config/%y%%m%%d% fi
Can you say me what I must change to keep this ";" ?

Thks in advance,

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

Post by pepj »

lga wrote:

Code: Select all

if ! test -d '/tftpboot/config/%y%%m%%d%'; then mkdir /tftpboot/config/%y%%m%%d%; fi
Hi

The problem comes from the cacti "save_sql" function. I don't know why they remove in any case the ';'

I have recreate a "save_sql2" function

put this "configmanager.php" file under your-cacti/plugins/configmanager/

PS: give me a feed back
Attachments
configmanager.zip
(12.31 KiB) Downloaded 554 times
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 0 guests