background 
Kris' Tech Blog ( and stuff ) Home About Kris Contact Kris

Categories


All by Date

Linux

Security

Networks

Religion

General





Kris Springer's Tech Blog - Xymon Graph Theming
Xymon Graph Theming 11-28-18
Kris Springer


I have been using Xymon Monitoring for many years. It was previously called Big Brother way back in the day. I've always done my own minor theming with icons and menus, but never really looked into the graphs. In the past year I've seen some other tools I use upgrading their UI's to look more modern and visually friendly, and I looked at my Xymon graphs and decided to see if they could be themed a bit. As it turns out it was easy once I found the specific lines of code to add/edit. Thanks to the folks in the Xymon Mailing List for assisting.

Here's what the graphs look like by default.



Here's what the graphs look like after a few edits.



And here's how to make it happen. Edit /home/xymon/server/etc/xymonserver.cfg
# graph theme
# values can be found at https://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html
RRDGRAPHOPTS="-E -R light --border 0 --dynamic-labels -a PNG --grid-dash 1:0 -n LEGEND:8:Roboto -n TITLE:9:Roboto -n AXIS:7:Roboto -n UNIT:7:Roboto -n WATERMARK:.1:Roboto -c BACK#262626 -c CANVAS#000000 -c SHADEA#000000 -c SHADEB#000000 -c GRID#00000000 -c MGRID#DDDDDD11 -c FONT#DDDDDD -c AXIS#262626 -c FRAME#000000 -c ARROW#262626"

RRDHEIGHT="180"
RRDWIDTH="864"
Then you round the corners with css. Add the following to the end of /home/xymon/server/www/gifs/xymonbody.css
img[alt*="graph"] { 
 border-radius: 20px; 
}
img[alt*="Zoom"] { 
 border-radius: 20px; 
}
Note: you may have to clear your browser cache to force it to refresh the css file.


UPDATE:
  • I've put together a theming package that automates all this. Find it on GitLab





© Copyright 2024 WarriorSon Productions. All rights reserved.