#138 check_ups incompatible with nut 2.0

Matthew Kent


nut is now at 2.0 level and have changed completly the
communication protocol used to monitoring the ups state and
values (nut 2.0 is included in various recent distributions like

This breaks completly the check_ups plugin.

I have reworked it and you'll find it joined to this report.

As the old plugin works with nut-0.x and nut-1.x, I propose to add
this as a new check_upsv2 plugin.

I am currently using it and it is stable.



  • Alain RICHARD
    Alain RICHARD

    A new check_upsv2 plugin

  • Logged In: YES

    I also ran into this and found this bug after the fact. I
    wrote a perl script to use the upsc command instead. The
    upsc command works with both versions. Since the upsc
    command comes with the nut client, it should always work
    with the server. Using this perl script, I am able to
    update my nut servers one at time without the need to fiddle
    with my Nagios config or plugins.

    I was going to submit the script to the contrib section of
    the CVS tree, but I haven't quite figured out how to do that
    yet. If someone wants it, I will be happy to email the
    script to them until I submit it (if its even accepted).

  • arnaud quette
    arnaud quette

    Logged In: YES

    I've made a patch that include Richard's enhancements plus
    some of mine. Check

    Note that we _can't_ rely on upsc as it implies having NUT
    installed. We (NUT developers) have made an easy and Ascii
    protocol so that implementation is fairly straightforward, as in
    check_ups. Moreover, only upsc from nut 1.4 supports both
    the old and the new protocol, so if you have NUT 2.0 installed
    locally, and want to talk to a <= 1.4 NUT server, it won't

    If having both old and new protocol compat is needed, please
    tell us so.

    2nd NUT coordinator/developer
    Debian Developer

  • Logged In: YES

    Well, thats real useful. I kinda wish I saw all this
    before, but I must have missed these bugs while looking.
    Hopefully, this will all be working into the next release of
    the nagios plugins.

    Using upsc hasn't been a big deal to us because we install
    NUT on all the servers. Since we are using it to monitor
    and handle clean shutdowns. I wasn't aware in the
    compatibility issue and will keep that in mind to switch
    versions on everything at once. Actually, I will probably
    install a patched version of the check_ups program instead.
    I'd rather use that then a script.

    I also played with the NUT perl module, but that only works
    with <=1.4 versions of NUT. It was not real pretty, maybe
    something better came along. I was kinda tempted to fix it
    to work with the newer protocol, but parsing the output of
    upsc was quicker and easier.

  • Matthew Kent
    Matthew Kent

    Logged In: YES

    Superceeded by #1038413 a large patch which brings support
    to NUT 2.0. Would appreciate any testing of check_ups from a
    recent nightly snapshot/cvs build to make sure it still
    meets your needs.

  • Matthew Kent
    Matthew Kent

    • assigned_to: nobody --> mattkent
    • status: open --> pending-out-of-date
  • Matthew Kent
    Matthew Kent

    • status: pending-out-of-date --> closed-out-of-date
  • Matthew Kent
    Matthew Kent

    Logged In: YES

    Updated plugin has had initial testing.