EMC CLARiiON Monitoring – Adding TCP port variable

Modified check_emc_clariion.pl script to specify a different (variable) TCP port for EMC CLARiiON monitoring via Nagios, Cacti, or otherwise.


I’ve been using the check_emc_clariion.pl script for a while to monitor an EMC CLARiiON SAN, but recent issues made me realize the need to use the same check for another host. The problem is the hosts are behind a firewall and using port forwarding – fine for one host on the default port (17894), but I needed to specify a different TCP port to use for the new host.

I updated the check_emc_clariion.pl script to include a TCP port variable, for use like so:

root@host:~#/usr/lib/nagios/plugins/check_emc_clariion.pl -H -u user -p password -t faults --warn 50 --crit 70 --tcp_port=17895
The array is operating normally.

Here is a diff of the original script and my changes:

< $opt_tcp_port 214,217d212 < my $opt_tcp_port = ''; < < ### set tcp port < $opt_tcp_port=17894; 272,273c267 < 'paths=s' => $opt_pathcount,
< 'tcp_port=s' => $opt_tcp_port
> 'paths=s' => $opt_pathcount
< open( NAVICLIOUT, "$NAVICLI_CMD -h $opt_host -Port $opt_tcp_port Faults -list |" ); --- > open( NAVICLIOUT, "$NAVICLI_CMD -h $opt_host -Port 17894 Faults -list |" );

EMC CLARiiON - Nagios

EMC CARiiON - Status Detail

EMC CLARiiON - Cacti graph