CactiEZ 0.7 Released

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

Post Reply
bangolio
Cacti User
Posts: 61
Joined: Sun Nov 24, 2013 5:44 am

Re: CactiEZ 0.7 Released

Post by bangolio »

I'm getting cron emails about mysqldump from backup.sh failing due to not using a password.
Fixed using ~/.my.cnf.
Is that a bug? anyone else experiencing this? where do I report it?
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: CactiEZ 0.7 Released

Post by cigamit »

bangolio wrote:I'm getting cron emails about mysqldump from backup.sh failing due to not using a password.
Fixed using ~/.my.cnf.
Is that a bug? anyone else experiencing this? where do I report it?
Its a bug, I will add it to the list of things to fix.
relaxibus
Posts: 18
Joined: Thu Jan 09, 2014 6:26 am

CactiEZ CentOS 5

Post by relaxibus »

Hi! I´m desperately looking for CactiEZ running on 32-Bit, but I´m not able to find where to download CactiEZ CentOS 5.

Is there any people here that work with CactiEZ and Brocade Fibre Channel Switches?

Cheers! :D
partywei626
Posts: 2
Joined: Tue Jan 14, 2014 5:31 am

Re: CactiEZ 0.7 Released

Post by partywei626 »

I found a BUG of CactiEZ ,

During installation, the key-in DNS ip, is not set

This led, after CactiEZ installed, can not resolve NTP Server IP

Cause ntp not working .... Cacti wrong time
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: CactiEZ 0.7 Released

Post by cigamit »

partywei626 wrote:I found a BUG of CactiEZ ,

During installation, the key-in DNS ip, is not set

This led, after CactiEZ installed, can not resolve NTP Server IP

Cause ntp not working .... Cacti wrong time
Thanks, I will take a look into fixing that.
spoonwzd
Posts: 28
Joined: Wed Jun 18, 2008 12:10 pm

Re: CactiEZ 0.7 Released

Post by spoonwzd »

Deployed CactiEZ today and updated all the 160+ packages listed in Webmin. Possibly a foolish move because I now see no graphs! Logs don't show any errors and it's still collecting data. Realtime graphs show data no problem.

Any ideas?
jabbson
Posts: 5
Joined: Tue Mar 04, 2014 12:05 pm

Re: CactiEZ 0.7 Released

Post by jabbson »

spoonwzd wrote:Deployed CactiEZ today and updated all the 160+ packages listed in Webmin. Possibly a foolish move because I now see no graphs! Logs don't show any errors and it's still collecting data. Realtime graphs show data no problem.
Any ideas?
Same thing, i've updates and webmin is now available only at http://x.x.x.x:10000, but not inside Cactiez.

Cannot make flowtools to work, files are being stored in the folders, but queries return no result.

Is there any way to fit more characters into syslog messages?
spoonwzd
Posts: 28
Joined: Wed Jun 18, 2008 12:10 pm

Re: CactiEZ 0.7 Released

Post by spoonwzd »

After digging around it appears that in Cacti 0.8.8a DEF statements were quoted with double quotes but in 0.8.8b they are now quoted with single quotes.
Which means that on line 214 of thold/setup.php this statement no longer works properly:

Code: Select all

$ddef   = explode('"', $def);
If you change it to split on the single quote it sorts the issue:

Code: Select all

$ddef   = explode("'", $def);
http://forums.cacti.net/viewtopic.php?f ... 52#p244143

I also had some other issues after this with some graphs not displaying do to some of my comment fields. This was resolved by applying the empty comment patch.

http://forums.cacti.net/viewtopic.php?p=243461#p243461

Hope this helps!
FollowMe
Posts: 5
Joined: Tue Mar 18, 2014 4:08 am

Re: CactiEZ 0.7 Released - Webmin repo?

Post by FollowMe »

Excellent iso image.

One question I have: Is the installed webmin rpm a special one, because you install it from the CactiEZ repo?

If not, you may include the official webmin repo in the next release and install of that:

webmin.repo:

Code: Select all

