Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toner graph does not escape colons causing rrdgraph to fail #4868

Closed
3 tasks done
ghost opened this issue Oct 24, 2016 · 1 comment
Closed
3 tasks done

Toner graph does not escape colons causing rrdgraph to fail #4868

ghost opened this issue Oct 24, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 24, 2016

DO NOT DELETE THIS INFORMATION.

Please read this information carefully.

  • Is your install up to date? Updating your install
    Please do not submit an issue if your install is not up to date within the last 24 hours or on a stable monthly release.
  • Please include all of the information between the ==================================== section of ./validate.php.
LibreNMS Version: 243f9401f7b33fbeee55e01171af713b687c6691
DB Schema: 148
PHP: 7.0.12
MySQL: 10.1.18-MariaDB
RRDTool: 1.5.6
SNMP: NET-SNMP 5.7.3
  • Please provide as much detail as possible.

Good day,

So this fun Samsung printer reports it's toner level happily these days. However librenms can't graph it. I believe this is due to $toner_id being set to "Toner S/N:CRUM-16021314488". That unfortunately has a : in it which rrdgraph seems to take as a colon divider. I've tried tracking down where toner_id was set to see if perhaps I could escape the : but I've not had luck so far.

This is the rrdtool output from the failed graph in librenms.

RRDTool Command
rrdtool graph /tmp/oTMJmTRVJvuUfcB4.png -l 0 -u 100 -E --start 1477233600 --end 1477320000 --width 1164 --height 300 -c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c FONT#000000 -c CANVAS#FFFFFF00 -c GRID#a5a5a5 -c MGRID#FF9999 -c FRAME#5e5e5e -c ARROW#5e5e5e -R normal --font LEGEND:8:DejaVuSansMono --font AXIS:7:DejaVuSansMono --font-render-mode normal COMMENT:' Cur Max\n' DEF:toner2=/opt/librenms/rrd/scribe.internal/toner-1.rrd:toner:AVERAGE LINE1:toner2#bf5d5b:'Toner S/N:CRUM-16021314488' AREA:toner2#bbd392: GPRINT:toner2:LAST:'%5.0lf%%' GPRINT:toner2:MAX:%5.0lf%%\\l

RRDTool Output
ERROR: Unused Arguments "CRUM-16021314488" in command : LINE1:toner2#bf5d5b:Toner S/N:CRUM-16021314488

It does poll the information correctly as the printer is reporting 82% toner left in librenms. It just can't generate this graph.

@ghost
Copy link
Author

ghost commented Nov 3, 2016

Im going to close this as the merged commits above solved the problem. :-).

@ghost ghost closed this as completed Nov 3, 2016
@lock lock bot locked as resolved and limited conversation to collaborators May 18, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant