New NagVis Gadget - Thermometer

This forum was archived to /woltlab and is now in read-only mode.
  • I've got a new gadget I've written in the shape of a thermometer. The color of fluid changes on normal, warning, or critical. This gadget supports warning and critical min/max ranges (i.e. temp too cold or too hot alerts). To get this to function, you need to patch gadgets_core.php from my previous post, Warning and Critical value patch (I'm too newb for links, I think).

    the images below are based on perfdata from temp=78.8F;55:93;50:98 which means,
    Current Temp: 78.8F
    Warning Below Temp: 55F
    Warning Above Temp: 93F
    Critical Below Temp: 50F
    Critical Above Temp: 98F

    You can download it here: thermo

    This gadget works best with my gadgets_core.diff patch, available here: gadgets_core.diff

  • HI Ecrist!
    The Gadget seems realy nice. How is it to install? Are there Subfolders needed for the JPEGs? And which permissions do the files need?

  • To install, create a nagvis/nagvis/gadgets/thermo directory, with all images. Put the thermo.php file in nagvis/nagvis/gadgets/ directory.

    If you downloaded last night, please download a new copy of thermo.php, as I had an update this morning to a directory name.

    I will create and commit to SVN an INSTALL file.

  • HI Ecrist,
    i've created the folders and copied the images into it. But the only thing that i see is the following:

    Just a white field where the gadget should be.

  • If there is just a white field where the image should be, it sounds as though it didn't get installed correctly.

    I've added install instructions to SVN, which you can see here:…is/gadgets/thermo/INSTALL

    It covers patching the gadgets_core.php, which is required. There are a couple bugs I've already found, involving metering things which do not use ranges on warning and critical, which I'll work on fixing today. (7:14AM here now).

    I've attached a screencap from my system here with just a few gadgets, showing it working.

  • I did find a bug that would be causing your problem. I'm going to fix it and update SVN now. Give me 20 mins to fix, test, and commit.

  • I've fixed the bug in question, but found a couple others involving parsing data which doesn't include warning and critical ranges. I'm working on that now, should have it fixed shortly.

  • Ok, I've got all the bugs I'm immediately aware of fixed, inluding the pathing issue you were having, above. Check out the thermo.php file again (images didn't change) and install according to instructions, making sure to patch your gadgets_core.php.


  • Thank you ecrist. The gadget is working.

    But there's still a little problem. There are no Temperature-Numbers shown.

    Are there any variables to fill in the values?

  • I've added the required font file to svn, and updated thermo.php, please re-checkout the following files:
    * thermo.php
    * font.ttf

    The font file should be in the thermo directory, with the images.

  • Note to LaMi/Developers -

    This plugin includes all files necessary, and it would be nice if you would link in your Gadgets section of the site. A link to the SVN file, as above, is ideal, as it is most up-to-date.

  • is it possible to change Fahrenheit in Celsius?