[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1
priority=10
gpgkey=http://www.webmin.com/jcameron-key.asc
FollowMe
Posts: 5
Joined: Tue Mar 18, 2014 4:08 am

Re: CactiEZ 0.7 Released

Post by FollowMe »

jabbson wrote: Same thing, i've updates and webmin is now available only at http://x.x.x.x:10000, but not inside Cactiez.

Set

Code: Select all

no_frame_options=1
in /etc/webmin/config file.

Note that this is a security feature you bypass with the mentioned config option. Normally, Webmin can't be used in iFrames anymore due to the possible XSS vulnerability it has by nature, as the Webmin URL is not the same origin as Cacti (Webmin uses a different port 10000).
jabbson
Posts: 5
Joined: Tue Mar 04, 2014 12:05 pm

Re: CactiEZ 0.7 Released

Post by jabbson »

FollowMe wrote: Set

Code: Select all

no_frame_options=1
in /etc/webmin/config file.
Note that this is a security feature you bypass with the mentioned config option. Normally, Webmin can't be used in iFrames anymore due to the possible XSS vulnerability it has by nature, as the Webmin URL is not the same origin as Cacti (Webmin uses a different port 10000).
Unfortunately, nothing have changed after I've added the line to the webmin config file (i tried to restart webmin service as well as the entire vm machine)

Code: Select all

[root@localhost ~]# cat /etc/webmin/config 
ld_env=LD_LIBRARY_PATH
passwd_cindex=2
passwd_uindex=0
find_pid_command=ps auwwwx | grep NAME | grep -v grep | awk '{ print $2 }'
real_os_version=6.3
real_os_type=CentOS Linux
webprefixnoredir=1
webprefix=
path=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
passwd_pindex=1
passwd_mindex=4
os_version=14.3
passwd_file=/etc/shadow
tempdelete_days=7
by_view=0
os_type=redhat-linux
errorlog=/var/webmin/miniserv.error
log=1
syslog=1
logtime=168
referers_none=1
theme=gray-theme
product=webmin
no_frame_options=1
Although, i see the following error in the /var/webmin/miniserv.error (don't know if this error is related to my problem in any way)

Code: Select all

[21/Mar/2014:17:11:30 +0300] miniserv.pl started
[21/Mar/2014:17:11:30 +0300] Using MD5 module Digest::MD5
[21/Mar/2014:17:11:30 +0300] Perl module Authen::PAM needed for PAM is not installed : Can't locate Authen/PAM.pm in @INC (@INC contains: /usr/libexec/webmin /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 11) line 1.
BEGIN failed--compilation aborted at (eval 11) line 1.
Also I'm having troubles with FlowTools, no data is being written to the ft* files,
what i have determined already is as follows:

1. netflow packets in fact are coming to the server (checked with tcpdump)
2. netflow packets in fact do consist netflow data (checked with wireshark)
3. no data is being recorded into the files in flows folder, but they [files] exist for every time period (checked with flow-print)
4. obviously enough, nothing is displayed on the webpage

What would be my steps to find and fix the problem?
jabbson
Posts: 5
Joined: Tue Mar 04, 2014 12:05 pm

Re: CactiEZ 0.7 Released

Post by jabbson »

jabbson wrote: Also I'm having troubles with FlowTools, no data is being written to the ft* files
nevermind, the problem with empty netflow flowview files, it was all about iptables,
for those who are looking for the fix:

append

Code: Select all

-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport XXXX -j ACCEPT
where XXXX is that custom port that is being used for netflow data
to the /etc/sysconfig/iptables (right before the jump to REJECT)

Still having problem with opening webmin in the frame thou)
jabbson
Posts: 5
Joined: Tue Mar 04, 2014 12:05 pm

Re: CactiEZ 0.7 Released

Post by jabbson »

jabbson wrote:Still having problem with opening webmin in the frame thou)
ok now, this problem is gone too after I updated webmin again to the version 1.680

But, as webmin is working now, i started crawling and exploring, and i found that root is getting mail from cron every day as follows:

===============================================================================================
Mail headers

From root@localhost.localdomain (Cron Daemon)
To root@localhost.localdomain
Date 21/03/2014 01:00
Subject Cron <root@localhost> nice -n 15 /var/www/backup.sh

Message contents

mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password:NO) when trying to connect
mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password:NO) when trying to connect
===============================================================================================

seeing messages like this make me a sad panda, so i started to dig and found that cron is trying to make a dump of cacti and syslog tables of the database:

Code: Select all

# Dump the MySQL Database
mysqldump -uroot --opt cacti> /var/www/html/cacti-backup.sql
mysqldump -uroot --opt syslog> /var/www/html/syslog.sql
Is there any reason why mysqldump is executed without any password?
Enjanced
Posts: 37
Joined: Mon Jul 14, 2014 1:51 pm
Location: Buenos Aires - Argentina

Re: CactiEZ 0.7 Released

Post by Enjanced »

@jabbson

EDIT: I just saw that this is a few months late :P

