Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


A few broken items built in to a new install - Request fixes
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Help: Unstable Development Versions
Author Message
N3NCY
Cacti User


Joined: 22 Sep 2005
Posts: 242
Location: Landenberg, PA

PostPosted: Tue Jul 29, 2008 8:35 pm    Post subject: A few broken items built in to a new install - Request fixes Reply with quote

I have been working with Brian on a new "Cacti Migration" plug-in (work in progress)
http://forums.cacti.net/viewtopic.php?t=28197

Specifically, my part is to create the “import” portion of the migrate plug-in.

I am creating the script in PERL and things are going very well.
In fact, things are going so well, I decided to write a Cacti installer in PERL.
Long story made short, I have installed Cacti 0.8.7b and PIA 2.1 about a zillion times during my script testing.
In doing so, I see a few things that should be cleaned up on “fresh installs”.

1.) A clean install of Cacti 0.8.7b and PIA 2.1 has a few somewhat harmless but still annoying errors:
Warning: reset() [function.reset]: Passed variable is not an array or object in /var/www/cacti/lib/ on 146
Warning: Variable passed to each() is not an array or object in /var/www/cacti/lib/fon 147
Described here:
http://forums.cacti.net/viewtopic.php?t=27807&highlight=functions.php++line+146


2.) During the install, RRDTool 1.3 is not in the install drop down box as a possible choice and 1.0 is the default.
Please add RRDTool 1.3 as a drop down choice and make it default.
Net-SNMP 5.x is in the other drop down box as default and it looks good.


3.) The default host (localhost) that is created has 5 graphs, but they do not result in the RRD files being created since the host is set to UDP and Port 0 as the downed host detection. Since the poller thinks this host is down (UDP port 0) it never updates the RRDs.
Result: New users on a clean install see broken graphs and think Cacti is not working.
Maybe TCP and Port 80 would be a better default on the localhost device that is created on new installs?


4.) Another thing about the “localhost” that is added by default on a clean install:
The poller thinks that it has “two” (2) hosts right out the box.
The initial count is off by one (1) on a clean install.
The poller log should say Hosts:1 not Hosts:2


Anyway, I would love to see these items fixed or addressed in next release or patch or in SVN or whichever makes sense.
I will be glad to test anything on a new install.
Remember, I can crank out a new install in a VM using my script very rapidly and I am more than happy to test things.
I will post the PERL install / migrate script shortly as well, I am still polishing it up a bit.
Thank you for taking a look at this and for Cacti!
Back to top
Linegod
Developer


Joined: 20 Feb 2003
Posts: 517
Location: Canada

PostPosted: Wed Jul 30, 2008 1:03 am    Post subject: Reply with quote

Post bugs on them, and I'll check them out...
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9691
Location: MI, USA

PostPosted: Wed Jul 30, 2008 5:06 am    Post subject: Reply with quote

Ernie,

Can you take on rounding up a half dozen testers for 0.8.7c. I want to push the PIA issue in SF next week and we will be planning a release. However, we need beta testers.

Larry
Back to top
N3NCY
Cacti User


Joined: 22 Sep 2005
Posts: 242
Location: Landenberg, PA

PostPosted: Wed Jul 30, 2008 3:47 pm    Post subject: Reply with quote

I should be able to get a few testers.

I will test it heavily this Saturday & Sunday myself as well.

Is the latest thing you want to have tested in SVN?
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9691
Location: MI, USA

PostPosted: Wed Jul 30, 2008 9:43 pm    Post subject: Reply with quote

Branches 0.8.7. It's pretty much up-to-date.

Larry
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2162
Location: United Kingdom

PostPosted: Thu Jul 31, 2008 3:15 am    Post subject: Re: A few broken items built in to a new install - Request f Reply with quote

N3NCY wrote:
2.) During the install, RRDTool 1.3 is not in the install drop down box as a possible choice and 1.0 is the default.
Please add RRDTool 1.3 as a drop down choice and make it default.
Net-SNMP 5.x is in the other drop down box as default and it looks good.


Doesn't that need other work, to make title fonts etc work? Font handling has changed a lot in 1.3...
Back to top
streaker69
Cacti Pro User


Joined: 27 Mar 2006
Posts: 647
Location: Psychic Amish Network Administrator

PostPosted: Thu Jul 31, 2008 8:05 am    Post subject: Re: A few broken items built in to a new install - Request f Reply with quote

Howie wrote:
N3NCY wrote:
2.) During the install, RRDTool 1.3 is not in the install drop down box as a possible choice and 1.0 is the default.
Please add RRDTool 1.3 as a drop down choice and make it default.
Net-SNMP 5.x is in the other drop down box as default and it looks good.


