Configuring Nagios Cross Platform Agent (NCPA)

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
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post by lmiltchev »

You are not going to find man pages for wmi plus. To review the usage, just run from the CLI:

Code: Select all

/path/to/the/plugins/directory/check_wmi_plus.pl -h
Be sure to check out our Knowledgebase for helpful articles and solutions!
clombardo
Posts: 41
Joined: Thu Mar 06, 2014 12:36 pm

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post by clombardo »

When I run this command I get this:

Code: Select all

[root@develop plugins]# check_wmi_plus.pl -h
-bash: check_wmi_plus.pl: command not found
Attached text file list all perl modules installed. Any ideas what is the issue?
Attachments
perl_installed_modules.txt
(142.82 KiB) Downloaded 525 times
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post by lgroschen »

try this:

Code: Select all

/usr/local/nagios/libexec/check_wmi_plus.pl -h
/Luke
clombardo
Posts: 41
Joined: Thu Mar 06, 2014 12:36 pm

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post by clombardo »

That directory does not exist in our server. Here is the directory where Nagios Core is installed:

Code: Select all

[code][root@develop ~]# cd /usr/lib64/nagios/
[root@develop nagios]# 
[root@develop nagios]# ls
cgi  plugins
[root@develop nagios]# cd plugins/
[root@develop plugins]# 
[root@develop plugins]# ls
check_apt       check_file_age      check_jabber       check_ntp       check_sensors  check_ups                   negate
check_breeze    check_flexlm        check_load         check_ntp_peer  check_simap    check_users                 tmp
check_by_ssh    check_ftp           check_log          check_ntp_time  check_smtp     check_wave                  urlize
check_clamd     check_hpjd          check_mailq        check_nwstat    check_snmp     check_wmi_plus.conf.sample  utils.pm
check_cluster   check_http          check_mrtg         check_oracle    check_spop     check_wmi_plus.d            utils.sh
check_dhcp      check_icmp          check_mrtgtraf     check_overcr    check_ssh      check_wmi_plus.data
check_dig       check_ide_smart     check_mysql_query  check_ping      check_ssmtp    check_wmi_plus.makeman.sh
check_disk      check_ifoperstatus  check_nagios       check_pop       check_swap     check_wmi_plus.pl
check_disk_smb  check_ifstatus      check_nntp         check_procs     check_tcp      check_wmi_plus.README.txt
check_dns       check_imap          check_nntps        check_real      check_time     event_generic.pl
check_dummy     check_ircd          check_nt           check_rpc       check_udp      eventhandlers
[root@develop plugins]# 
So what will I have to do in order to get wmi plus usage working?
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post by lgroschen »

in that directory can you do a ll -ls so we can see permissions. If the plugin is there just run it by ./<plugin-name> and if it is executable it will run.
/Luke
clombardo
Posts: 41
Joined: Thu Mar 06, 2014 12:36 pm

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post by clombardo »

Here is ll -ls result:

Code: Select all

[root@develop plugins]# ll -ls
total 3536
160 -rwxr-xr-x  1 nagios nagiocmd 161696 Nov  9  2013 check_apt
  4 -rwxr-xr-x. 1 nagios nagiocmd   2247 Nov  9  2013 check_breeze
 64 -rwxr-xr-x  1 nagios nagiocmd  64632 Nov  9  2013 check_by_ssh
  0 lrwxrwxrwx. 1 nagios nagiocmd      9 Mar  7  2014 check_clamd -> check_tcp
 48 -rwxr-xr-x  1 nagios nagiocmd  48256 Nov  9  2013 check_cluster
 64 -rwxr-xr-x  1 nagios nagiocmd  63384 Nov  9  2013 check_dhcp
 60 -rwxr-xr-x  1 nagios nagiocmd  59896 Nov  9  2013 check_dig
168 -rwxr-xr-x  1 nagios nagiocmd 170184 Nov  9  2013 check_disk
 12 -rwxr-xr-x. 1 nagios nagiocmd   9285 Nov  9  2013 check_disk_smb
 64 -rwxr-xr-x  1 nagios nagiocmd  63784 Nov  9  2013 check_dns
 40 -rwxr-xr-x  1 nagios nagiocmd  37544 Nov  9  2013 check_dummy
  4 -rwxr-xr-x. 1 nagios nagiocmd   3049 Nov  9  2013 check_file_age
  8 -rwxr-xr-x. 1 nagios nagiocmd   6311 Nov  9  2013 check_flexlm
  0 lrwxrwxrwx. 1 nagios nagiocmd      9 Mar  7  2014 check_ftp -> check_tcp
 60 -rwxr-xr-x  1 nagios nagiocmd  58920 Nov  9  2013 check_hpjd
