I create a template to display how many named process I got.
so here is the cacti/scripts:
Code: Select all
#!/usr/bin/env perl
delete @ENV{qw(PATH)};
$ENV{PATH} = '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin';
open(PROCESS, "ps ax | grep -v grep | grep -c $ARGV[0] |");
$output = <PROCESS>;
close(PROCESS);
chomp($output);
print $output;
Then I have source template who look like that: Has for the graphe template it's looke like that:
But when I look a graph how i expecting to look like: And the latest graph I add it's not correct: Title and scale: And displaying the Graph debug mode doesn't show any difference, excpect for the title, it's look like that:
Code: Select all
/bin/rrdtool graph - \
--imgformat=PNG \
--start='-86400' \
--end='-60' \
--pango-markup \
--title='Local Linux Machine - pool_mac.php - Process' \
--vertical-label='processes' \
--slope-mode \
--base=1000 \
--height=200 \
--width=700 \
--tabwidth '40' \
--alt-autoscale-max \
--lower-limit='0' \
COMMENT:"From 01/10/2023 11\:14\:21 To 02/10/2023 11\:13\:21\c" \
COMMENT:" \n" \
--color BACK#F3F3F3 \
--color CANVAS#FDFDFD \
--color SHADEA#CBCBCB \
--color SHADEB#999999 \
--color FONT#000000 \
--color AXIS#2C4D43 \
--color ARROW#2C4D43 \
--color FRAME#2C4D43 \
--border 1 \
--font TITLE:11:'Arial' \
--font AXIS:8:'Arial' \
--font LEGEND:8:'Courier' \
--font UNIT:8:'Arial' \
--font WATERMARK:6:'Arial' \
--slope-mode \
--watermark 'Generated by Cacti®' \
DEF:a='/usr/share/cacti/rra/local_linux_machine_process_25614.rrd':'process':MAX \
DEF:b='/usr/share/cacti/rra/local_linux_machine_process_25614.rrd':'process':LAST \
LINE1:a#F70D1AFF: \
AREA:b#00A0C1B2:'pool_mac.php' \
GPRINT:b:MIN:'Minimum\:%8.0lf' \
GPRINT:b:AVERAGE:'Average\:%8.0lf' \
GPRINT:b:MAX:'Maximum\:%8.0lf\n'
What I'm doing wrong ?
thanks for your input