0

I have some basic level of mrtg / rrdtool knowledge & currently using mrtg-rrd.cgi/rrdtool to graph various values.

I have a temperature script that output four different room temperatures

20
23
25
30

I want to plot them in single graph. Can some1 please advise how can i display four values in in single graph?

Currently I have following cfg but its showing only 2 lines

### MONITORING KARACHI Temperature vs our DATA Center ###
Target[KARACHI_CITY_vs_NOC_tempr]: `/temp/weather.sh`
Title[KARACHI_CITY_vs_NOC_tempr]: Temperature Monitoring of Data Center vs Karachi City
PageTop[KARACHI_CITY_vs_NOC_tempr]: <h1>Temperature Monitoring of Data Center vs Karachi City by zaib</h1>
Options[KARACHI_CITY_vs_NOC_tempr]: gauge, growright, nopercent
MaxBytes[KARACHI_CITY_vs_NOC_tempr]: 10000
Colours[KARACHI_CITY_vs_NOC_tempr]: RED#ff4f27,BLUE#2952f4,RED#ff4f27,BLUE#2952f4
#Unscaled[KARACHI_CITY_vs_NOC_tempr]: dwmy
YLegend[KARACHI_CITY_vs_NOC_tempr]: Temprature
ShortLegend[KARACHI_CITY_vs_NOC_tempr]: c
LegendI[KARACHI_CITY_vs_NOC_tempr]: A
LegendO[KARACHI_CITY_vs_NOC_tempr]: B
Legend1[KARACHI_CITY_vs_NOC_tempr]: C
Legend2[KARACHI_CITY_vs_NOC_tempr]: D

(Any way to do this without Routers2 frontend ?)

Syed Jahanzaib
  • 169
  • 2
  • 11

1 Answers1

0

From mrtg documentation:

External Monitoring Scripts

If you want to monitor something which does not provide data via snmp you can use some external program to do the data gathering.

The external command must return 4 lines of output:

Line 1

current state of the first variable, normally 'incoming bytes count'

Line 2

current state of the second variable, normally 'outgoing bytes count'

Line 3

string (in any human readable format), telling the uptime of the target.

Line 4

string, telling the name of the target.

You need to add two lines at the end of output of your script with time and name.

Mikhail Khirgiy
  • 2,003
  • 9
  • 7