240 -rwxr-xr-x  1 nagios nagiocmd 244744 Nov  9  2013 check_http
 68 -rwxr-xr-x  1 nagios nagiocmd  69536 Nov  9  2013 check_icmp
 52 -rwxr-xr-x  1 nagios nagiocmd  50640 Nov  9  2013 check_ide_smart
 16 -rwxr-xr-x. 1 nagios nagiocmd  15130 Nov  9  2013 check_ifoperstatus
 16 -rwxr-xr-x. 1 nagios nagiocmd  12591 Nov  9  2013 check_ifstatus
  0 lrwxrwxrwx. 1 nagios nagiocmd      9 Mar  7  2014 check_imap -> check_tcp
  8 -rwxr-xr-x. 1 nagios nagiocmd   6883 Nov  9  2013 check_ircd
  0 lrwxrwxrwx. 1 nagios nagiocmd      9 Mar  7  2014 check_jabber -> check_tcp
 52 -rwxr-xr-x  1 nagios nagiocmd  53184 Nov  9  2013 check_load
  8 -rwxr-xr-x. 1 nagios nagiocmd   6017 Nov  9  2013 check_log
 20 -rwxr-xr-x. 1 nagios nagiocmd  20280 Nov  9  2013 check_mailq
 52 -rwxr-xr-x  1 nagios nagiocmd  52384 Nov  9  2013 check_mrtg
 52 -rwxr-xr-x  1 nagios nagiocmd  50416 Nov  9  2013 check_mrtgtraf
 68 -rwxr-xr-x  1 nagios nagiocmd  69144 Nov  9  2013 check_mysql_query
 56 -rwxr-xr-x  1 nagios nagiocmd  53744 Nov  9  2013 check_nagios
  0 lrwxrwxrwx. 1 nagios nagiocmd      9 Mar  7  2014 check_nntp -> check_tcp
  0 lrwxrwxrwx. 1 nagios nagiocmd      9 Mar  7  2014 check_nntps -> check_tcp
 68 -rwxr-xr-x  1 nagios nagiocmd  67168 Nov  9  2013 check_nt
 68 -rwxr-xr-x  1 nagios nagiocmd  68032 Nov  9  2013 check_ntp
 64 -rwxr-xr-x  1 nagios nagiocmd  64200 Nov  9  2013 check_ntp_peer
 64 -rwxr-xr-x  1 nagios nagiocmd  63016 Nov  9  2013 check_ntp_time
 80 -rwxr-xr-x  1 nagios nagiocmd  80744 Nov  9  2013 check_nwstat
 12 -rwxr-xr-x. 1 nagios nagiocmd   8779 Nov  9  2013 check_oracle
 60 -rwxr-xr-x  1 nagios nagiocmd  58016 Nov  9  2013 check_overcr
 68 -rwxr-xr-x  1 nagios nagiocmd  67120 Nov  9  2013 check_ping
  0 lrwxrwxrwx. 1 nagios nagiocmd      9 Mar  7  2014 check_pop -> check_tcp
164 -rwxr-xr-x  1 nagios nagiocmd 165688 Nov  9  2013 check_procs
 56 -rwxr-xr-x  1 nagios nagiocmd  56288 Nov  9  2013 check_real
 12 -rwxr-xr-x. 1 nagios nagiocmd   9577 Nov  9  2013 check_rpc
  4 -rwxr-xr-x. 1 nagios nagiocmd   1451 Nov  9  2013 check_sensors
  0 lrwxrwxrwx. 1 nagios nagiocmd      9 Mar  7  2014 check_simap -> check_tcp
184 -rwxr-xr-x  1 nagios nagiocmd 186688 Nov  9  2013 check_smtp
208 -rwxr-xr-x  1 nagios nagiocmd 211024 Nov  9  2013 check_snmp
  0 lrwxrwxrwx. 1 nagios nagiocmd      9 Mar  7  2014 check_spop -> check_tcp
 56 -rwxr-xr-x  1 nagios nagiocmd  54088 Nov  9  2013 check_ssh
  0 lrwxrwxrwx. 1 nagios nagiocmd      9 Mar  7  2014 check_ssmtp -> check_tcp
 52 -rwxr-xr-x  1 nagios nagiocmd  49984 Nov  9  2013 check_swap
 76 -rwxr-xr-x  1 nagios nagiocmd  75840 Nov  9  2013 check_tcp
 56 -rwxr-xr-x  1 nagios nagiocmd  55712 Nov  9  2013 check_time
  0 lrwxrwxrwx. 1 nagios nagiocmd      9 Mar  7  2014 check_udp -> check_tcp
 64 -rwxr-xr-x  1 nagios nagiocmd  61704 Nov  9  2013 check_ups
 48 -rwxr-xr-x  1 nagios nagiocmd  46240 Nov  9  2013 check_users
  4 -rwxr-xr-x. 1 nagios nagiocmd   2932 Nov  9  2013 check_wave
  8 -rwxr-xr-x  1 nagios nagios     5737 Aug 23 00:49 check_wmi_plus.conf.sample
  4 drwxr-xr-x  2 root   root       4096 Jan 19 14:19 check_wmi_plus.d
  4 drwxr-xr-x  2 nagios nagios     4096 Aug 23 00:49 check_wmi_plus.data
 12 -rwxr-xr-x  1 nagios nagios    11921 May  8  2013 check_wmi_plus.makeman.sh
324 -rwxr-xr-x  1 nagios nagios   329097 Aug 23 00:49 check_wmi_plus.pl
112 -rwxr-xr-x  1 nagios nagios   111532 Aug 23 00:49 check_wmi_plus.README.txt
 16 -rwxr-xr-x  1 nagios nagios    15960 Mar 13  2013 event_generic.pl
  4 drwxr-xr-x. 4 root   root       4096 Mar  7  2014 eventhandlers
 56 -rwxr-xr-x  1 nagios nagiocmd  54880 Nov  9  2013 negate
  4 drwxr-xr-x  4 root   root       4096 Jan 20 12:30 tmp
 52 -rwxr-xr-x  1 nagios nagiocmd  51192 Nov  9  2013 urlize
  4 -rwxr-xr-x. 1 nagios nagiocmd   1919 Nov  9  2013 utils.pm
  4 -rwxr-xr-x. 1 nagios nagiocmd   2917 Nov  9  2013 utils.sh
[root@develop plugins]# 
So what will I have to do in order to get wmi plus usage working?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post by tgriep »

You should get the usage of the command if you run the following.

Code: Select all

cd /usr/lib64/nagios/plugins
./check_wmi_plus.pl --help
 
Be sure to check out our Knowledgebase for helpful articles and solutions!
clombardo
Posts: 41
Joined: Thu Mar 06, 2014 12:36 pm

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post by clombardo »

When I run this here is what I get:

Code: Select all

[root@develop ~]# cd /usr/lib64/nagios/plugins
[root@develop plugins]# ./check_wmi_plus.pl --help
Can't locate Number/Format.pm in @INC (@INC contains: /usr/lib/nagios/plugins /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_wmi_plus.pl line 55.
BEGIN failed--compilation aborted at ./check_wmi_plus.pl line 55.
[root@develop plugins]# 
Looks like I am missing some perl pluggin? So what do I need to do?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post by abrist »

You need the perl-Number-Format package:

Code: Select all

yum install  perl-Number-Format
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
clombardo
Posts: 41
Joined: Thu Mar 06, 2014 12:36 pm

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post by clombardo »

When I try to install this rpm this is what happens:

Code: Select all

[root@develop ~]# ls
perl-Number-Format-1.73-3.el6.noarch.rpm

[root@develop ~]# rpm -Uvh perl-Number-Format-1.73-3.el6.noarch.rpm 
warning: perl-Number-Format-1.73-3.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                ########################################### [100%]
   1:perl-Number-Format     ########################################### [100%]
[root@develop ~]# yum install perl-Number-Format
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirror.atlanticmetro.net
 * extras: centos.mia.host-engine.com
 * updates: mirrors.tripadvisor.com
Nothing to do
[root@develop ~]# 
yum says nothing to do, any ideas?
Locked