0

What I have is 2 scripts to get values I'm trying to incorporate them into 1 graph

I can successfully have them in 1 graph by totalling them, as below, but I'm trying to have them separate, like the first value & second value:community, where the first is akin to input and second output (according to manual) but this wont work, anyone ever done something like this before?

(and before you ask, as no doubt someone will chime in with " just use 2 graphs " - no, we are not looking to do that, that is how we see them now, but we want to combine them)

Target[mqueue]: `/usr/sbin/m/outq` + `/usr/sbin/m/inq`
Title[mqueue]: Messages In Mail Queue
PageTop[mqueue]: <H1>Messages In Mail Queue</H1>
Directory[mqueue]: mqueue
MaxBytes[mqueue]: 2000
AbsMax[mqueue]: 100000
YLegend[mqueue]: Messages
ShortLegend[mqueue]: &nbsp;Messages &nbsp; &nbsp;
Legend1[mqueue]: Average Messages
Legend2[mqueue]:
Legend3[mqueue]: Maximum Messages
Legend4[mqueue]:
LegendI[mqueue]:.
LegendO[mqueue]:.
Colours[mqueue]: Red#E41B17, Blue#7BAEFF, Black#000000, Gray#CCCCCC

2 Answers 2

1

You can write a small shell script that reads the two values and write them as IN and OUT.
Something like this:

#!/bin/sh
# mqueue.sh
in=`/usr/sbin/inq`
out=`/usr/sbin/m/outq`
uptime="..."
name="..."
echo $in
echo $out
echo $uptime
echo $name

The script is your new target:

Target[mqueue]: `/path/to/mqueue.sh`
...
0

So far as I know MRTG can graph two values ... typically an IN and then the OUT value. I am not sure if you can do more than two. This entry may be of help however it discussed using RRDTool for graphs rather than the original MRTG graph code. Plotting four values in single MRTG/RRD Graph

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .