Comments (8)
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.
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.
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.
it is not implemented. if it would, i had posted note here, or at least associated commit
from nagios-plugin-check_raid.
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.
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.
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.
Create separate issue (or even PR) for your problem, don't hijack unrelated tickets.
from nagios-plugin-check_raid.
Related Issues (20)
- arcconf: bbu monitoring for flash+battery/supercap adaptec modules HOT 1
- arcconf: doesn't handle logical device status: Impacted (Build/Verify with fix : 90 %) HOT 2
- Allow to ignore plugins
- No remote servers RAID status: check_raid UNKNOWN HOT 16
- Possible to hide "OK" results or just showing "OK" and not all devices? HOT 4
- Error runing plug-in on debian 10 HOT 10
- remote monitor HOT 1
- Use of StorCli instead of MegaCli HOT 5
- [bug] with parsing mdadm output => Unexpected parse
- Sudo error on centos
- WARNING: megacli:[Volumes(1): DISK0.0:Optimal, WriteCache:DISABLED HOT 2
- arcconf: parse error HOT 6
- Unexpected parse at ./check_raid.pl line 3578, <$fh> line 6. HOT 1
- HP ssacli - consider predictive failure information HOT 6
- HP ssacli - rebuilding shouldn't perhaps still be warning state? HOT 6
- HP ssacli -
- Error with P440AR RAID controller. How to solve, what to change? Please advice. HOT 6
- "NOT PARSED" and "Can't locate object method" errors HOT 2
- Feature Request mdstat: Warn when auto-read-only array detected
- "sudo: a password is required" on Ubuntu 20.0.4 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nagios-plugin-check_raid.