Re: [Mon-devel] Request to include monitor script with distribution
Brought to you by:
trockij
From: Ed R. <er...@pa...> - 2005-12-18 06:10:08
|
On Thu, Dec 15, 2005 at 01:31:58PM -0800, Todd Lyons wrote: > For ONTAP 6.0 and 6.1, I can generate the appropriate values from the > raidVTable with the same Volume Status limitation, but it prints a line > out for every drive. Someone with a real 6.0 or 6.1 ONTAP system > (<cough> Ed <cough>) ought to be able to figure out if the fields that > I'm using will be duplicated across each drive. That's if he can get the script working. Which he could, but it needed a bit of hacking (I don't see how the "list" option worked at all in the version you sent). See attached diffs - I fixed a couple of things that turned up with "-w", typos in the names for the old MIB, some comments, and a small sample of coding style things. Oh, and added an env var for the community, every Mon script that uses communities should support that (to keep the community name from turning up in the mon.cgi details). Also, though it's not in the patch, I moved the duplicated array declarations to the top next to the other globals, and it worked fine. I'm using Perl 5.6.1, don't know what you have. > If yes, then you only > keep one line by doing a 'next' or 'last' or set a flag to get out of > the foreach loop. I think that there will need to be some trickery to > get out of both the inner while and the outer foreach loops though. You can provide a label argument to the 'last' statement that points to where you want to go. > The new script is attached. [...] I don't like "Rebuilding: 0%" as a status output - I first thought that the filer was rebuilding the RAID and it's so slow it hasn't even gotten to 1% yet. You should only add the "Rebuilding" tag if the status shows that the filer is reconstructing the volume. Here's the output of --list on my old NetAPP: $ ./netappraidstat.monitor --list --config /etc/mon/netappfree.cf toaster filer ONTAP Volume Name Vol State Vol Status --------------------------------------------------------------------------- toaster 6.1.2R3 parity disk 8.30 active Rebuilding: 0% toaster 6.1.2R3 data disk 8.31 active Rebuilding: 0% toaster 6.1.2R3 data disk 8.23 active Rebuilding: 0% toaster 6.1.2R3 data disk 8.21 active Rebuilding: 0% toaster 6.1.2R3 data disk 8.22 active Rebuilding: 0% toaster 6.1.2R3 data disk 8.24 active Rebuilding: 0% toaster 6.1.2R3 parity disk 8.26 active Rebuilding: 0% toaster 6.1.2R3 data disk 8.25 active Rebuilding: 0% toaster 6.1.2R3 data disk 8.27 active Rebuilding: 0% toaster 6.1.2R3 data disk 8.28 active Rebuilding: 0% toaster 6.1.2R3 data disk 8.29 active Rebuilding: 0% |