View Full Version : 48 Hour Graphs not working
nelsonab
09-10-2006, 01:01
It seems that every time I attempt to get a 48 hour graph I get empty graphs. Currently we're running 1.1.
This happens with both individual and screen views. To reproduce I first select a 24 hour graph, then increase it by 24 hours.
Is anyone else seeing this same behavior?
peter_field
09-10-2006, 01:16
Yes, I can reproduce this. Running 1.1.2.
Display a graph over 24 hours, add 24 hours, and all I get is a little sample of data on the left of the graph, and I cant move left or right.
If I change to week, month, or year I have data.
I can also change to week view and decrease by 24 hours at a time, which works right down to 3 days, but when it goes to 2 days, same problem.
Also interesting is when I move left or right in 2 day view, the working time moves, but the small sample of data on the left of the graph doesn't move or change.
Try to open your php.ini and double memory settings.
I have memory_limit = 16M and it works, it didnt work with 8M.
You probably will have to reload your apache after that.
peter_field
10-10-2006, 00:42
I set the memory_limit to 16M and restarted and still it doesn't work. It does works for 1 day, and for 3 days, but not 2 days. Seems weird.
I have the same problem here, no 48h graph
I tried to set memory_limit to 16M, same behavior
but in my phpinfo, i found in the configure command '--disable-memory-limit'
so i'm not sure this will fix anything for me
I have the exact same problem using version 1.1.2. My memory limit is also set to 16M, and it seems to make no difference. And stops working at 2d, but seems to start working again between 2.5 and 3 days. Anyone have any insight?
muthukrishan
11-10-2006, 01:12
Iam using version 1.1.2 and the graphs are not showing for 1Hr average, but it is able to show for 2 Hrs, etc.
Muthu
I'm having the same problem. Have a look at the my last post in my thread to see if you've got a similar setup:
http://www.zabbix.com/forum/showthread.php?t=3919
after some tests, it start screwing at 25h, and it go well after 3d2h for me
peter_field
11-10-2006, 10:41
Heres a sample of one of my configs:
PIII 700Mhz 512MB
Debian 3.1
# cat /etc/php4/apache2/php.ini | grep memory_limit
memory_limit = 32M ; Maximum amount of memory a script may consume (8MB)# apt-show-versions | grep apache2
apache2-mpm-prefork/stable upgradeable from 2.0.54-5 to 2.0.54-5sarge1
apache2/stable upgradeable from 2.0.54-5 to 2.0.54-5sarge1
apache2-common/stable upgradeable from 2.0.54-5 to 2.0.54-5sarge1
apache2-utils/stable upgradeable from 2.0.54-5 to 2.0.54-5sarge1
libapache2-mod-php4/stable uptodate 4:4.3.10-16# apt-show-versions | grep php
php4-gd/stable uptodate 4:4.3.10-16
php4-mysql/stable uptodate 4:4.3.10-16
php4-common/stable uptodate 4:4.3.10-16
php4/stable uptodate 4:4.3.10-16
libapache2-mod-php4/stable uptodate 4:4.3.10-16# apt-show-versions | grep mysql
php4-mysql/stable uptodate 4:4.3.10-16
libmysqlclient12-dev/stable uptodate 4.0.24-10sarge2
mysql-common/stable uptodate 4.0.24-10sarge2
mysql-server/stable uptodate 4.0.24-10sarge2
libdbd-mysql-perl/stable uptodate 2.9006-1
libmysqlclient12/stable uptodate 4.0.24-10sarge2
mysql-client/stable uptodate 4.0.24-10sarge2
I know this sounds stupid but make sure your using the correct libs/frontend with your version of zabbix.
I am still having this problem with 1.1.2 so i ended up downgrading back to 1.1.1 and that worked for the time being.
New versions of zabbix are able to be added and changed quite easily with the setup i've got here. Heres an idea (we're able to select between 1.1, 1.1.1 and 1.1.2):
All we need to do is do a service zabbix_server stop
then change the version variable to 1.1.2 and save the file.
and do a service zabbix_server start and hey presto!
Here's the /etc/rc.d/init.d/zabbix_server file:
#!/bin/bash
#
# chkconfig: 35 90 10
# description: Starts and stops Zabbix Server using chkconfig
# Tested on Fedora Core 2 - 5
# Should work on all Fedora Core versions
#
# @name: zabbix_server
# @author: Alexander Hagenah <hagenah@topconcepts.com>
# @created: 18.04.2006
#
# Source function library.
. /etc/init.d/functions
# Variables
# Edit these to match your system settings
# Zabbix-Directory
BASEDIR=/opt/zabbix
# version
VERSION=1.1.1
# Binary File
BINARY_NAME=zabbix_server-$VERSION
# Full Binary File Call
FULLPATH=$BASEDIR/bin/$BINARY_NAME
# PID file
PIDFILE=/var/run/$BINARY_NAME.pid
PHPDIR=$BASEDIR/www
# Establish args
ERROR=0
STOPPING=0
REPORT_RECIPIENTS="stutaki@nighthawkrad.net"
#
# No need to edit the things below
#
# application checking status
if [ -f $PIDFILE ] && [ -s $PIDFILE ]
then
PID=`cat $PIDFILE`
if [ "x$PID" != "x" ] && kill -0 $PID 2>/dev/null && [ $BINARY_NAME == `ps -e | grep $PID | awk '{print $4}'` ]
then
STATUS="$BINARY_NAME (pid `pidof $APP`) running.."
RUNNING=1
else
rm -f $PIDFILE
STATUS="$BINARY_NAME (pid file existed ($PID) and now removed) not running.."
RUNNING=0
fi
else
if [ `ps -e | grep $BINARY_NAME | head -1 | awk '{ print $1 }'` ]
then
STATUS="$BINARY_NAME (pid `pidof $APP`, but no pid file) running.."
else
STATUS="$BINARY_NAME (no pid file) not running"
fi
RUNNING=0
fi
# functions
start() {
if [ $RUNNING -eq 1 ]
then
echo "$0 $ARG: $BINARY_NAME (pid $PID) already running"
else
# use the currect libs for the correct version
rm -f $BASEDIR/lib
ln -s $BASEDIR/libs/$VERSION $BASEDIR/lib
# use the correct frontend for the correct version
rm -f $PHPDIR/zabbix_frontend
ln -s $PHPDIR/$VERSION $PHPDIR/zabbix_frontend
action $"Starting $BINARY_NAME: " $FULLPATH
touch /var/lock/subsys/$BINARY_NAME
fi
}
stop() {
echo -n $"Shutting down $BINARY_NAME: "
killproc zabbix_server
killproc $BINARY_NAME
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$BINARY_NAME
RUNNING=0
}
mailnotify() {
# Construct a basic message
SUBJECT="[`hostname`] has [re]started"
BODY=/tmp/zabbix_mailout.$$
echo -e "This email is sent when the zabbix server is sent a start command" >> $BODY
echo -e "\nw output:" >> $BODY
w >> $BODY
echo -e "\nlast output:" >> $BODY
last >> $BODY
# Send the notification
mail -s "$SUBJECT" $REPORT_RECIPIENTS < $BODY
# Clean up
rm -f $BODY
}
# logic
case "$1" in
start)
mailnotify
start
;;
stop)
stop
;;
status)
status $BINARY_NAME
;;
restart)
mailnotify
stop
start
;;
help|*)
echo $"Usage: $0 {start|stop|status|restart|help}"
cat <<EOF
start - start $BINARY_NAME
stop - stop $BINARY_NAME
status - show current status of $BINARY_NAME
restart - restart $BINARY_NAME if running by sending a SIGHUP or start if not running
help - this screen
EOF
exit 1
;;
esac
exit 0
all other zabbix related files are stored in /opt/zabbix
there is a new directory structure though:
/opt
/opt/zabbix
/opt/zabbix/bin
/opt/zabbix/libs
/opt/zabbix/libs/1.1
/opt/zabbix/libs/1.1.1
/opt/zabbix/libs/1.1.2
/opt/zabbix/www
/opt/zabbix/www/1.1
/opt/zabbix/www/1.1.1
/opt/zabbix/www/1.1.2
the above file creates soft links to the correct directory. and uses the correct zabbix executable in the bin folder. we have 3 executables there which is zabbix_server-1.1 zabbix_server-1.1.1 zabbix_server-1.1.2
so with a new release it's a whole lot easier to manage :)
I found a temporary fix. I modified the graph.inc.php under selectData function from if($this->period <= 24*3600) to if($this->period <= 71*3600). Could it be that the trends database is empty between 1d1h and 2d13h why the original settings in graph.inc.php do not work.
from http://www.zabbix.com/forum/showthread.php?t=4248
does anybody else tested this?
I set the memory_limit to 16M and restarted and still it doesn't work. It does works for 1 day, and for 3 days, but not 2 days. Seems weird.
Actually i noticed - if you select "Period" to +*h (any number of hours) then press "+24h" it breaks graph instantly no matter how many hours was set originally.
So it is broken for me too.
Zabbix 1.1.2, debian-testing standard package.
I found a temporary fix. I modified the graph.inc.php under selectData function from if($this->period <= 24*3600) to if($this->period <= 71*3600). Could it be that the trends database is empty between 1d1h and 2d13h why the original settings in graph.inc.php do not work.
after changing graph.inc.php, it work well (for me with 73*3600, i had no graph for 3d and 3d1h else)
zabbix 1.1.3, the problem still seems to be there.
graphs break in the interval 25h - 2d8h.
fix suggested indeed works (i had to set it to 56*3600), but, of course, periods after 2d generate quite slowly.
as already suggested, it seems periods between 25h - 2d8h. don't have trend data stored, but frontend believes they have.
the fix probably either has to increase this value in the fronted, as done here, or (probably the correct solution) fix trend data not getting stored.
it would be nice to receive an upstream fix, as it is pretty trivial for the fronted and probably only slightly more difficult for trend storing :)
edit: oh well, here's the simplest patch ever, for 1.1.3 (it seems missing periods change over versions...)
as usual, -p 1 from the frontend index directory itself.
Hi,
i get this problem with oracle for all graph.
My fix is:
in include/classes/graph.inc.php, and line 926, 933 and 943, i replace the 'i' with the commented instruction.
But i don't understand why the alias 'i' is not valid.
see attached file.
Thanks