Posts by ecrist

This forum was archived to /woltlab and is now in read-only mode.

    I've just committed a patch which should solve your issue. The new code ignore unknown max values which are not determined to be of UOM % (which we can conjecture a max value). Please test and let me know.


    I am working on a patch with the NagVis plugin to accommodate your data.

    I've done a bit more research. The value, -2, specifies the printer in your example doesn't know the max capacity of a given supply.


    After doing some reading in the Printer MIB RFC, I'm going to re-code some things. Namely, anything with a max value of -2 and a current value of < 100 is going to be assumed as a percentage. x.43.11.1.1.7.x is the UofM, which I will start to process accordingly.


    I'll make some changes and get another prelim patch committed, which will function. Some new logic will need to be added, which I'll get to later today, or more likely, tomorrow.

    I've got a prelim patch for the nagios check which assumes percentages when max data is output as a negative number. Still need manufacturer and model information so I can check my work.


    Edit: the patch is available vis SVN (the link above will get latest version

    Can you tell me what manufacturer and model your printer is? The SNMP doesn't really meet the standards, as defined. It would appear as though your printer is outputting current percentage, rather than an actual value, as my HP did in testing (and the standard). The math error, as you suggested, comes from the negative values in the Max OID table.

    Hey folks,


    I've written another NagVis plugin, this time to help monitor printer supply levels. It goes in-hand with a Nagios plugin I wrote to query SNMP-enabled printers. All you need to use this is a network-enabled printer, the check_printer plugin from my site (below), and PHP with GD installed. This is 100% dynamically generated.


    This image will auto-detect toner cartridges and size itself accordingly. Also, color order is defined by the printer SNMP order. Not all colors or features are supported on all printers. Color is determined by SNMP string. If you have problems, please contact me so I can update the gadget for your SNMP strings!


    You can download the files here:
    * NagVis Print Supply Gadget
    * Nagios Printer Supply Check


    To install, simply place the print_supply.php file in your nagvis/nagvis/gadgets folder and enjoy!

    Images

    • Picture 21.png
    • Picture 20.png

    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.


    Eric

    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:


    http://www.secure-computing.ne…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.

    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.

    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

    Hello,


    I've noticed an omission which may make it easier to create gadgets for NagVis from the perfParse array. I've attached a diff which adds a couple of elements to the $aPerfparse array.


    The patch maintains current behavior of the package, and creates additional elements, preventing gadget authors from having to further parse the warning and critical values for those which contain ranges.