glensc / nagios-plugin-check_raid

Nagios/Icinga/Sensu plugin to check current server's RAID status ⛺
143 stars 84 forks source link

tw_cli: Implement detailed BBU & Enclosure checks #131

Closed robbat2 closed 8 years ago

robbat2 commented 8 years ago

$SUBJ

glensc commented 8 years ago

Excellent work! can you take look at the Travis failure? why it can't install DateTime module?

glensc commented 8 years ago

i think problem can be solved by adding DateTime to cpanfile

glensc commented 8 years ago

uh, the fatpacked check_raid.pl is now, 6.8M due the timezone data:

-rwxrwxr-x 1 glen glen 6.8M Feb 27 12:11 check_raid.pl*

how do you suggest to handle this?

robbat2 commented 8 years ago

For the moment, the part of the code that uses it is actually commented out in my final submission, because I couldn't figure out if tw_cli localized the output at all (it was very unclear, I didn't have a localized system to test it on);

Until it's actually live, you can drop the timedate/datetime/date::parse entries in cpanfile.

If it DOES end up localizing it, we either need to force it to NOT localize for our calls (does it respect LC_ALL=C?) and parse manually, or bring in the timezone data :-(.

glensc commented 8 years ago

some other option would be to change distribution method, require them to install extra modules themselves

in my distro (pld-linux) i do not use the fatpacked script, but rather standard perl installation

robbat2 commented 8 years ago

Yeah, for Gentoo I have it packaged the thin way, not fatpack at all: https://gitweb.gentoo.org/repo/gentoo.git/tree/net-analyzer/nagios-plugin-check_raid

glensc commented 8 years ago

btw, you might want to automatically setup sudo rules from post-scriptlet:

https://github.com/pld-linux/nagios-plugin-check_raid/blob/auto/th/nagios-plugin-check_raid-4.0.0-1/nagios-plugin-check_raid.spec#L105-L114

and you should add runtime dep on sudo, most plugins use it

robbat2 commented 8 years ago

Gentoo has tried very hard to NOT write sudoers rules for users as much as possible; but I will add a notice that users should use -S manually to do it.