Graphing temperature with Devmon issues
Trying to graph temperature, it's a single OID that is polled successfully, but graph data notes the changes and separate values instead of graphing the changes as a whole.
*Xymon 4.3.28 <http://xymon.sourceforge.net/> with Devmon * 0.3.1-beta1 (I am working on the newer Devmon version, but haven't gotten far enough with that version to implement yet).
For RRD data - I get multiple files for the host/test:
temperature.CPU:_44.rrd
temperature.CPU:_45.rrd
Snip from graphs.cfg (only thing I changed is the scale): [temperature] FNPATTERN ^temperature.(.+).rrd TITLE Temperature YAXIS Celsius *-u 100 <-- only change* DEF:p@RRDIDX@=@RRDFN@:temperature:AVERAGE LINE2:p@RRDIDX@#@COLOR@:@RRDPARAM@ GPRINT:p@RRDIDX@:LAST: \: %5.1lf (cur) GPRINT:p@RRDIDX@:MAX: \: %5.1lf (max) GPRINT:p@RRDIDX@:MIN: \: %5.1lf (min) GPRINT:p@RRDIDX@:AVERAGE: \: %5.1lf (avg)\n
What am I missing here?
[image: image.png]
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
Typo, *Xymon 4.3.30 <http://xymon.sourceforge.net/> *(but have the same issue in both versions)
On Sat, Jan 25, 2025 at 2:26 PM Ken Connell <kconnell@torontomu.ca> wrote:
Trying to graph temperature, it's a single OID that is polled successfully, but graph data notes the changes and separate values instead of graphing the changes as a whole.
*Xymon 4.3.28 <http://xymon.sourceforge.net/> with Devmon * 0.3.1-beta1 (I am working on the newer Devmon version, but haven't gotten far enough with that version to implement yet).
For RRD data - I get multiple files for the host/test:
temperature.CPU:_44.rrd
temperature.CPU:_45.rrd
Snip from graphs.cfg (only thing I changed is the scale): [temperature] FNPATTERN ^temperature.(.+).rrd TITLE Temperature YAXIS Celsius *-u 100 <-- only change* DEF:p@RRDIDX@=@RRDFN@:temperature:AVERAGE LINE2:p@RRDIDX@#@COLOR@:@RRDPARAM@ GPRINT:p@RRDIDX@:LAST: \: %5.1lf (cur) GPRINT:p@RRDIDX@:MAX: \: %5.1lf (max) GPRINT:p@RRDIDX@:MIN: \: %5.1lf (min) GPRINT:p@RRDIDX@:AVERAGE: \: %5.1lf (avg)\n
What am I missing here?
[image: image.png]
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
Hi Ken
Are you saying that it all worked without the "-u 100" but doesn't work with that?
As an aside, I'm not sure that it's logical to set the maximum to "100C", as a CPU has no reason to stay under 100C, or even to get close to 100C. Why not 90C? Or 85C? Why is 100C the number you chose? As an aesthetic decision that's yours to make, and certainly shouldn't break anything.
You're getting NaN for all data being graphed. Perhaps run "rrdtool fetch temperature.CPU:_44.rrd AVERAGE | tail" and see if you get valid data, or nothing but NaNs. If the latter then your source of data has a problem, not the graphing of it.
Also note that colons in graph (rrdgraph) parameters are problematic because it's used as a field separator by rrdgraph. The @RRDPARAM@ is expanded to (eg) "CPU:_44" which has a colon, and then the LINE2 specification has an extra colon, which might cause problems. But it's possibly fine. The fact that rrdgraph is showing colons in the graph legend suggests that it's not treating the colons as a field separator in this instance (perhaps xymon is escaping it) so you're probably fine.
Cheers Jeremy
On Sun, 26 Jan 2025 at 07:15, Ken Connell via Xymon <xymon@xymon.com> wrote:
Typo, *Xymon 4.3.30 <http://xymon.sourceforge.net/> *(but have the same issue in both versions)
On Sat, Jan 25, 2025 at 2:26 PM Ken Connell <kconnell@torontomu.ca> wrote:
Trying to graph temperature, it's a single OID that is polled successfully, but graph data notes the changes and separate values instead of graphing the changes as a whole.
*Xymon 4.3.28 <http://xymon.sourceforge.net/> with Devmon * 0.3.1-beta1 (I am working on the newer Devmon version, but haven't gotten far enough with that version to implement yet).
For RRD data - I get multiple files for the host/test:
temperature.CPU:_44.rrd
temperature.CPU:_45.rrd
Snip from graphs.cfg (only thing I changed is the scale): [temperature] FNPATTERN ^temperature.(.+).rrd TITLE Temperature YAXIS Celsius *-u 100 <-- only change* DEF:p@RRDIDX@=@RRDFN@:temperature:AVERAGE LINE2:p@RRDIDX@#@COLOR@:@RRDPARAM@ GPRINT:p@RRDIDX@:LAST: \: %5.1lf (cur) GPRINT:p@RRDIDX@:MAX: \: %5.1lf (max) GPRINT:p@RRDIDX@:MIN: \: %5.1lf (min) GPRINT:p@RRDIDX@:AVERAGE: \: %5.1lf (avg)\n
What am I missing here?
[image: image.png]
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
Xymon mailing list -- xymon@xymon.com To unsubscribe send an email to xymon-leave@xymon.com
Hi Jeremy, thank you for the help.
Re: Are you saying that it all worked without the "-u 100" but doesn't work with that?
no, I've never had temperature graphs work, building a new Xymon server so I thought now would be a good time to dig in more.
Changing the scale was just cosmetic and it didn't work with the change or defaults (rrd file issues, so it didn't matter).
Re: colons in graph (rrdgraph) parameters are problematic
This I did not know, haven't had much experience with troubleshooting rrd files, and yes, this was an issue.
I removed the colons from the message file, however, the affect was no more rrd file updates.
Looking @ https://xymon.com/help/howtograph.html, I changed:
In xymonserver.cfg, changed @TEST2RRD temperature to temperature=ncv <-- this now produces rrd file temperature.rrd as expected:
rrdtool fetch does now have some "good data" if seems: 1737962100: 4.5000000000e+01 1737962400: 4.5016666667e+01 1737962700: 4.6000000000e+01 1737963000: 4.6000000000e+01 1737963300: 4.6000000000e+01 1737963600: 4.6000000000e+01 1737963900: 4.5790000000e+01 1737964200: 4.5000000000e+01 1737964500: 4.5000000000e+01 1737964800: 4.5000000000e+01
However, there is no graph displayed, just get the search icon [image: image.png]
The temperature graph definition is in graphs.cfg by default and unchanged, also temperature is also @ "GRAPHS=" in xymonserver.cfg by default as well.
On Sat, Jan 25, 2025 at 8:44 PM Jeremy Laidman <jeremy@laidman.org> wrote:
Hi Ken
Are you saying that it all worked without the "-u 100" but doesn't work with that?
As an aside, I'm not sure that it's logical to set the maximum to "100C", as a CPU has no reason to stay under 100C, or even to get close to 100C. Why not 90C? Or 85C? Why is 100C the number you chose? As an aesthetic decision that's yours to make, and certainly shouldn't break anything.
You're getting NaN for all data being graphed. Perhaps run "rrdtool fetch temperature.CPU:_44.rrd AVERAGE | tail" and see if you get valid data, or nothing but NaNs. If the latter then your source of data has a problem, not the graphing of it.
Also note that colons in graph (rrdgraph) parameters are problematic because it's used as a field separator by rrdgraph. The @RRDPARAM@ is expanded to (eg) "CPU:_44" which has a colon, and then the LINE2 specification has an extra colon, which might cause problems. But it's possibly fine. The fact that rrdgraph is showing colons in the graph legend suggests that it's not treating the colons as a field separator in this instance (perhaps xymon is escaping it) so you're probably fine.
Cheers Jeremy
On Sun, 26 Jan 2025 at 07:15, Ken Connell via Xymon <xymon@xymon.com> wrote:
Typo, *Xymon 4.3.30 <http://xymon.sourceforge.net/> *(but have the same issue in both versions)
On Sat, Jan 25, 2025 at 2:26 PM Ken Connell <kconnell@torontomu.ca> wrote:
Trying to graph temperature, it's a single OID that is polled successfully, but graph data notes the changes and separate values instead of graphing the changes as a whole.
*Xymon 4.3.28 <http://xymon.sourceforge.net/> with Devmon * 0.3.1-beta1 (I am working on the newer Devmon version, but haven't gotten far enough with that version to implement yet).
For RRD data - I get multiple files for the host/test:
temperature.CPU:_44.rrd
temperature.CPU:_45.rrd
Snip from graphs.cfg (only thing I changed is the scale): [temperature] FNPATTERN ^temperature.(.+).rrd TITLE Temperature YAXIS Celsius *-u 100 <-- only change* DEF:p@RRDIDX@=@RRDFN@:temperature:AVERAGE LINE2:p@RRDIDX@#@COLOR@:@RRDPARAM@ GPRINT:p@RRDIDX@:LAST: \: %5.1lf (cur) GPRINT:p@RRDIDX@:MAX: \: %5.1lf (max) GPRINT:p@RRDIDX@:MIN: \: %5.1lf (min) GPRINT:p@RRDIDX@:AVERAGE: \: %5.1lf (avg)\n
What am I missing here?
[image: image.png]
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
Xymon mailing list -- xymon@xymon.com To unsubscribe send an email to xymon-leave@xymon.com
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
Ken
I'm not sure what's going on for you. My guess is that the RRD file has "Temperature" (uppercase) rather than "temperature" as the DS name, because that's what you have in your status page image. The graph.cfg definition you showed previously expects a lower-case version of "temperature".
I note that your status page shows "Devmon version ..." but you said you weren't able to get Devmon working for this. It's possible there is some interaction here. In fact, if Devmon is actually creating the status page, then it may be causing the RRD file to use the DS name of "ds0", which would make your graphs.cfg entry totally wrong. The devmon code includes a "devmon-graphs.cfg" file that uses d0s, ds1 and ds2, and it expects the RRD filename to be temp.<something>.rrd.
I would either get Devmon working, or comment out temp/temperature entries in your Devmon config to ensure it isn't interfering with anything else you're using instead.
Cheers Jeremy
On Tue, 28 Jan 2025 at 02:40, Ken Connell <kconnell@torontomu.ca> wrote:
Hi Jeremy, thank you for the help.
Re: Are you saying that it all worked without the "-u 100" but doesn't work with that?
no, I've never had temperature graphs work, building a new Xymon server so I thought now would be a good time to dig in more.
Changing the scale was just cosmetic and it didn't work with the change or defaults (rrd file issues, so it didn't matter).
Re: colons in graph (rrdgraph) parameters are problematic
This I did not know, haven't had much experience with troubleshooting rrd files, and yes, this was an issue.
I removed the colons from the message file, however, the affect was no more rrd file updates.
Looking @ https://xymon.com/help/howtograph.html, I changed:
In xymonserver.cfg, changed @TEST2RRD temperature to temperature=ncv <-- this now produces rrd file temperature.rrd as expected:
rrdtool fetch does now have some "good data" if seems: 1737962100: 4.5000000000e+01 1737962400: 4.5016666667e+01 1737962700: 4.6000000000e+01 1737963000: 4.6000000000e+01 1737963300: 4.6000000000e+01 1737963600: 4.6000000000e+01 1737963900: 4.5790000000e+01 1737964200: 4.5000000000e+01 1737964500: 4.5000000000e+01 1737964800: 4.5000000000e+01
However, there is no graph displayed, just get the search icon [image: image.png]
The temperature graph definition is in graphs.cfg by default and unchanged, also temperature is also @ "GRAPHS=" in xymonserver.cfg by default as well.
On Sat, Jan 25, 2025 at 8:44 PM Jeremy Laidman <jeremy@laidman.org> wrote:
Hi Ken
Are you saying that it all worked without the "-u 100" but doesn't work with that?
As an aside, I'm not sure that it's logical to set the maximum to "100C", as a CPU has no reason to stay under 100C, or even to get close to 100C. Why not 90C? Or 85C? Why is 100C the number you chose? As an aesthetic decision that's yours to make, and certainly shouldn't break anything.
You're getting NaN for all data being graphed. Perhaps run "rrdtool fetch temperature.CPU:_44.rrd AVERAGE | tail" and see if you get valid data, or nothing but NaNs. If the latter then your source of data has a problem, not the graphing of it.
Also note that colons in graph (rrdgraph) parameters are problematic because it's used as a field separator by rrdgraph. The @RRDPARAM@ is expanded to (eg) "CPU:_44" which has a colon, and then the LINE2 specification has an extra colon, which might cause problems. But it's possibly fine. The fact that rrdgraph is showing colons in the graph legend suggests that it's not treating the colons as a field separator in this instance (perhaps xymon is escaping it) so you're probably fine.
Cheers Jeremy
On Sun, 26 Jan 2025 at 07:15, Ken Connell via Xymon <xymon@xymon.com> wrote:
Typo, *Xymon 4.3.30 <http://xymon.sourceforge.net/> *(but have the same issue in both versions)
On Sat, Jan 25, 2025 at 2:26 PM Ken Connell <kconnell@torontomu.ca> wrote:
Trying to graph temperature, it's a single OID that is polled successfully, but graph data notes the changes and separate values instead of graphing the changes as a whole.
*Xymon 4.3.28 <http://xymon.sourceforge.net/> with Devmon * 0.3.1-beta1 (I am working on the newer Devmon version, but haven't gotten far enough with that version to implement yet).
For RRD data - I get multiple files for the host/test:
temperature.CPU:_44.rrd
temperature.CPU:_45.rrd
Snip from graphs.cfg (only thing I changed is the scale): [temperature] FNPATTERN ^temperature.(.+).rrd TITLE Temperature YAXIS Celsius *-u 100 <-- only change* DEF:p@RRDIDX@=@RRDFN@:temperature:AVERAGE LINE2:p@RRDIDX@#@COLOR@:@RRDPARAM@ GPRINT:p@RRDIDX@:LAST: \: %5.1lf (cur) GPRINT:p@RRDIDX@:MAX: \: %5.1lf (max) GPRINT:p@RRDIDX@:MIN: \: %5.1lf (min) GPRINT:p@RRDIDX@:AVERAGE: \: %5.1lf (avg)\n
What am I missing here?
[image: image.png]
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
Xymon mailing list -- xymon@xymon.com To unsubscribe send an email to xymon-leave@xymon.com
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
Jeremy,
Just to clarify, devmon is working (0.3.1-beta1 in the snip), it was just the "newer version" I did not implement yet. Maybe I should have left that tidbit out, but I thought it might come up as a question. Also to note, the "test column" is lower case, and the rrd file created is lowercase as well (but via temperature=ncv tag, otherwise I don't get the rrd file), it's just within the message file temperature was capitalized.
My assumption was, I could just copy my CPU test, change the OID and message, and be all good since cpu tests have just always graphed and temperature is as well noted in default configs to graph.
I did look into devmon-graphs.cfg, and see there is a definition for temp
[temp] FNPATTERN temp.(.*).rrd TITLE Temperature YAXIS Degrees Celsius DEF:in@RRDIDX@=@RRDFN@:ds0:AVERAGE DEF:out@RRDIDX@=@RRDFN@:ds1:AVERAGE LINE1:in@RRDIDX@#@COLOR@:@RRDPARAM@ Temperature GPRINT:in@RRDIDX@:LAST: %8.2lf %s (cur) GPRINT:in@RRDIDX@:MAX: %8.2lf %s (max) GPRINT:in@RRDIDX@:MIN: %8.2lf %s (min) GPRINT:in@RRDIDX@:AVERAGE: %8.2lf %s (avg)\n
I copied the temperature dir to temp within the devmon-host-template directory. Everything is lower case within the message files and column-test for both: [image: image.png]
No link for graphs, and no rrd file for test: temp Still search icon for graphs, for test: temperature
Losing my hair here quickly, thinking I might have to poll externally and feed data to the rrd via the "slab example" within help.
On Mon, Jan 27, 2025 at 5:58 PM Jeremy Laidman <jeremy@laidman.org> wrote:
Ken
I'm not sure what's going on for you. My guess is that the RRD file has "Temperature" (uppercase) rather than "temperature" as the DS name, because that's what you have in your status page image. The graph.cfg definition you showed previously expects a lower-case version of "temperature".
I note that your status page shows "Devmon version ..." but you said you weren't able to get Devmon working for this. It's possible there is some interaction here. In fact, if Devmon is actually creating the status page, then it may be causing the RRD file to use the DS name of "ds0", which would make your graphs.cfg entry totally wrong. The devmon code includes a "devmon-graphs.cfg" file that uses d0s, ds1 and ds2, and it expects the RRD filename to be temp.<something>.rrd.
I would either get Devmon working, or comment out temp/temperature entries in your Devmon config to ensure it isn't interfering with anything else you're using instead.
Cheers Jeremy
On Tue, 28 Jan 2025 at 02:40, Ken Connell <kconnell@torontomu.ca> wrote:
Hi Jeremy, thank you for the help.
Re: Are you saying that it all worked without the "-u 100" but doesn't work with that?
no, I've never had temperature graphs work, building a new Xymon server so I thought now would be a good time to dig in more.
Changing the scale was just cosmetic and it didn't work with the change or defaults (rrd file issues, so it didn't matter).
Re: colons in graph (rrdgraph) parameters are problematic
This I did not know, haven't had much experience with troubleshooting rrd files, and yes, this was an issue.
I removed the colons from the message file, however, the affect was no more rrd file updates.
Looking @ https://xymon.com/help/howtograph.html, I changed:
In xymonserver.cfg, changed @TEST2RRD temperature to temperature=ncv <-- this now produces rrd file temperature.rrd as expected:
rrdtool fetch does now have some "good data" if seems: 1737962100: 4.5000000000e+01 1737962400: 4.5016666667e+01 1737962700: 4.6000000000e+01 1737963000: 4.6000000000e+01 1737963300: 4.6000000000e+01 1737963600: 4.6000000000e+01 1737963900: 4.5790000000e+01 1737964200: 4.5000000000e+01 1737964500: 4.5000000000e+01 1737964800: 4.5000000000e+01
However, there is no graph displayed, just get the search icon [image: image.png]
The temperature graph definition is in graphs.cfg by default and unchanged, also temperature is also @ "GRAPHS=" in xymonserver.cfg by default as well.
On Sat, Jan 25, 2025 at 8:44 PM Jeremy Laidman <jeremy@laidman.org> wrote:
Hi Ken
Are you saying that it all worked without the "-u 100" but doesn't work with that?
As an aside, I'm not sure that it's logical to set the maximum to "100C", as a CPU has no reason to stay under 100C, or even to get close to 100C. Why not 90C? Or 85C? Why is 100C the number you chose? As an aesthetic decision that's yours to make, and certainly shouldn't break anything.
You're getting NaN for all data being graphed. Perhaps run "rrdtool fetch temperature.CPU:_44.rrd AVERAGE | tail" and see if you get valid data, or nothing but NaNs. If the latter then your source of data has a problem, not the graphing of it.
Also note that colons in graph (rrdgraph) parameters are problematic because it's used as a field separator by rrdgraph. The @RRDPARAM@ is expanded to (eg) "CPU:_44" which has a colon, and then the LINE2 specification has an extra colon, which might cause problems. But it's possibly fine. The fact that rrdgraph is showing colons in the graph legend suggests that it's not treating the colons as a field separator in this instance (perhaps xymon is escaping it) so you're probably fine.
Cheers Jeremy
On Sun, 26 Jan 2025 at 07:15, Ken Connell via Xymon <xymon@xymon.com> wrote:
Typo, *Xymon 4.3.30 <http://xymon.sourceforge.net/> *(but have the same issue in both versions)
On Sat, Jan 25, 2025 at 2:26 PM Ken Connell <kconnell@torontomu.ca> wrote:
Trying to graph temperature, it's a single OID that is polled successfully, but graph data notes the changes and separate values instead of graphing the changes as a whole.
*Xymon 4.3.28 <http://xymon.sourceforge.net/> with Devmon * 0.3.1-beta1 (I am working on the newer Devmon version, but haven't gotten far enough with that version to implement yet).
For RRD data - I get multiple files for the host/test:
temperature.CPU:_44.rrd
temperature.CPU:_45.rrd
Snip from graphs.cfg (only thing I changed is the scale): [temperature] FNPATTERN ^temperature.(.+).rrd TITLE Temperature YAXIS Celsius *-u 100 <-- only change* DEF:p@RRDIDX@=@RRDFN@:temperature:AVERAGE LINE2:p@RRDIDX@#@COLOR@:@RRDPARAM@ GPRINT:p@RRDIDX@:LAST: \: %5.1lf (cur) GPRINT:p@RRDIDX@:MAX: \: %5.1lf (max) GPRINT:p@RRDIDX@:MIN: \: %5.1lf (min) GPRINT:p@RRDIDX@:AVERAGE: \: %5.1lf (avg)\n
What am I missing here?
[image: image.png]
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
Xymon mailing list -- xymon@xymon.com To unsubscribe send an email to xymon-leave@xymon.com
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
Yeah, it's frustrating trying to diagnose graphing issues, because there's no error message from the RRD library to indicate what the problem could be.
I created a shell script that extracts all of the RRD parameters from Xymon, constructs an "rrdtool graph" command line, and executes it. If there's an error, this will let me see it.
Not sure if it's too long to show here (on the mailing lost), but I'll paste it and see if you get it:
#!/bin/sh
xymon-graph-tester tests an rrd graph
give me an RRD filename and a graph definition name and
try to make a graph
GRFILE=mktemp
die() { echo "$@">&2; rm -f "$GRFILE"; exit 1; }
get_param() { FN="$1" RE="$2" perl -e '$fn="tcp.http.https:,,sa.auth.thyra.telstra.com,secureauth33,.rrd"; $re="^tcp.http.(.+).rrd"; $fn =~ /$r/ && print "$1\n"' }
RRDDIR=$1 GRDEF=$2
xymon 127.1 'config graphs.cfg' > $GRFILE || die "Failed to dump graph definitions from xymon server"
[ "$GRDEF" ] || die "Specify RRD directory name and graph definition name" [ -d $RRDDIR ] || die "No such directory: $RRD" cd $RRDDIR && echo "Changing dir to $RRDDIR" || die "Unable to cd to directory $RRDDIR"
DEFLIST=sed -n '/^\['$GRDEF'\]/,/^\[/{/^\[/d;p}' "$GRFILE" | sed 's/^[ ]*//;/^#/d;/^\[/d'
[ 0$DEBUG -gt 0 ] && echo "DEFLIST: $DEFLIST"
rm -f "$GRFILE"
TITLE=echo "$DEFLIST" | sed -n '/^TITLE /s/^TITLE //p'
YAXIS=echo "$DEFLIST" | sed -n '/^YAXIS /s/^YAXIS //p'
FNPATTERN=echo "$DEFLIST" | sed -n '/^FNPATTERN /s/^FNPATTERN //p'
echo "FNPATTERN: $FNPATTERN"
DEFLIST=echo "$DEFLIST" | egrep -v "^(TITLE|YAXIS|FNPATTERN)"
DEFLIST=echo "$DEFLIST" | sed 's/^/"/g;s/$/"/g'
DEFLIST=echo $DEFLIST
if [ "$FNPATTERN" ]; then
FILES=ls *.rrd | egrep "$FNPATTERN"
echo "FILES: $FILES"
RRDIDX=1
COLOR="FFFFFF"
for FILE in $FILES; do
RRDPARAM=get_param "$FILE" "$FNPATTER"
RRDPARAM_ESC=echo "$RRDPARAM" | sed 's/:/\\\\\\\:/g'
echo "RRDPARAM=$RRDPARAM_ESC"
FILE_ESC=echo "$FILE" | sed 's/:/\\\\\\\:/g'
DEFLIST=echo "$DEFLIST" | sed 's/@RRDPARAM@ /'"${RRDPARAM_ESC}"'/g;s/@RRDFN@/'"${FILE_ESC}"'/g;s/@RRDIDX@ '"$RRDIDX"'/g;s/@COLOR@/'"$COLOR"'/g'
echo "----- $FILE"
echo "rrdtool graph /dev/null --title \"$TITLE\"
--vertical-label \"$YAXIS\" $DEFLIST" | sed 's/" /"\n /g
echo "-----"
echo "rrdtool graph /dev/null --title \"$TITLE\"
--vertical-label \"$YAXIS\" $DEFLIST" | sh
let RRDIDX=$RRDIDX+1
done
else
echo "-----"
echo "rrdtool graph /dev/null --title \"$TITLE\" --vertical-label
\"$YAXIS\" $DEFLIST"
echo "-----"
echo "rrdtool graph /dev/null --title \"$TITLE\" --vertical-label
\"$YAXIS\" $DEFLIST" | sh
fi
On Tue, 28 Jan 2025 at 13:13, Ken Connell <kconnell@torontomu.ca> wrote:
Jeremy,
Just to clarify, devmon is working (0.3.1-beta1 in the snip), it was just the "newer version" I did not implement yet. Maybe I should have left that tidbit out, but I thought it might come up as a question. Also to note, the "test column" is lower case, and the rrd file created is lowercase as well (but via temperature=ncv tag, otherwise I don't get the rrd file), it's just within the message file temperature was capitalized.
My assumption was, I could just copy my CPU test, change the OID and message, and be all good since cpu tests have just always graphed and temperature is as well noted in default configs to graph.
I did look into devmon-graphs.cfg, and see there is a definition for temp
[temp] FNPATTERN temp.(.*).rrd TITLE Temperature YAXIS Degrees Celsius DEF:in@RRDIDX@=@RRDFN@:ds0:AVERAGE DEF:out@RRDIDX@=@RRDFN@:ds1:AVERAGE LINE1:in@RRDIDX@#@COLOR@:@RRDPARAM@ Temperature GPRINT:in@RRDIDX@:LAST: %8.2lf %s (cur) GPRINT:in@RRDIDX@:MAX: %8.2lf %s (max) GPRINT:in@RRDIDX@:MIN: %8.2lf %s (min) GPRINT:in@RRDIDX@:AVERAGE: %8.2lf %s (avg)\n
I copied the temperature dir to temp within the devmon-host-template directory. Everything is lower case within the message files and column-test for both: [image: image.png]
No link for graphs, and no rrd file for test: temp Still search icon for graphs, for test: temperature
Losing my hair here quickly, thinking I might have to poll externally and feed data to the rrd via the "slab example" within help.
On Mon, Jan 27, 2025 at 5:58 PM Jeremy Laidman <jeremy@laidman.org> wrote:
Ken
I'm not sure what's going on for you. My guess is that the RRD file has "Temperature" (uppercase) rather than "temperature" as the DS name, because that's what you have in your status page image. The graph.cfg definition you showed previously expects a lower-case version of "temperature".
I note that your status page shows "Devmon version ..." but you said you weren't able to get Devmon working for this. It's possible there is some interaction here. In fact, if Devmon is actually creating the status page, then it may be causing the RRD file to use the DS name of "ds0", which would make your graphs.cfg entry totally wrong. The devmon code includes a "devmon-graphs.cfg" file that uses d0s, ds1 and ds2, and it expects the RRD filename to be temp.<something>.rrd.
I would either get Devmon working, or comment out temp/temperature entries in your Devmon config to ensure it isn't interfering with anything else you're using instead.
Cheers Jeremy
On Tue, 28 Jan 2025 at 02:40, Ken Connell <kconnell@torontomu.ca> wrote:
Hi Jeremy, thank you for the help.
Re: Are you saying that it all worked without the "-u 100" but doesn't work with that?
no, I've never had temperature graphs work, building a new Xymon server so I thought now would be a good time to dig in more.
Changing the scale was just cosmetic and it didn't work with the change or defaults (rrd file issues, so it didn't matter).
Re: colons in graph (rrdgraph) parameters are problematic
This I did not know, haven't had much experience with troubleshooting rrd files, and yes, this was an issue.
I removed the colons from the message file, however, the affect was no more rrd file updates.
Looking @ https://xymon.com/help/howtograph.html, I changed:
In xymonserver.cfg, changed @TEST2RRD temperature to temperature=ncv <-- this now produces rrd file temperature.rrd as expected:
rrdtool fetch does now have some "good data" if seems: 1737962100: 4.5000000000e+01 1737962400: 4.5016666667e+01 1737962700: 4.6000000000e+01 1737963000: 4.6000000000e+01 1737963300: 4.6000000000e+01 1737963600: 4.6000000000e+01 1737963900: 4.5790000000e+01 1737964200: 4.5000000000e+01 1737964500: 4.5000000000e+01 1737964800: 4.5000000000e+01
However, there is no graph displayed, just get the search icon [image: image.png]
The temperature graph definition is in graphs.cfg by default and unchanged, also temperature is also @ "GRAPHS=" in xymonserver.cfg by default as well.
On Sat, Jan 25, 2025 at 8:44 PM Jeremy Laidman <jeremy@laidman.org> wrote:
Hi Ken
Are you saying that it all worked without the "-u 100" but doesn't work with that?
As an aside, I'm not sure that it's logical to set the maximum to "100C", as a CPU has no reason to stay under 100C, or even to get close to 100C. Why not 90C? Or 85C? Why is 100C the number you chose? As an aesthetic decision that's yours to make, and certainly shouldn't break anything.
You're getting NaN for all data being graphed. Perhaps run "rrdtool fetch temperature.CPU:_44.rrd AVERAGE | tail" and see if you get valid data, or nothing but NaNs. If the latter then your source of data has a problem, not the graphing of it.
Also note that colons in graph (rrdgraph) parameters are problematic because it's used as a field separator by rrdgraph. The @RRDPARAM@ is expanded to (eg) "CPU:_44" which has a colon, and then the LINE2 specification has an extra colon, which might cause problems. But it's possibly fine. The fact that rrdgraph is showing colons in the graph legend suggests that it's not treating the colons as a field separator in this instance (perhaps xymon is escaping it) so you're probably fine.
Cheers Jeremy
On Sun, 26 Jan 2025 at 07:15, Ken Connell via Xymon <xymon@xymon.com> wrote:
Typo, *Xymon 4.3.30 <http://xymon.sourceforge.net/> *(but have the same issue in both versions)
On Sat, Jan 25, 2025 at 2:26 PM Ken Connell <kconnell@torontomu.ca> wrote:
Trying to graph temperature, it's a single OID that is polled successfully, but graph data notes the changes and separate values instead of graphing the changes as a whole.
*Xymon 4.3.28 <http://xymon.sourceforge.net/> with Devmon * 0.3.1-beta1 (I am working on the newer Devmon version, but haven't gotten far enough with that version to implement yet).
For RRD data - I get multiple files for the host/test:
temperature.CPU:_44.rrd
temperature.CPU:_45.rrd
Snip from graphs.cfg (only thing I changed is the scale): [temperature] FNPATTERN ^temperature.(.+).rrd TITLE Temperature YAXIS Celsius *-u 100 <-- only change* DEF:p@RRDIDX@=@RRDFN@:temperature:AVERAGE LINE2:p@RRDIDX@#@COLOR@:@RRDPARAM@ GPRINT:p@RRDIDX@:LAST: \: %5.1lf (cur) GPRINT:p@RRDIDX@:MAX: \: %5.1lf (max) GPRINT:p@RRDIDX@:MIN: \: %5.1lf (min) GPRINT:p@RRDIDX@:AVERAGE: \: %5.1lf (avg)\n
What am I missing here?
[image: image.png]
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
Xymon mailing list -- xymon@xymon.com To unsubscribe send an email to xymon-leave@xymon.com
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
I had a requirement to use the script I posted earlier, but for whatever reason, it was not finding the fault. Instead, I worked out another way to find the issue, which might be easier or more effective for your situation:
SCRIPT_NAME=showgraph.sh REQUEST_METHOD=GET QUERY_STRING='host=yourhostname&service=temperature&graph_width=576&graph_height=120&disp=yourhostname&nostale&color=green&graph_start=end-30min&graph_end=&graph=hourly&action=view' /usr/lib/xymon/cgi-bin/showgraph.sh 2>&1 | strings | head
This runs the CGI and gets the first few lines of output, where error messages will be shown, if any. The QUERY_NAME and REQUEST_METHOD are required. The QUERY_STRING can simply be copied from the URL for the image you're trying to display.
J
On Tue, 28 Jan 2025 at 14:54, Jeremy Laidman <jeremy@laidman.org> wrote:
Yeah, it's frustrating trying to diagnose graphing issues, because there's no error message from the RRD library to indicate what the problem could be.
I created a shell script that extracts all of the RRD parameters from Xymon, constructs an "rrdtool graph" command line, and executes it. If there's an error, this will let me see it.
Not sure if it's too long to show here (on the mailing lost), but I'll paste it and see if you get it:
#!/bin/sh
xymon-graph-tester tests an rrd graph
give me an RRD filename and a graph definition name and
try to make a graph
GRFILE=
mktempdie() { echo "$@">&2; rm -f "$GRFILE"; exit 1; }get_param() { FN="$1" RE="$2" perl -e '$fn="tcp.http.https:,,sa.auth.thyra.telstra.com,secureauth33,.rrd"; $re="^tcp.http.(.+).rrd"; $fn =~ /$r/ && print "$1\n"' }
RRDDIR=$1 GRDEF=$2
xymon 127.1 'config graphs.cfg' > $GRFILE || die "Failed to dump graph definitions from xymon server"
[ "$GRDEF" ] || die "Specify RRD directory name and graph definition name" [ -d $RRDDIR ] || die "No such directory: $RRD" cd $RRDDIR && echo "Changing dir to $RRDDIR" || die "Unable to cd to directory $RRDDIR"
DEFLIST=
sed -n '/^\['$GRDEF'\]/,/^\[/{/^\[/d;p}' "$GRFILE" | sed 's/^[ ]*//;/^#/d;/^\[/d'[ 0$DEBUG -gt 0 ] && echo "DEFLIST: $DEFLIST" rm -f "$GRFILE"TITLE=
echo "$DEFLIST" | sed -n '/^TITLE /s/^TITLE //p'YAXIS=echo "$DEFLIST" | sed -n '/^YAXIS /s/^YAXIS //p'FNPATTERN=echo "$DEFLIST" | sed -n '/^FNPATTERN /s/^FNPATTERN //p'echo "FNPATTERN: $FNPATTERN" DEFLIST=echo "$DEFLIST" | egrep -v "^(TITLE|YAXIS|FNPATTERN)"DEFLIST=echo "$DEFLIST" | sed 's/^/"/g;s/$/"/g'DEFLIST=echo $DEFLISTif [ "$FNPATTERN" ]; then FILES=
ls *.rrd | egrep "$FNPATTERN"echo "FILES: $FILES" RRDIDX=1 COLOR="FFFFFF" for FILE in $FILES; do RRDPARAM=get_param "$FILE" "$FNPATTER"RRDPARAM_ESC=echo "$RRDPARAM" | sed 's/:/\\\\\\\:/g'echo "RRDPARAM=$RRDPARAM_ESC" FILE_ESC=echo "$FILE" | sed 's/:/\\\\\\\:/g'DEFLIST=echo "$DEFLIST" | sed 's/@RRDPARAM@ /'"${RRDPARAM_ESC}"'/g;s/@RRDFN@/'"${FILE_ESC}"'/g;s/@RRDIDX@ '"$RRDIDX"'/g;s/@COLOR@/'"$COLOR"'/g'echo "----- $FILE" echo "rrdtool graph /dev/null --title \"$TITLE\" --vertical-label \"$YAXIS\" $DEFLIST" | sed 's/" /"\n /g echo "-----" echo "rrdtool graph /dev/null --title \"$TITLE\" --vertical-label \"$YAXIS\" $DEFLIST" | sh let RRDIDX=$RRDIDX+1 done else echo "-----" echo "rrdtool graph /dev/null --title \"$TITLE\" --vertical-label \"$YAXIS\" $DEFLIST" echo "-----" echo "rrdtool graph /dev/null --title \"$TITLE\" --vertical-label \"$YAXIS\" $DEFLIST" | sh fiOn Tue, 28 Jan 2025 at 13:13, Ken Connell <kconnell@torontomu.ca> wrote:
Jeremy,
Just to clarify, devmon is working (0.3.1-beta1 in the snip), it was just the "newer version" I did not implement yet. Maybe I should have left that tidbit out, but I thought it might come up as a question. Also to note, the "test column" is lower case, and the rrd file created is lowercase as well (but via temperature=ncv tag, otherwise I don't get the rrd file), it's just within the message file temperature was capitalized.
My assumption was, I could just copy my CPU test, change the OID and message, and be all good since cpu tests have just always graphed and temperature is as well noted in default configs to graph.
I did look into devmon-graphs.cfg, and see there is a definition for temp
[temp] FNPATTERN temp.(.*).rrd TITLE Temperature YAXIS Degrees Celsius DEF:in@RRDIDX@=@RRDFN@:ds0:AVERAGE DEF:out@RRDIDX@=@RRDFN@:ds1:AVERAGE LINE1:in@RRDIDX@#@COLOR@:@RRDPARAM@ Temperature GPRINT:in@RRDIDX@:LAST: %8.2lf %s (cur) GPRINT:in@RRDIDX@:MAX: %8.2lf %s (max) GPRINT:in@RRDIDX@:MIN: %8.2lf %s (min) GPRINT:in@RRDIDX@:AVERAGE: %8.2lf %s (avg)\n
I copied the temperature dir to temp within the devmon-host-template directory. Everything is lower case within the message files and column-test for both: [image: image.png]
No link for graphs, and no rrd file for test: temp Still search icon for graphs, for test: temperature
Losing my hair here quickly, thinking I might have to poll externally and feed data to the rrd via the "slab example" within help.
On Mon, Jan 27, 2025 at 5:58 PM Jeremy Laidman <jeremy@laidman.org> wrote:
Ken
I'm not sure what's going on for you. My guess is that the RRD file has "Temperature" (uppercase) rather than "temperature" as the DS name, because that's what you have in your status page image. The graph.cfg definition you showed previously expects a lower-case version of "temperature".
I note that your status page shows "Devmon version ..." but you said you weren't able to get Devmon working for this. It's possible there is some interaction here. In fact, if Devmon is actually creating the status page, then it may be causing the RRD file to use the DS name of "ds0", which would make your graphs.cfg entry totally wrong. The devmon code includes a "devmon-graphs.cfg" file that uses d0s, ds1 and ds2, and it expects the RRD filename to be temp.<something>.rrd.
I would either get Devmon working, or comment out temp/temperature entries in your Devmon config to ensure it isn't interfering with anything else you're using instead.
Cheers Jeremy
On Tue, 28 Jan 2025 at 02:40, Ken Connell <kconnell@torontomu.ca> wrote:
Hi Jeremy, thank you for the help.
Re: Are you saying that it all worked without the "-u 100" but doesn't work with that?
no, I've never had temperature graphs work, building a new Xymon server so I thought now would be a good time to dig in more.
Changing the scale was just cosmetic and it didn't work with the change or defaults (rrd file issues, so it didn't matter).
Re: colons in graph (rrdgraph) parameters are problematic
This I did not know, haven't had much experience with troubleshooting rrd files, and yes, this was an issue.
I removed the colons from the message file, however, the affect was no more rrd file updates.
Looking @ https://xymon.com/help/howtograph.html, I changed:
In xymonserver.cfg, changed @TEST2RRD temperature to temperature=ncv <-- this now produces rrd file temperature.rrd as expected:
rrdtool fetch does now have some "good data" if seems: 1737962100: 4.5000000000e+01 1737962400: 4.5016666667e+01 1737962700: 4.6000000000e+01 1737963000: 4.6000000000e+01 1737963300: 4.6000000000e+01 1737963600: 4.6000000000e+01 1737963900: 4.5790000000e+01 1737964200: 4.5000000000e+01 1737964500: 4.5000000000e+01 1737964800: 4.5000000000e+01
However, there is no graph displayed, just get the search icon [image: image.png]
The temperature graph definition is in graphs.cfg by default and unchanged, also temperature is also @ "GRAPHS=" in xymonserver.cfg by default as well.
On Sat, Jan 25, 2025 at 8:44 PM Jeremy Laidman <jeremy@laidman.org> wrote:
Hi Ken
Are you saying that it all worked without the "-u 100" but doesn't work with that?
As an aside, I'm not sure that it's logical to set the maximum to "100C", as a CPU has no reason to stay under 100C, or even to get close to 100C. Why not 90C? Or 85C? Why is 100C the number you chose? As an aesthetic decision that's yours to make, and certainly shouldn't break anything.
You're getting NaN for all data being graphed. Perhaps run "rrdtool fetch temperature.CPU:_44.rrd AVERAGE | tail" and see if you get valid data, or nothing but NaNs. If the latter then your source of data has a problem, not the graphing of it.
Also note that colons in graph (rrdgraph) parameters are problematic because it's used as a field separator by rrdgraph. The @RRDPARAM@ is expanded to (eg) "CPU:_44" which has a colon, and then the LINE2 specification has an extra colon, which might cause problems. But it's possibly fine. The fact that rrdgraph is showing colons in the graph legend suggests that it's not treating the colons as a field separator in this instance (perhaps xymon is escaping it) so you're probably fine.
Cheers Jeremy
On Sun, 26 Jan 2025 at 07:15, Ken Connell via Xymon <xymon@xymon.com> wrote:
Typo, *Xymon 4.3.30 <http://xymon.sourceforge.net/> *(but have the same issue in both versions)
On Sat, Jan 25, 2025 at 2:26 PM Ken Connell <kconnell@torontomu.ca> wrote:
> Trying to graph temperature, it's a single OID that is polled > successfully, but graph data notes the changes and separate values instead > of graphing the changes as a whole. > > *Xymon 4.3.28 <http://xymon.sourceforge.net/> with Devmon * > 0.3.1-beta1 > (I am working on the newer Devmon version, but haven't gotten far > enough with that version to implement yet). > > For RRD data - I get multiple files for the host/test: > > temperature.CPU:_44.rrd > > temperature.CPU:_45.rrd > > > Snip from graphs.cfg (only thing I changed is the scale): > [temperature] > FNPATTERN ^temperature.(.+).rrd > TITLE Temperature > YAXIS Celsius > *-u 100 <-- only change* > DEF:p@RRDIDX@=@RRDFN@:temperature:AVERAGE > LINE2:p@RRDIDX@#@COLOR@:@RRDPARAM@ > GPRINT:p@RRDIDX@:LAST: \: %5.1lf (cur) > GPRINT:p@RRDIDX@:MAX: \: %5.1lf (max) > GPRINT:p@RRDIDX@:MIN: \: %5.1lf (min) > GPRINT:p@RRDIDX@:AVERAGE: \: %5.1lf (avg)\n > > > What am I missing here? > > [image: image.png] > > > -- > > > Ken Connell > Senior Network Engineer > Computer & Communication Services > Toronto Metropolitan University (Formerly Ryerson University) > 350 Victoria St > RM PODB50 > Toronto, Ont > M5B 2K3 > 416-979-5000 x556709 > >
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
Xymon mailing list -- xymon@xymon.com To unsubscribe send an email to xymon-leave@xymon.com
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
--
Ken Connell Senior Network Engineer Computer & Communication Services Toronto Metropolitan University (Formerly Ryerson University) 350 Victoria St RM PODB50 Toronto, Ont M5B 2K3 416-979-5000 x556709
participants (2)
-
Jeremy Laidman
-
Ken Connell