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 ?)

1 Answer 1

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.

3
  • my script output 4 room tempratures as follows 20 23 24 25 so you are saying that in order to plot all four values, my script should output like this? 20 20 UPTIME HOSTNAME and so on for all four values ? Dec 12, 2016 at 7:09
  • No. The output should be 20 23 24 25 uptime hostname. Dec 12, 2016 at 7:12
  • I am still unable to plot more then 2 values in single mrtg graph. any tip ? Jan 3, 2017 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.