Score:0

Multiple MRTG targets in one

us flag

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
Score:1
ad flag

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`
...
Score:0
in flag

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

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.