So you've designed your map, picked out all your data sources from Cacti, and now you find that everything shows as zero. You know that you should always look in the logs, and you see this error:
WEATHERMAP: Poller[0] RRD ReadData: Neither of your DS names (traffic_in & traffic_out) were found, even though there was a valid data line. Maybe they are wrong?
or
WEATHERMAP: Poller[0] WARNING: [Map 1] my-map.conf: RRD ReadData: At least one of your DS names (traffic_in and traffic_out) were not found, even though there was a valid data line. Maybe they are wrong? Valid DS names in this file are: ds0, ds1, [WMRRD06]
What on earth does that mean?
What is a DS?
RRDtool can store multiple "channels" of information in the same file. Each one is called a Data Source, or DS, and has a name.
Why would it be "wrong"?
There are no real standard names for these DSes, but for Cacti, the default Interface Traffic data query produces RRD files with two DSes named traffic_in and traffic_out. Since most Weathermaps are for bandwidth, I use those as the default DS names. If you don't name them yourself, weathermap assumes you mean traffic_in and traffic_out.
For an RRD file produced by MRTG, the DS names are simply ds0 and ds1.
How do I find out the RIGHT names?
If you have a more recent version of Weathermap, you will have gotten the second error message above, which tells you the valid names for that rrd file, otherwise you can ask Cacti. Here's how:
In Cacti, choose the Data Sources section.What do I DO with these names now I have them?
If you change the TARGET lines in your map config file, you can specify the DS names:
TARGET myrrdfile.rrd:inputds:outputds
Now Weathermap will look for those DS names instead of traffic_in and traffic_out. Problem solved!
Now the values are too BIG!
This is probably caused by another Weathermap assumption.
The normal SNMP interface traffic counters actually count bytes, not bits. To make this into bits, Weathermap normally multiplies all the values read from RRD files by 8. This is usually correct.
If your device has custom MIBs for traffic, they might already be in bits/sec. You can tell weathermap not to multiply by 8 by changing the TARGET line again:
TARGET gauge:myrrdfile.rrd:inputds:outputds
The 'gauge:' prefix stops weathermap from multiplying the value by 8 for you.
Advanced Bit At The End
This is just to explain what is really happening. You don't need this part.
It's not really Weathermap that reads the TARGET string, but the RRD data source plugin that comes with it. Weathermap itself doesn't understand any external data sources. The 'gauge:' prefix only works for RRD sources (not text files or any of the other possibilities) because it's handled by that plugin too. Then again, the RRD plugin is the only one that has the multiplication by default, so there isn't a need for it anywhere else.
You might also wonder why the editor doesn't figure out that the DS names are different, and change them for you. However, there can be any number of DS in an RRD (near enough), and it can't know which one is the right one for your 'in' and 'out' value by magic. It needs a clue from a real person.