View Full Version : [SOLVED] How to get the graphs working
dobebo
10th August 2005, 11:23
Hi everybody,
I am new to Oreon and Nagios. Everything works fine, except to one thing. I can't get no graphs on the Interface and the Howto gives no Information about this thing. Maybe some of you know how to get this stuff working.
I would be very glad about any help
Thanks
dobebo
wistof
10th August 2005, 12:07
Welcome dobedo,
You need rrdtool (1.2 will support in RC3 ) install.
You must specify path for rrd generation and validate right on this. (default /usr/local/oreon/rrd/). Nagios must be enable to write in, and apache to read in.
You must use 'check_graph_*' plugins.
Verify check_command syntax :
$USER1$/check_graph_traffic.pl -H $HOSTADDRESS$ -i $ARG1$ -w $ARG2$ -c $ARG3$ -C $ARG4$ -v $ARG5$ -g -S $ARG6$
You don't need to specify last argument ($ARG6$) in 'check_command_argument' :
!3!75!90!public!1
You can try to execute plugin in nutshell with nagios user
you can find some modified plugins with debug information here (http://wistof.free.fr) (in french only, sorry :( )
dobebo
10th August 2005, 14:31
Thank you for your help wistof
I forget to mention
that my problem is not the configuration, my problem is actually that oreon shows me broken images, every time I want to see the graphs.
I am using the default rrd directory (under /usr/local/oreon/rrd/),
there are files like 7.rrd but no gif or png that can be displayed.
Where do I find them or how do I create them ?
The rights for nagios and www-data are correct.
Thanks
dobebo
wistof
10th August 2005, 14:46
that's is your rrdtool version ?
check your apache log too....
dobebo
10th August 2005, 14:52
rrdtool Version: 1.0.49-1
Apache error.log says
ERROR: invalid color def format
ERROR: invalid color def format
ERROR: invalid color def format
ERROR: invalid color def format
ERROR: invalid color def format
ERROR: invalid color def format
ERROR: invalid color def format
[Wed Aug 10 14:12:27 2005] [error] [client 10.0.x.xxx File does not exist: /usr/local/oreon/include/trafficMap/png/trafficMap1.png, referer: http://xxxxx/oreon/oreon.php?p=313&tm=1&o=w
wistof
10th August 2005, 15:18
could you edit setting for graph (with tool img) and validate color
dobebo
10th August 2005, 15:20
how can I do this ?
I already edited the color settings under Basic Configuration and Data Source.
Is there another tool to do so ?
wistof
10th August 2005, 15:29
I already edited the color settings under Basic Configuration and Data Source.
did you respect hexa format ? 'FFFFFF'
you could try to debug rrdtool command by edit 'graph_image.php' and add :
function rrdtool_execute($command_line, $oreon) {
$command_line = str_replace(";", "", $command_line);
print $command_line . "
";
$fp = popen($oreon->optGen->get_rrd_pwd() . escape_command(" $command_line"), "r");
return fpassthru($fp);
}
dobebo
10th August 2005, 15:49
nothing changed
wistof
10th August 2005, 15:55
oh, sorry... right click on broken image, and 'view image' (on firefox)
graph - --interlaced --start=-86400 --vertical-label="label" --title="LastDay - www.google.fr" --imgformat=PNG --alt-autoscale-max --lower-limit=0 --width=500 --height=100 --color CANVAS#FFFFFF --color BACK#FEFEFE --color FONT#000000 --color MGRID#800000 --color GRID#808080 --color FRAME#000000 --color ARROW#FFFFFF --color SHADEA#C0C0C0 --color SHADEB#909090 DEF:a=/var/www/oreon/rrd/34.rrd:a:AVERAGE DEF:m=/var/www/oreon/rrd/34.rrd:a:MAX COMMENT:" From 2005/08/08 23\:16 To 2005/08/09 23\:16\c" LINE2:a#ff0000:"DataSource1" CDEF:flaming1=a,40,*,100,/ CDEF:flaming2=a,5,*,100,/
‰PNG
dobebo
10th August 2005, 15:56
mine shows
graph - --interlaced --start=-86400 --vertical-label=label --title=LastDay" "ping_graph --imgformat=GIF --alt-autoscale-max --lower-limit=0 --interlace --width=100 --height=100 --color CANVAS#FFFFFF --color BACK#white --color FONT#000000 --color MGRID#800000 --color GRID#808080 --color FRAME#000000 --color ARROW#FFFFFF --color SHADEA#C0C0C0 --color SHADEB#909090 DEF:a=/usr/local/oreon/rrd/7.rrd:a:AVERAGE DEF:m=/usr/local/oreon/rrd/7.rrd:a:MAX COMMENT:" From 09/08/05 03:07 to 10/08/05 03:07\c" CDEF:flaming1=a,40,*,100,/ CDEF:flaming2=a,5,*,100,/ AREA:flaming1#ffff5f:Monitor STACK:flaming2#fffc51 STACK:flaming2#fffc51 STACK:flaming2#fff046 STACK:flaming2#ffe95f STACK:flaming2#ffd237 STACK:flaming2#ffc832 STACK:flaming2#ffbe2d STACK:flaming2#ffaa23 STACK:flaming2#ff9619 STACK:flaming2#ff841e STACK:flaming2#ff841e STACK:flaming2#ff6600 GPRINT:a:LAST:"Current\:%8.2lf%s" GPRINT:a:MIN:"Min\:%8.2lf%s" GPRINT:a:AVERAGE:"Average\:%8.2lf%s" GPRINT:a:MAX:"Max\:%8.2lf%s\l"
0
wistof
10th August 2005, 16:15
mine shows
graph - --interlaced --start=-86400 --vertical-label=label --title=LastDay" "ping_graph --imgformat=GIF --alt-autoscale-max --lower-limit=0 --interlace --width=100 --height=100 --color CANVAS#FFFFFF --color BACK#white --color FONT#000000 --color MGRID#800000 --color GRID#808080 --color FRAME#000000 --color ARROW#FFFFFF --color SHADEA#C0C0C0 --color SHADEB#909090 DEF:a=/usr/local/oreon/rrd/7.rrd:a:AVERAGE DEF:m=/usr/local/oreon/rrd/7.rrd:a:MAX COMMENT:" From 09/08/05 03:07 to 10/08/05 03:07\c" CDEF:flaming1=a,40,*,100,/ CDEF:flaming2=a,5,*,100,/ AREA:flaming1#ffff5f:Monitor STACK:flaming2#fffc51 STACK:flaming2#fffc51 STACK:flaming2#fff046 STACK:flaming2#ffe95f STACK:flaming2#ffd237 STACK:flaming2#ffc832 STACK:flaming2#ffbe2d STACK:flaming2#ffaa23 STACK:flaming2#ff9619 STACK:flaming2#ff841e STACK:flaming2#ff841e STACK:flaming2#ff6600 GPRINT:a:LAST:"Current\:%8.2lf%s" GPRINT:a:MIN:"Min\:%8.2lf%s" GPRINT:a:AVERAGE:"Average\:%8.2lf%s" GPRINT:a:MAX:"Max\:%8.2lf%s\l"
0
a rapid check... i'm not rrdtool expert :(
wistof
10th August 2005, 16:23
try to run in nutshell
rrdtool - graph - --interlaced --start=-86400 --vertical-label=label --title=LastDay" "ping_graph --imgformat=GIF --alt-autoscale-max --lower-limit=0 --interlace --width=100 --height=100 --color CANVAS#FFFFFF --color BACK#ffffff --color FONT#000000 --color MGRID#800000 --color GRID#808080 --color FRAME#000000 --color ARROW#FFFFFF --color SHADEA#C0C0C0 --color SHADEB#909090 DEF:a=/usr/local/oreon/rrd/7.rrd:a:AVERAGE DEF:m=/usr/local/oreon/rrd/7.rrd:a:MAX COMMENT:" From 09/08/05 03:07 to 10/08/05 03:07\c" CDEF:flaming1=a,40,*,100,/ CDEF:flaming2=a,5,*,100,/ AREA:flaming1#ffff5f:Monitor STACK:flaming2#fffc51 STACK:flaming2#fffc51 STACK:flaming2#fff046 STACK:flaming2#ffe95f STACK:flaming2#ffd237 STACK:flaming2#ffc832 STACK:flaming2#ffbe2d STACK:flaming2#ffaa23 STACK:flaming2#ff9619 STACK:flaming2#ff841e STACK:flaming2#ff841e STACK:flaming2#ff6600 GPRINT:a:LAST:"Current\:%8.2lf%s" GPRINT:a:MIN:"Min\:%8.2lf%s" GPRINT:a:AVERAGE:"Average\:%8.2lf%s" GPRINT:a:MAX:"Max\:%8.2lf%s\l" > test.png
dobebo
10th August 2005, 16:24
I changed the
--color BACK#white
to #FFFFFF
nothing happens. There is still this broken Image shit and if I try to open the Traffic Map I get a
The requested URL /oreon/include/trafficMap/png/trafficMap1.png was not found on this server.
I have no idea how I get this shit to work
The Plugin works fine (so says Nagios)
but there is no gif or png file generated. Are there any libraries needed or some configurations checked ?
I am no rrdtool expert also :)
wistof
10th August 2005, 16:28
I changed the
--color BACK#white
to #FFFFFF
nothing happens.
in command line ?
There is still this broken Image shit and if I try to open the Traffic Map I get a
The requested URL /oreon/include/trafficMap/png/trafficMap1.png was not found on this server.
I have no idea how I get this shit to work
The Plugin works fine (so says Nagios)
but there is no gif or png file generated. Are there any libraries needed or some configurations checked ?
I am no rrdtool expert also :)
trafficmap is a other thing, it's a other problem :D
dobebo
10th August 2005, 16:29
no, not on the command line. In the config for the graph
wistof
10th August 2005, 16:32
if you don't disable 'print' line in 'graph_image.php', you will contine to have broken img
dobebo
10th August 2005, 16:34
IT WORKS !!!
I deleted the print line and it works !!!
wistof
10th August 2005, 16:39
great !!!