Netapp Monitoring

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Netapp Monitoring

Post by jdalrymple »

In all of my commands replace "./" with "/usr/lib/nagios/plugins/check-netapp-ng.pl/"
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

Re: Netapp Monitoring

Post by nathanplatt »

okay so this occasion even switching to su nagios I still get Alarm Clock as the outcome.

root@raspberrypi:/usr/lib/nagios/plugins# ./check-netapp-ng.pl -H 192.168.1.170 -T CPULOAD -C public -w 80 -c 90
Alarm clock
root@raspberrypi:/usr/lib/nagios/plugins#

I did an ls of the folder as well

root@raspberrypi:/usr/lib/nagios/plugins# ls
check_apt check_haproxy check_load check_pgsql check_ssl_cert
check_backuppc check_host check_log check_ping check_ssmtp
check_breeze check_hpasm check_mailq check_pop check_statusfile
check_by_ssh check_hpjd check_memcached check_printer check_swap
check_cert_expire check_http check_mrtg check_procs check_tcp
check_clamd check_httpd_status check_mrtgtraf check_radius check_time
check_cluster check_icmp check_multipath check_raid check_udp
check_dhcp check_ide_smart check_mysql check_rbl check_ups
check_dig check_ifoperstatus check_mysql_health check_real check_users
check_disk check_ifstatus check_mysql_query check_rpc check_wave
check_disk_smb check_imap check_nagios check_rta_multi check_webinject
check_dns check_imap_quota check-netapp-ng.pl check_running_kernel check_whois
check_dnssec_delegation check_imap_quota_epn check_nntp check_sensors check_zone_auth
check_dummy check_imap_receive check_nntps check_simap check_zone_rrsig_expiration
check_email_delivery check_imap_receive_epn check_nt check_smtp imap_ssl_cert
check_email_delivery_epn check_ipmi_sensor check_ntp check_smtp_send imap_ssl_cert_epn
check_entropy check_ircd check_ntp_peer check_smtp_send_epn negate
check_file_age check_jabber check_ntp_time check_snmp urlize
check_flexlm check_ldap check_nwstat check_snmp_environment utils.pm
check_fping check_ldaps check_oracle check_soas utils.sh
check_ftp check_libs check_overcr check_spop
check_game check_lm_sensors check_packages check_ssh
root@raspberrypi:/usr/lib/nagios/plugins#
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Netapp Monitoring

Post by jdalrymple »

Something horrible happened that broke your plugin. I suggest you redownload it.
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

Re: Netapp Monitoring

Post by nathanplatt »

Thanks for all your help but I'm not sure how that will help me, all I did was copy the content of the .pl from GitHub and create a file using nano and pasted it in. Then I moved the file to correct folder, did I miss something?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Netapp Monitoring

Post by jdalrymple »

Copy the contents of the plugin into a text file and attach it to this forum post.

It sounds like you haven't spent a lot of time working on the Linux command line. I think that maybe one of the commands you ran may have mangled or overwritten the plugin that you created. Perhaps I'm wrong, but it's hard to be certain right now. The version of that netapp plugin that I found has no means by which to output the string "Alarm Clock"
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

Re: Netapp Monitoring

Post by nathanplatt »

You're right i've only really start working with linux in the past two years, but until i started building Nagios I haven't had any detailed work with Linux command line. I've attached the netapp plugin as requested. I adjusted my command.cfg after seeing an earlier post of yours, this is what it looks like now


define command{
command_name check_netapp_cpu
command_line /usr/bin/perl5.14.2 /usr/lib/nagios/plugin/check-netapp-ng.pl -H $$
}

define command{
command_name check_netapp_fan
command_line /usr/bin/perl5.14.2 usr/lib/nagios/plugin/check-netapp-ng.pl -H $H$
}

Since i've changed it by adding in the perl5.14.2 bit i'm now getting the following from Nagios Services Page;

Netapp A

Debian GNU/Linux

CPU Load

This service has 1 comment associated with it This service problem has been acknowledged
CRITICAL 2015-05-27 09:32:45 0d 16h 27m 45s 4/4 (null)

Fan Fail

This service has 1 comment associated with it This service problem has been acknowledged
CRITICAL 2015-05-27 09:33:08 0d 16h 27m 22s 4/4 (null)

Re-uploaded the file as it had truncated for some reason
Attachments
temp.txt
(28.33 KiB) Downloaded 209 times
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Netapp Monitoring

Post by jdalrymple »

Were you ever able to get the executable bit set on those files? It doesn't really matter, but calling them from the perl interpreter shouldn't be necessary at all.

Either way - so next step is for you to explain the logic in the end of your command lines:

Code: Select all

command_line /usr/bin/perl5.14.2 /usr/lib/nagios/plugin/check-netapp-ng.pl -H $$
and

Code: Select all

command_line /usr/bin/perl5.14.2 usr/lib/nagios/plugin/check-netapp-ng.pl -H $H$
What you probably want is:

Code: Select all

command_line /usr/bin/perl5.14.2 /usr/lib/nagios/plugin/check-netapp-ng.pl -H $HOSTADDRESS$ -C public -T CPULOAD
and

Code: Select all

command_line /usr/bin/perl5.14.2 /usr/lib/nagios/plugin/check-netapp-ng.pl -H $HOSTADDRESS$ -C public -T FAN
Depends on the service definitions though.
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

Re: Netapp Monitoring

Post by nathanplatt »

pi@raspberrypi /usr/lib/nagios/plugins $ /usr/bin/perl5.14.2 /usr/lib/nagios/plugins/check-netapp-ng.pl -H 192.168.87.170 -C public -T CPULOAD
OK: CPULOAD 5% | cpuload=5%

That actually worked when i added the 's' in plugin. So i checked the commands.cfg and that was the missing link there as well. So it looks like this entire issue was caused by a typo.

Thank you for your help, please close this!
Locked