How do I Color a Link differently when a DS Name is not found?

Hey,
I need to color a Link differently when a DS Name is not found in a RRD File.

Currently as far as I understood it from looking at the code, the output of the RRD File just leads to 0 which creates a Grey link. But if I have a RRD File with 0 as a Value for a DS Name, this link also gets colored gray. So my goal is to color a Link for example pink, if there are no valid DS Names.

How could I accomplish this?

I though of creating some variable after here:
// report DS name error
$names = join(",", $heads);
$names = str_replace(“timestamp,”, “”, $names);
MapUtility::warn(“RRD ReadData: At least one of your DS names (” . $dsnames[IN] . " and " . $dsnames[OUT] . “) were not found, even though there was a valid data line. Maybe they are wrong? Valid DS names in this file are: $names [WMRRD06]\n”);

An then later check if that variable is defined or if it’s value equals TRUE and set the according link to a specific color.

Thx for helping out or even providing basic Ideas.

Just tell me if you need any more Information.

I use network-weathermap 0.98a standalone. The purpose is, that i use a custom rrdtool wrapper to read RRD-Files which are not stored on the File-system and thus the only way to find out if a RRD-File is not found, is when a DS Name is not found.

At one point, I thought I made it so that “none” was a separate concept for the data collection, but I can’t remember if it made it to a released version… I’ll dig around.

Nice, thx :slight_smile: