Posts by ecrist

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

    check_printer is a Nagios plugin, written to provide output for a NagVis plugin (though PNP and others can use it, as it's standard per data.) I have not tried to integrate this with Icinga, yet. We're just this week and next, rolling out Icinga to replace Nagios. At that time, I can provide more input as to your error. In the mean time, I suggest you run it best you can as a regular Nagios plugin.


    Cheers

    I am the developer of the plugin. It's a generic Nagios plugin originally written to work with the associated NagVis check_printer plugin. The error here is that the original user simply downloaded the file directly out of my developer trac as a source file, and didn't export the file from SVN. The check out or export process sets those variables (or when I create a release package.)


    The following command sequence on a unix terminal shows the proper work flow, and demonstrates the values set:



    Here's an execution of the properly checked-out script:

    Code
    1. ecrist@swordfish:~/work-> ./check_printer 192.168.5.100 public 2 1
    2. Printer Supplies OK | 'Black Cartridge HP CB436A'=7%;2;1;0;100

    It would seem NagVis 1.5.5 is crap. I've spent two days working through bugs just to get it installed. I now have it installed, but javascript errors abound. To be honest, I'm sort of tired of spending time on this. If you were to get me a shell on a box where 1.5.5 actually worked (or tell me what version of 1.5 actually does work OK) I'll debug and fix my plugin. As it stands now, I'm going to recommend on the exchange that it be used for NagVis 1.4 only.

    After severely hacking the install.sh bash script to get it to run on FreeBSD, I have an install for NagVis 1.5.5. When trying to log in, however, I get an error that etc/auth.db cannot be found. It seems there is code in share/server/core/classes/CoreSQLiteHandler.php to create some things, but I cannot seem to find any where in the package anything that creates the auth.db sqlite database. Can someone point me in the right direction?


    FWIW, in reference to my install.sh hacks, I plan on pushing changes up the tree to allow that script to better work on *BSD in addition to Linux. Also, I have begun work on putting NagVis in the FreeBSD ports tree.

    Hello, I'm the developer of this gadget. I have not tested my code in NagVis 1.5, but I will do so today and report back. LIkely, I'll need to update the gadget. Thanks for the pointer to this thread so I can fix this.


    Also, the patch mentioned above is for NagVis 1.3. There were some changes required to get the data I wanted, which were later pushed into the main source tree, so the patch will no longer apply.


    Eric

    Can you run those same commands with option On, to get the full numerical OID, and send me the *entire* output from the SNMP walk? I'll need to build some tests in the script to poll varying OID tables depending on manufacturer.

    Sorry about that. I'm a FreeBSD guy and that's where the default location is. I will add some code to dynamically update the library location on Linux and BSD systems.

    It would be nice if the author's name appeared on the main page within the plugin's description (above or below the 'submitted on' date stamp).


    Also, it would be nice if the license wasn't entirely listed in the description, but if there was a short description line, instead. In my case, I would use 'BSD License' for my two gadgets, and the full text would be listed upon clicking download. IMHO, it would clean the page up a bit.

    To all three of you:


    Thanks for the great debug data. If you're running the latest version, and you can run the check command manually from your nagios host, add a 1 as the fifth argument to the command and post the data here. It will output a bunch of debug for me (the OID array) and allow me to fix this.


    I will work on this tomorrow (16:10 here now, CDT).

    J.Hummer,


    Looking at your data, the OID .1.3.6.1.2.1.43.11.1.1.9.1 is supply table 1 for current-level. In all of your examples, the current level shows as -3, not a real number. According to RFC 1759,


    Quote

    A value of (-3) means that the printer knows that there is some supply/remaining space, respectively.


    This means the printer check plugin will only be able to determine if there is supply available or not, not the actual level of supply available. The graphing plugin will either display 100% or 0%, and there can be no provision for warning.


    I'm working on patching for this now.

    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.

    I think I've got this fixed. I've updated both the printer nagios check as well as the NagVis plugin which seems to work with your perfdata.


    I've attached a screencap here showing the output of the plugin with your data.


    Main Modifications:
    1) Any 'WASTE' tagged fields will have an inverse warning/critical state.
    2) Adjusted for output from MX-2300
    3) Sorting elements alphabetically so same-color components appear near to eachother in output graph.