Giter Site home page Giter Site logo

Comments (8)

glensc avatar glensc commented on August 25, 2024

this really depends on the system and what are your exact udev rules to setup /dev nodes. so you could instead write udev rule to add nagios user to have readonly access to the needed /dev node and omit sudo completely :)

from nagios-plugin-check_raid.

calestyo avatar calestyo commented on August 25, 2024

Well ok... so the let me propose amongst the following

  • adding a new switch that disables the usage of sudo (for those who have udev rules)
  • does it sound feasible to add udev-rules generator for those tools we know, just like we have now the sudoers generator?
  • I still would recommend the -g root approach for those who either don't have udev, don't want to use it or where we don't know yet which rules to set up
    (btw: as said it works for sas2irco.... but does not work for megacli
  • Would you further accept a patch, that adds "-u root" to sudo in all other cases (where we don't know -g root works)?
    Reason is, that -u root is just a default, that may however be changed on systems (like ours where it is set to nobody) and then check_root fails.
    It should have no further impact.

from nagios-plugin-check_raid.

calestyo avatar calestyo commented on August 25, 2024

Hi.

I've had a look at the all new version 3.0... nice...
But I still miss some sudo tightening... (i.e. this issue here)... :(

Where can I change the code in 3.0, to add sudo parameters per raid-check?

Thanks.

from nagios-plugin-check_raid.

glensc avatar glensc commented on August 25, 2024

it is not implemented. if it would, i had posted note here, or at least associated commit

from nagios-plugin-check_raid.

glensc avatar glensc commented on August 25, 2024

as for the original ticket, you may modify sudo rules, check_raid -S -d just prints what commands it needs the rules for. so if you write custom sudo rules (for example improve ones check_raid printed itself), which need different sudo invocation, the check_raid needs to be modified too, as it currently does not specify -u root or -g root. if you tighten the regexps, then check_raid sudo invocation does not need to be changed.

i am not sure how to solve this as i want check_raid to be automatic as possible. if you know which plugins work with filesystem permissions only (use /dev/ nodes, but no ioctl calls), then each check_raid plugin has sudo function, you can put better sudo lines there.

from nagios-plugin-check_raid.

glensc avatar glensc commented on August 25, 2024

if you still don't understand the code and wish to contribute, please paste here expected sudo rules and expected commands to be run.

to get original sudo rules, invoke check_raid -S -d
to get original sudo commands, invoke check_raid -d

from nagios-plugin-check_raid.

boomertsfx avatar boomertsfx commented on August 25, 2024

We use check_raid.pl as root on Solaris which has worked well, but when we upgraded to the latest version, it now says it can't find sudo. We don't need sudo and Solaris doesn't come stock with sudo. Is there a way around this?

from nagios-plugin-check_raid.

glensc avatar glensc commented on August 25, 2024

Create separate issue (or even PR) for your problem, don't hijack unrelated tickets.

from nagios-plugin-check_raid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.