Doesn't that need other work, to make title fonts etc work? Font handling has changed a lot in 1.3...


I have 1.3 installed right now, and although you can't really use the custom font definitions the way we used to in Cacti, it does work fine just out of the box. The box I'm currently running has never had RRDTool 1.2 installed on it, I went straight to 1.3 and haven't had an issue yet with Fonts.
Back to top
N3NCY
Cacti User


Joined: 22 Sep 2005
Posts: 242
Location: Landenberg, PA

PostPosted: Sat Aug 02, 2008 7:49 am    Post subject: Reply with quote

Beginning testing.
svn checkout in progress...
Back to top
N3NCY
Cacti User


Joined: 22 Sep 2005
Posts: 242
Location: Landenberg, PA

PostPosted: Sat Aug 02, 2008 8:18 am    Post subject: Reply with quote

svn checkout completed.

Starting randomly as a new user would.

1.) Readme has incorrect info:
cacti/branches/0.8.7/README
Please view "docs/README" and "docs/INSTALL.htm" for more information.
- docs/INSTALL.htm does not exist
- docs/README seems scattered with random information, a link back to the Cacti Documentation web would be better or a "quick start" set of instructions may be more useful

2.) I did find this document helpful as a "reference for building Cacti documentation"
cacti/branches/0.8.7/docs/build/manual.sgml
- A while back I was tasked with writing a FreeBSD guide in a particular format:
http://forums.cacti.net/viewtopic.php?p=114786&highlight=#114786
- This had led me into the insane world of XML and DocBook:
http://www.docbook.org/specs/docbook-5.0-spec-cd-04.html
and into the even more insane attempt to find an XML editor, for now I continue to use JEdit
- At least I now see a working an example in manual.sgml

testing continues...


Last edited by N3NCY on Sat Aug 02, 2008 9:19 am; edited 1 time in total
Back to top
N3NCY
Cacti User


Joined: 22 Sep 2005
Posts: 242
Location: Landenberg, PA

PostPosted: Sat Aug 02, 2008 8:55 am    Post subject: Reply with quote

Run #1 - Rapid Cacti install from SVN without PIA

# Move the SVN code to production location
mv /usr/src/cacti/cacti/branches/0.8.7 /opt/apache/htdocs/cacti

# Create the Cacti DB and import the schema
/opt/mysql/bin/mysqladmin --user=mysql --password=mysqlpassword create cacti
/opt/mysql/bin/mysql --user=mysql --password=mysqlpassword cacti < /opt/apache/htdocs/cacti/cacti.sql

# Edit the config.php like a true PERL maniac!
cp /opt/apache/htdocs/cacti/include/config.php.dist /opt/apache/htdocs/cacti/include/config.php
perl -i.bak -p -e 's/database_username = "\w*";/database_username = "mysql";/ig' /opt/apache/htdocs/cacti/include/config.php
perl -i.bak -p -e 's/database_password = "\w*";/database_password = "mysqlpassword";/g' /opt/apache/htdocs/cacti/include/config.php

# Update the crontab to include the Cacti Polling engine at 5 minute intervals
echo "# Cacti Poller" >> /etc/crontab
echo "*/5 * * * * root /usr/local/bin/php /opt/apache/htdocs/cacti/poller.php > /dev/null 2>&1" >> /etc/crontab

# Set UNIX permisions
chown -R www:www /opt/apache/htdocs/cacti/

# Log in into the test server's web interface and walk through first time install and set a password
http://172.28.0.70/cacti

RRDTool 1.3 and NET-SNMP 5.x as well as all required files where found.

New password set.

Cacti 0.8.7b from SVN is alive and no errors were seen at this point.
Back to top
N3NCY
Cacti User


Joined: 22 Sep 2005
Posts: 242
Location: Landenberg, PA

PostPosted: Sat Aug 02, 2008 9:12 am    Post subject: Reply with quote

3.) Cacti poller has ran at least three times now and no graphs are useable - Only broken graphs appear at this time

08/02/2008 09:55:02 AM - SYSTEM STATS: Time:1.2095 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:0
08/02/2008 09:50:01 AM - SYSTEM STATS: Time:1.1954 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:0
08/02/2008 09:45:01 AM - SYSTEM STATS: Time:1.1996 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:0

Two issues are seen on a new install each time a new install is completed:
- An incorrect number of hosts is counted by the poller:
Hosts:2
- The default localhost imported on a fresh install fails to generate graphs since the downed host detection sees the local host as down via UPD Port 0 and does not update the RRD files resulting in broken graphs
RRDsProcessed:0


