Open GoogleCodeExporter opened 8 years ago
also, what data is written to the cacti database if you start server_perf with
the -m
switch?
Original comment by ben.pric...@gmail.com
on 11 Jan 2009 at 1:41
perf2rrd put the perfdata in :
- rrdfile
- mysql (if -m option) for use with sql query, he use id for host and service
from
oreon/centreon database configuration. So, You need to use centreon to
configure nagios.
When I stop and restart I use always the same option :
./server_perf.pl -du
and I dont see why you have to reinitiliaze cacti configuration... :/
Original comment by olivier....@gmail.com
on 11 Jan 2009 at 9:20
I know what is happening now :)
example perf data
load5=2;80;90;0;100
It looks like the first time n2rrd loads, it only processes the first part of
the
performance data (2). When you shut it down and start back up it processes
(80). shut
down, start again "90" etc, etc. this causes the graphs not to be displayed. I
needed
to delete all data templates, graph templates, rrd's and devices to get working
again.
This is not a big issue. Just means I need to write a perl script to strip the
data
so just the load5=2 remains. I have done this, but it doesn't seem to be
working.
This is quite hard to troubleshoot as the logging for n2rrd won't work!
Do you have a sample script that would achieve this? I have tried the function
below
with no luck.
/etc/n2rrd/templates/code/myfile.pl (This matches up fine to my template name)
# file contents
my $tmp_pdata = substr($tmp_pdata,0,-12);
return $tmp_pdata;
Original comment by ben.pric...@gmail.com
on 11 Jan 2009 at 10:54
when you nagios script use the official perfdata output :
datasource=value;warn;crit;min;max
like you're example :
load5=2;80;90;0;100
nagios2cacti traduct like this :
load5=2
load5_warn=80
load5_crit=90
load5_min=0
load5_max=100
so if you want to display all this data, you must define in you're RRA file
(/etc/n2rrd/template/rra), 5 datasources :
load5, load5_min, load5_max, load5_warn, load5_max
Original comment by olivier....@gmail.com
on 11 Jan 2009 at 11:17
thanks for that. Whats the easiest way to exclude the warn, crit, min and max
from
the data?
Original comment by ben.pric...@gmail.com
on 13 Jan 2009 at 1:16
The safe way :
in cacti, edit graph_template
remove three line of gprint foreach datasource to exclude
edit the main line, choose LINE or AREA and apply a CDEF function like that :
custom string : 0
Special Data Source: CURRENT_DATA_SOURCE
Operator: *
So, you're graph'll be clean when displayed
for you're custom check command, use the simply notation : load5=2 without the
warn,crit,min,max value, they'll be correctly manage.
Original comment by olivier....@gmail.com
on 13 Jan 2009 at 6:46
Original issue reported on code.google.com by
ben.pric...@gmail.com
on 11 Jan 2009 at 1:39