260 likes | 434 Views
NetApp Quick Glance Monitoring. Customer Written Application Frank Bounds Sealy, Inc. Brief Company Background. Sealy, Inc. -- Manufacturing (mattresses) Mid-sized mission critical corporate data center Small staff Very dynamic environment (growth, changes)
E N D
NetApp Quick Glance Monitoring Customer Written Application Frank Bounds Sealy, Inc.
Brief Company Background • Sealy, Inc. -- Manufacturing (mattresses) • Mid-sized mission critical corporate data center • Small staff • Very dynamic environment (growth, changes) • Use a lot of NetApp/Data OnTap features • Mixed Unix, Windows, VMWare • iSCSI, FCP, NFS, CIFS, SnapVault, FlexClones • SQL Server, Snap Manager for SQL • TSM – NearStore (3170) based storage pools, NDMP • Central storage for plant home directories(Cisco WAFS, CIFS, Quotas) • 170TB -- 3170 (NearStore), 6040 cluster, 3070 cluster • Cisco MDS9000 series SAN switches
Why not just use DFM/Ops Mgr • DFM/Operations Manager is a GREAT product. • DFM tries to be everything to everyone. A necessity for a product in it’s class. • DFM monitoring is chatty. Even at warning level there are lots of messages to sort through. • A generalized product can’t please everyone for every case. • I live by the cup of coffee principal. I want to have a sense of the environment’s health by the time I finish my first cup of coffee in the morning. • With a combination of DFM, custom monitoring and alert scripts you get the best of all worlds. And the company benefits. • The internal website can be accessed by DBAs, Server Admins, Management, etc. that don’t want/need access to a comprehensive product. • There is much that DFM does well and we use it for those features
Website System Environment • Redhat Enterprise Linux 5 (VMWare virtual server) • Apache 2.2.3 • Perl 5.8.5 - Lincoln Stein’s CGI.pm - Small assortment of other Perl modules (cpan.org) - Andy Wardley’s Template Toolkit V2.18 - Internally developed wrapper module for API • Data OnTap SDK 3.01 (ontapi 1.7) • PHP 5 and chart module (JPGraph) for plotting • MySQL to store statistics for plots
Website Development Goals • Move away from RSH used for old website • RSH works but… - Security implications - Parsing filer command output is tedious - Command output format could change causing rewrites - Tests the limits of my Perl Regex skills • Create a Perl module to abstract API calls - Re-usable - Simplifies scripts mining the information. Can focus more on application needs and less on rewriting the same the calls. - Changes in the API can be compensated for in the module without rewriting all the CGI scripts. - Can abstract and combine API data to present in a new form • Icons to get quick at-a-glance status • Better grouping of data/information • Readonly. No changes from website.
API Abstraction (Perl Module) Reduces this: use lib "/usr/local/lib/perl/NetApp"; use NaServer; use NaElement; my $api = NaServer->new ($filer, 1, 7); $api->set_style(LOGIN_PASSWORD); $api->set_admin_user($user, $pw); $api->set_transport_type(NA_SERVER_TRANSPORT_HTTP); To this for application scripts: use NAontapi2; $api = NAontapi2->new(-filer=>’filername’, -username=>’ontapi_user’, -password=>’ontapi_pwd’);
Get Aggregates (SDK Call) use lib "/usr/local/lib/perl/NetApp"; use NaServer; use NaElement; $api = NaServer->new ($filer, 1, 7); $api->set_style(LOGIN_PASSWORD); $api->set_admin_user(‘user’, ‘password’); $api->set_transport_type(NA_SERVER_TRANSPORT_HTTP); my $out = $api->invoke("aggr-list-info"); # Check API call result code if ($out->results_status() eq "failed"){ print($out->results_reason() ."\n"); exit (1); } my $aggr_info = $out->child_get("aggregates"); my @results = $aggr_info->children_get(); foreach $aggregate (@results) { $aggr_diskcount = $aggregate->child_get_int("disk-count"); . . $aggr_state = $aggregate->child_get_string("state"); }
Aggregate data using module use NAontapi2; $api = NAontapi2->new(-filer=>$filername, -username=>$ontapi_user, -password=>$ontapi_pwd); $aggr_hash_ref = $api->naAggrDetail(); # Return hash keyed by aggregate %aggregates = %$aggr_hash_ref; foreach $aggr_rec (sort keys %aggregates) { print “NAME: ${aggr_rec} Detail: $aggregates{$aggr_rec}”,”\n”; }
Final Thoughts • This is an ongoing process based on operational needs • Targeted toward information that is needed day to day • Not meant to be a replacement for instances where DFM works better. • Not meant to be a general purpose reporting system • At a glance. Get critical information quickly.