[mrtg] Why only ds0 and ds1?

Tuc at T-B-O-H.NET ml at t-b-o-h.net
Tue May 22 02:08:21 CEST 2007


> 
> Tuc saith:
> > 	I wrote my own program to fetch some information from a
> > source. I've always told the program to write out :
> > 
> > DATA ITEM 1
> > DATA ITEM 1
> > 0
> > 0
> > time() (Perl function)
> > hostmon-data (Not sure why, but <SHRUG>)
> 
> This is wrong, but will probably work.  The correct format is:
> 
> Number1
> Number2
> Uptime string (can be blank)
> Description string (can be blank)
>
>
> The first two are placed into the database.  The next two may be used to
> generate web pages, if you are using native .log files and not .rrd.
>
	Yea???? DOH! I was going by a script we created for a company I had a
while back, and just kept copying it everywhere. As we usually only wanted to
graph the one data value, we just duplicated it in both the first and second
slots, then I figured there were 2 other values we never used, a timestamp
and source. There are only 4 lines it needs, and not six? WHOOPS, shame on me.
But I guess since as you say they were uptime/description, and could be blank,
and we wrote all our own programs to do the display from RRD of the graphs, we
never broke anything. :) 
> 
> > 	Now I want to get crazy and do 3 items. I now write :
> > 
> > DATA ITEM 1
> > DATA ITEM 2
> > DATA ITEM 3
> > DATA ITEM 4
> > time() (Perl function)
> > hostmon-data
> 
> This is wrong. 
>
> > 	When I look at the resultant file, I only am told I have
> > access to ds0 (DATA ITEM 1) and ds1 (DATA ITEM 2).
> 
> Exactly.  MRTG stores data for TWO and ONLY TWO items of data.  If you
> only want one then you can suppress one (using the noo and noi options)
> but it still requires two items, and stores two items, as ds0 and ds1.
> 
> > 	What do I need to do to tell it I want the rest?
> 
> You will need to create a new, separate Target which holds items 3 and
> 4.  
> 
> If all you are interested in is the sum of the items, you can define a
> target that adds together multiple datasources.
> 
> If you use routers2 as your frontend, you can then suppress the two
> Targets in the menu, and define a UserDefined graph to show ds0&ds1 from
> Target1 and ds0&ds1 from Target2 all on the same graph.  See the
> routers2 documentation and demo pages for more information.
> 
	Thanks for all the suggestions Steve. Actually, we do alot of 
summing in targets, calculations for temperature, etc. To be honest, I
was doing pinging. It was to be :

Number of pings out of 10
Min ms RTT
Avg ms RTT
Max ms RTT

	as parsed out of :

1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 19.051/19.051/19.051/0.000 ms

	I needed to create 2 different graphs, one with JUST the
amount of pings out of 10, and the other I was going to do 3
lines of the RTT's. I was trying to put them into the same RRD 
file (Or atleast attempted to, silly me!) so that I only "polled"
the target (A perl script) once and got the 2 sets of data I needed.

	I guess this just means I start to learn how to use 
Smokeping! :)  I originally discounted it because of "information
overload" for the person planning on seeing the data. My only
other possibility is just write my own collector program, but
at this point if Tobias went through the trouble of writing
SmokePing, the least I can do is use it. ;) 

	Thanks for the reply and information!

				Tuc



More information about the mrtg mailing list