That is because there´s a minor flaw in the cactiEZ backup script. It's explained a few pages back, but I'm saving you the trip

1st you have to get the password from the sqlpassword file in /root (add this line BEFORE the dump part of the script)
# Get database password
DBPWD=`grep "root" ~/mysqlpass.txt | awk '{ print $3 }'`
2nd modify these lines for the dump to get the pwds
# Dump the MySQL Database
mysqldump -uroot -p${DBPWD} --opt cacti> /var/www/html/cacti-backup.sql
mysqldump -uroot -p${DBPWD} --opt syslog> /var/www/html/syslog.sql

and voila!

Code: Select all

Corporate Cacti
CactiEZ 0.7 (upgraded to 0.0.8h) - Spine 0.8.8h - RRDTool 1.4.7 - Apache 2.2.15 - Settings	0.71 - Maint 0.3	- Thold0.5	- Errorimage 0.2	 - Webmin 0.1
Watermark 0.2 - Monitor 1.3 - Realtime	0.5 - 	Nectar 0.35a - Fix64bit 0.4 - Autom8 0.36 - Quicktree 0.2

Code: Select all

Business Cacti
CactiEZ 0.7 - Spine 0.8.8b - RRDTool 1.3.8 - Apache 2.2.15 - Settings	0.71 - Maint 0.3	- Thold0.5	- Errorimage 0.2	 - Jqueryskin 0.1
Webmin 0.1 - Watermark 0.2 - Monitor 1.3 - Realtime	0.5 - 	Nectar 0.35a - Fix64bit 0.4 - Autom8 0.36 - Quicktree 0.2 - Syslog 1.22
Enjanced
Posts: 37
Joined: Mon Jul 14, 2014 1:51 pm
Location: Buenos Aires - Argentina

Re: CactiEZ 0.7 Released

Post by Enjanced »

Found something else about the automatic backup (perhaps a bug?). The Spine.conf file is not backed up, so If you recover to a new install the DB password will be different than the one you got from your first install. So I added the spine.conf path to the tar file.

So, with the mods done by other before and this last one, my backup.sh file (complete) is like this now
#/bin/bash

cd /var/www/

# Get database password
DBPWD=`grep "root" ~/mysqlpass.txt | awk '{ print $3 }'`

# Create the filename for the backup
eval `date "+day=%d; month=%m; year=%Y"`
INSTFIL="cacti-backup-$year-$month-$day.tar.gz"

# Dump the MySQL Database
mysqldump -uroot -p${DBPWD} --opt cacti> /var/www/html/cacti-backup.sql
mysqldump -uroot -p${DBPWD} --opt syslog> /var/www/html/syslog.sql

# Gzip the whole folder

tar -Pcpzf /var/www/backups/$INSTFIL /var/www/html/* /usr/local/spine/spine.conf

# Remove old backups
find /var/www/backups/* -mtime +5 -exec rm -fr {} \; > /dev/null 2>&1

# Remove old RRAs (usually means the datasource is deleted)
#find /var/www/html/rra/* -mtime +2 -exec rm -fr {} \; > /dev/null 2>&

# Remove the SQL Dump
rm -f /var/www/html/cacti-backup.sql
rm -f /var/www/html/syslog.sql
Note that the line for removing old RRAs is commented. This is because I use the "Structured RRA Path (/host_id/local_data_id.rrd)" and it would delete de folders as their dates are not updated along with the files.

Also, don't make the same mistake I did, and step into the "/" folder before untaring the backup for the files to go to the correct place.

Code: Select all

Corporate Cacti
CactiEZ 0.7 (upgraded to 0.0.8h) - Spine 0.8.8h - RRDTool 1.4.7 - Apache 2.2.15 - Settings	0.71 - Maint 0.3	- Thold0.5	- Errorimage 0.2	 - Webmin 0.1
Watermark 0.2 - Monitor 1.3 - Realtime	0.5 - 	Nectar 0.35a - Fix64bit 0.4 - Autom8 0.36 - Quicktree 0.2

Code: Select all

Business Cacti
CactiEZ 0.7 - Spine 0.8.8b - RRDTool 1.3.8 - Apache 2.2.15 - Settings	0.71 - Maint 0.3	- Thold0.5	- Errorimage 0.2	 - Jqueryskin 0.1
Webmin 0.1 - Watermark 0.2 - Monitor 1.3 - Realtime	0.5 - 	Nectar 0.35a - Fix64bit 0.4 - Autom8 0.36 - Quicktree 0.2 - Syslog 1.22
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests