Monitor QNAP disk space in Nagios

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.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Monitor QNAP disk space in Nagios

Post by lmiltchev »

Can you run the following commands and show us the output?

Code: Select all

yum list installed | grep -i perl-net-snmp
yum provides perl-Net-SNMP
yum repolist -v
Be sure to check out our Knowledgebase for helpful articles and solutions!
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Monitor QNAP disk space in Nagios

Post by imran_khan »

Hello,

Pleaser find the output of requested command.

[root@localhost ~]# yum list installed | grep -i perl-net-snmp
perl-Net-SNMP.noarch 5.2.0-1.2.el6.rf @rpmforge
[root@localhost ~]# yum provides perl-Net-SNMP
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirrors.einstein.yu.edu
* extras: centos.chi.host-engine.com
* rpmforge: repoforge.mirror.constant.com
* updates: centos.aol.com
base | 3.7 kB 00:00
extras | 3.3 kB 00:00
rpmforge | 1.9 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 5.4 MB 00:00
perl-Net-SNMP-5.2.0-1.2.el6.rf.noarch : Net-SNMP Perl module
Repo : rpmforge
Matched from:



perl-Net-SNMP-5.2.0-1.2.el6.rf.noarch : Net-SNMP Perl module
Repo : installed
Matched from:
Other : Provides-match: perl-Net-SNMP



[root@localhost ~]# yum repolist -v
Loading "fastestmirror" plugin
Config time: 0.014
Yum Version: 3.2.29
Loading mirror speeds from cached hostfile
* base: mirrors.einstein.yu.edu
* extras: centos.chi.host-engine.com
* rpmforge: repoforge.mirror.constant.com
* updates: centos.aol.com
Setting up Package Sacks
pkgsack time: 0.054
Repo-id : base
Repo-name : CentOS-6 - Base
Repo-revision: 1385589949
Repo-updated : Wed Nov 27 17:08:25 2013
Repo-pkgs : 6,367
Repo-size : 5.1 G
Repo-mirrors : http://mirrorlist.centos.org/?release=6 ... 64&repo=os
Repo-baseurl : http://mirrors.einstein.yu.edu/centos/6.5/os/x86_64/ (9 more)
Repo-expire : 21,600 second(s) (last: Thu Oct 9 14:19:53 2014)

Repo-id : extras
Repo-name : CentOS-6 - Extras
Repo-revision: 1409693677
Repo-updated : Tue Sep 2 17:34:38 2014
Repo-pkgs : 15
Repo-size : 9.1 M
Repo-mirrors : http://mirrorlist.centos.org/?release=6 ... epo=extras
Repo-baseurl : http://centos.chi.host-engine.com/6.5/extras/x86_64/ (9 more)
Repo-expire : 21,600 second(s) (last: Thu Oct 9 14:19:54 2014)

Repo-id : rpmforge
Repo-name : RHEL 6 - RPMforge.net - dag
Repo-updated : Thu Jul 10 21:46:59 2014
Repo-pkgs : 4,718
Repo-size : 2.2 G
Repo-baseurl : http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/
Repo-mirrors : http://mirrorlist.repoforge.org/el6/mirrors-rpmforge
Repo-expire : 21,600 second(s) (last: Thu Oct 9 14:19:54 2014)

Repo-id : updates
Repo-name : CentOS-6 - Updates
Repo-revision: 1412687300
Repo-updated : Tue Oct 7 09:12:02 2014
Repo-pkgs : 1,600
Repo-size : 4.4 G
Repo-mirrors : http://mirrorlist.centos.org/?release=6 ... po=updates
Repo-baseurl : http://centos.aol.com/6.5/updates/x86_64/ (9 more)
Repo-expire : 21,600 second(s) (last: Thu Oct 9 14:19:55 2014)

repolist: 12,700

Thanks,
Imrna Khan.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Monitor QNAP disk space in Nagios

Post by sreinhardt »

I'm sorry, you do not want the rpmforge version, but the epel version. I misread the package name previously. Try the following:

Code: Select all

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6-8.noarch.rpm

yum remove perl-Net-SNMP
yum update
yum install perl-Net-SNMP-5.2.0-4.el6
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Monitor QNAP disk space in Nagios

Post by imran_khan »

Hello,

Followed the mentioned steps but getting same error.

[root@localhost libexec]# rpm -qa | grep perl-Net-SNMP
perl-Net-SNMP-5.2.0-4.el6.noarc

[root@localhost libexec]# ./check_qnap_volumes --help
Can't locate SNMP.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./check_qnap_volumes line 29.
BEGIN failed--compilation aborted at ./check_qnap_volumes line 29.

Is there any luck?

I am trying to set warning and critical value but it is not happening. I am getting same output with and without warning and critical value. Please help me out on this.

[root@localhost ~]# /usr/local/nagios/libexec/check_snmp -H QNAP_IP -C abc -o .1.3.6.1.4.1.24681.1.2.17.1.4.1 -w 80: -c 85:
SNMP OK - "25.26 TB" |

[root@localhost ~]# /usr/local/nagios/libexec/check_snmp -H QNAP_IP -C abc -o .1.3.6.1.4.1.24681.1.2.17.1.4.1
SNMP OK - "25.26 TB" |

Thanks,
Imran Khan.
Last edited by imran_khan on Thu Oct 16, 2014 10:02 am, edited 2 times in total.
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Monitor QNAP disk space in Nagios

Post by imran_khan »

Hello,

Any luck? I am stuck now.

Thanks,
Imran Khan.
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Monitor QNAP disk space in Nagios

Post by imran_khan »

Hello,

I have removed "use SNMP 6.0.1" and added "use Net::SNMP 6.0.1;" in plugin and now I am able to view the help but plugin is still not working. Please suggest me on the same.

root@localhost libexec]# ./check_qnap_volumes -H QNAP_Server_IP -w 80% -c 90% -t 10
Can't locate object method "new" via package "SNMP::Session" (perhaps you forgot to load "SNMP::Session"?) at ./check_qnap_volumes line 117.

Thanks,
Imran Khan.
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Monitor QNAP disk space in Nagios

Post by imran_khan »

Hello,

Any help?

Thanks,
Imran Khan.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Monitor QNAP disk space in Nagios

Post by slansing »

imran_khan,

As has been mentioned to you in the past, when you bump your posts with new ones, it puts you lower on our list as your last reply time is what we look at. Continuously asking for updates does nothing to get them faster.



Now that you hopefully understand that, have you actually tried specifying a valid warning and critical flag set? The one you showed us is not going to work, you had no space between "-c" and ":85"..... Try a more basic value first:

Code: Select all

/usr/local/nagios/libexec/check_snmp -H 192.168.168.210 -C hidden -o .1.3.6.1.4.1.24681.1.2.17.1.4.1 -w 80 -c 85
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Monitor QNAP disk space in Nagios

Post by imran_khan »

Hello,

Corrected the command in previous post. Also I am trying the below mentioned command and getting same output.

[root@localhost ~]# /usr/local/nagios/libexec/check_snmp -H QNAP_IP -C abc -o .1.3.6.1.4.1.24681.1.2.17.1.4.1 -w 80 -c 85
SNMP OK - "25.26 TB" |

[root@localhost ~]# /usr/local/nagios/libexec/check_snmp -H QNAP_IP -C abc -o .1.3.6.1.4.1.24681.1.2.17.1.4.1
SNMP OK - "25.26 TB" |

Thanks,
Imran Khan.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Monitor QNAP disk space in Nagios

Post by lmiltchev »

Can you try using a warning or a critical value that would produce a "non-ok state" output? In both examples, you have "OK" state.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked