| Author | Jerald Sheets |
|---|---|
| Compatibility | Xymon 4.2 |
| Requirements | Perl, unix |
| Download | library.pl |
| Last Update | 2010-01-25 |
Stornext check for the MDC servers. This check will do two things. First, it will watch the total number of fsstate processes. If there are 3 or 4, the check will go yellow. If 5 or more, red. in our environment, this usually means that the storage manager piece is hung.
Next, it checks for total tape drives IN USE, FREE, or DELAYED and passes those values in NCV format to the graphing engine.
Take the library.pl script, and place it into $HOBBITCLIENTHOME/ext In the $HOBBITCLIENTHOME/etc/clientlaunch.cfg place the following at the end of the file:
# MDC Fsstate Data Collector. This is a test module to report
# the current state of the libraries and the fsstate command.
[fsstate]
ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg
CMD $HOBBITCLIENTHOME/ext/library.pl
LOGFILE $HOBBITCLIENTHOME/logs/library.log
INTERVAL 3m
At the end of your $HOBBITSERVERHOME/etc/hobbitserver.cfg file, add the following at the end of your “TEST2RRD” line:
library=ncv
Next, add the following lines immediately below the “TEST2RRD” line.
# This defines the custom graphs specified in the above TEST2RRD section
NCV_library="Active:GAUGE,Free:GAUGE,Delayed:GAUGE"
In the “GRAPHS” line in the same file, place “library” at the end of the other entries.
Finally, define the graphs for these values in the Xymon graphs configuration $HOBBITSERVERHOME/etc/hobbitgraph.cfg like so:
# MDC Controller Drive Status Graphs
[library]
TITLE Library Drive Utilization
YAXIS Number of Drives
DEF:active=library.rrd:Active:AVERAGE
DEF:free=library.rrd:Free:AVERAGE
DEF:delayed=library.rrd:Delayed:AVERAGE
LINE2:active#00CCCC:Active Drives
LINE2:free#09801D:Free Drives
LINE2:delayed#FF0000:Delayed Drives
COMMENT:\n
GPRINT:active:LAST:Active Drives \: %5.1lf%s (cur)
GPRINT:active:MAX: \: %5.1lf%s (max)
GPRINT:active:MIN: \: %5.1lf%s (min)
GPRINT:active:AVERAGE: \: %5.1lf%s (avg)\n
GPRINT:free:LAST:Free Drives \: %5.1lf%s (cur)
GPRINT:free:MAX: \: %5.1lf%s (max)
GPRINT:free:MIN: \: %5.1lf%s (min)
GPRINT:free:AVERAGE: \: %5.1lf%s (avg)\n
GPRINT:delayed:LAST:Delayed Drives \: %5.1lf%s (cur)
GPRINT:delayed:MAX: \: %5.1lf%s (max)
GPRINT:delayed:MIN: \: %5.1lf%s (min)
GPRINT:delayed:AVERAGE: \: %5.1lf%s (avg)\n
If all goes well, you will get a library column on your MDC servers. It will display the Active, Free, and Delayed tape drives and will graph each one.
This has only been tested on StorNext MDC servers running on Linux. If you have any issues you need resolved, give me a shout, and I'll see if I can help.
Make the code prettier here in-house, and split our libraries into multiple graphs.
There's a couple snippets of subroutine here and there I yanked from this very site. Since I primarily wrote this “on the fly” to solve a problem, in the heat of the moment I didn't think to write down who and from where. If you see anything in here you recognize, feel free to let me know, and I'll give you proper props for your work.