When using Nagvis for Nagios there are some sample gadgets you can use. Below are some of my favorites.
From scrath it will look like this. It may look ok when using large text but if you want to use it with small text it will almost be unreadable.
You can modify some parameters in order to change color, font and remove the shadow. First download your favorite ttf font and put it in the rawnumer directory.
Change the line:
$fontFile = './rawNumbers/OpenSans-Bold.ttf';
Change the colors. The bright green can not read with a white background.
// Define the colors we want to use $oBackground = imagecolorallocate($img, 255, 255, 255); $oGreen = imagecolorallocate($img, 0, 200, 0); $oYellow = imagecolorallocate($img, 255, 200, 0); $oRed = imagecolorallocate($img, 200, 0, 0); $oShadow = imagecolorallocate($img, 0x66, 0x66, 0x66);
Remove the shadow or change it to the value you want:
// Now we create the shadow to make the visual experience deeper... // ImageTTFText($img, $fontSize, $fontRotation, 2, $fontSize+2, $oShadow, $fontFile, $value . $uom);
This gadget can be used to visulize diskspace. I have modified the gadget to make the image smaller.
For some reasom theese gadgets can not be found from Nagvis Exchange anymore. Don´t ask me why. You can download the gadgets here if you want. In the file is both the pie charts, the modified rawnumbers and the two versions of the pie charts. Just put all gadgets in the correct Nagvis diractory.