Corrective actions requested:

- Fix the poller script to get an accurate count of hosts, it is off by 1 to start
Hosts:1

and

Set the localhost to a default downed detection status that is likely to succeed:
TCP Port 80
This fix should be included in the default SQL schema data that is imported on fresh installs
cacti/cacti.sql
Back to top
N3NCY
Cacti User


Joined: 22 Sep 2005
Posts: 242
Location: Landenberg, PA

PostPosted: Sat Aug 02, 2008 9:36 am    Post subject: Reply with quote

4.) Some default data sources not valid on FreeBSD
On a new UNIX/Linux type install, Localhost 127.0.0.1 is created
5 things are set to generate graphs as imported from cacti/cacti.sql
Localhost - Load Average Unix - Get Load Average
Localhost - Logged in Users Unix - Get Logged In Users
Localhost - Memory - Free Linux - Get Memory Usage
Localhost - Memory - Free Swap Linux - Get Memory Usage
Localhost - Processes Unix - Get System Processes


Two of these are broken on FreeBSD
Localhost - Memory - Free Linux - Get Memory Usage
Localhost - Memory - Free Swap Linux - Get Memory Usage

08/02/2008 10:30:01 AM - SYSTEM STATS: Time:1.2218 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
08/02/2008 10:30:01 AM - CMDPHP: Poller[0] Host[1] DS[4] WARNING: Result from CMD not valid. Partial Result:
08/02/2008 10:30:01 AM - CMDPHP: Poller[0] Host[1] DS[3] WARNING: Result from CMD not valid. Partial Result:


Corrective action requested:
Either detect FreeBSD as UNIX not Linux and do not include:
Localhost - Memory - Free Linux - Get Memory Usage
Localhost - Memory - Free Swap Linux - Get Memory Usage
or
As a simple fix limit the data sources on a default new install in cacti/cacti.sql to only include three (3) things that are safe to use / sure to yield results for all new users on new installs to these:
Localhost - Load Average Unix - Get Load Average
Localhost - Logged in Users Unix - Get Logged In Users
Localhost - Processes Unix - Get System Processes
Back to top
N3NCY
Cacti User


Joined: 22 Sep 2005
Posts: 242
Location: Landenberg, PA

PostPosted: Sat Aug 02, 2008 10:26 am    Post subject: Reply with quote

Run #2 - Rapid Cacti install from SVN and add the PIA on top of Cacti from SVN that is already running


# Get the "Plug-in Architecture"
cd /usr/src
fetch http://cactiusers.org/downloads/cacti-plugin-arch.tar.gz
tar xvf cacti-plugin-arch.tar.gz
cp -R /usr/src/cacti-plugin-arch/files-0.8.7b/ /opt/apache/htdocs/cacti/

# Edit Cacti global configuration file
vi /opt/apache/htdocs/cacti/include/global.php
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "mysql";
$database_password = "mysqlpassword";
$database_port = "3306";
$config['url_path'] = '/cacti/';

# Import the default PIA database schema and starting data
/opt/mysql/bin/mysql --user=cactiuser --password=cactipassword cacti < /usr/src/cacti-plugin-arch/pa.sql

# Set UNIX permisions
chown -R www:www /opt/apache/htdocs/cacti/


Testing continues...
Back to top
N3NCY
Cacti User


Joined: 22 Sep 2005
Posts: 242
Location: Landenberg, PA

PostPosted: Sat Aug 02, 2008 10:31 am    Post subject: Reply with quote

5.) Right out of the box PA broke my ability to see graphs

PIA 2.1 does not know about RRDTool 1.3 so it defaulted back to 1.0

A quick change of the drop down box to the only viable choice
RRDTool 1.2
and now I can see my graphs again


Corrective action requested:
Add RRDTool 1.3 to the PIA code


Testing continues...
Back to top
N3NCY
Cacti User


Joined: 22 Sep 2005
Posts: 242
Location: Landenberg, PA

PostPosted: Sat Aug 02, 2008 10:38 am    Post subject: Reply with quote

6.) ICMP Raw Socket creation and downed host detection still an issue with or without the plugin architecture

See:
http://forums.cacti.net/viewtopic.php?p=141248&highlight=#141248

Corrective action requested:
Either stop having PHP check for downed hosts via ICMP since this should really be the pollers job since it already runs as root and can create ICMP easily
and/or
Get SUID code working (I know we are testing this option)
This may never be possible in Windows?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: Unstable Development Versions All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 



Powered by phpBB © 2001, 2005 phpBB Group