Box293 Checks new config having some concerns

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.
Locked
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Box293 Checks new config having some concerns

Post by kwhogster »

To All

I recently upgraded to vCenter 6.7 and ESXI host 6.7

I also upgrade box293 to MSW

My vcenter has a datacenter and a cluster setup.

The box293 checks for my cluster does not work

And one check for my guests does not work listed below.

Code: Select all

nagios@tgcs017:/usr/local/nagios/libexec$ ./check_by_ssh -E 1 -l vi-admin -H 10.2.8.74 -C "~/box293_check_vmware.pl --check Guest_Snapshot --server 10.2.8.111 --datacenter "Datacenter-TGCSNET" --warning snapshot_age:5 --critical snapshot_age:15"

CRITICAL: communication with the VMware API failed after 2 retries.

Code: Select all

nagios@tgcs017:/usr/local/nagios/libexec$  ./check_by_ssh -E 1 -l vi-admin -H 10.2.8.74 -C "~/box293_check_vmware.pl --check Cluster_CPU_Usage --server 10.2.8.11 --cluster "TGCSNET-Vcenter1-Cluster""
UNKNOWN: Cluster 'TGCSNET-Vcenter1-Cluster' not found

nagios@tgcs017:/usr/local/nagios/libexec$ ./check_by_ssh -E 1 -l vi-admin -H 10.2.8.74 -C "~/box293_check_vmware.pl --check Cluster_HA_Status --server 10.2.8.111 --cluster  TGCSNET-Vcenter1-Cluster"
UNKNOWN: Cluster 'TGCSNET-Vcenter1-Cluster' not found
It seems like it can not find the cluster?

Snapshot of my vcenter below
vcenter.PNG
vcenter.PNG (10.46 KiB) Viewed 3225 times

Any ideas or suggestions

Thank you

Tom
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Box293 Checks new config having some concerns

Post by ssax »

For the first one, do this and send the output:

Code: Select all

ssh vi-admin@10.2.8.74
~/box293_check_vmware.pl --server 10.2.8.111 --check vCenter_Name_Version
For the other ones, please run them with the debug option set:

Code: Select all

./check_by_ssh -E 1 -l vi-admin -H 10.2.8.74 -C "~/box293_check_vmware.pl --check Cluster_CPU_Usage --server 10.2.8.11 --cluster TGCSNET-Vcenter1-Cluster --debug
Thank you
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Box293 Checks new config having some concerns

Post by kwhogster »

Thanks here are my results

nagios@tgcs017:/usr/local/nagios/etc/objects$ ssh vi-admin@10.2.8.74
Last login: Fri Apr 10 13:07:20 2020 from nagios.our.network.tgcsnet.com
~/box293_check_vmware.pl --server 10.2.8.111 --check vCenter_Name_Version[vi-admin@tgcs018 ~]$ ~/box293_check_vmware.pl --server 10.2.8.111 --check vCenter_Name_Version
UNKNOWN: This check only works when connected to a vCenter server, you are connected directly to an ESX(i) host, aborting!

#2

nagios@tgcs017:/usr/local/nagios/libexec$ ./check_by_ssh -E 1 -l vi-admin -H 10.2.8.74 -C "~/box293_check_vmware.pl --check Cluster_CPU_Usage --server 10.2.8.11 --cluster "TGCSNET-Vcenter1-Cluster" --debug"
Line 556 Script started @ Fri Apr 10 21:32:00 2020
Line 557 $current_version: '2017-01-25'
Line 558 $pre_flight_checks: '0'
Line 592 --check argument is supplied and is 'Cluster_CPU_Usage', proceeding.
Line 606 --server argument is supplied and is '10.2.8.11', proceeding.
Line 623 Running Checks: '0'
Line 624 Total Checks: '-1'
Line 625 Concurrent Checks: '15'
Line 639 Total number of concurrent checks NOT exceeded, proceeding.
Line 13773 $good_to_go_check: '0'
Line 13318 Thresholds_Test
Line 12119 SI_Test
Line 13805 $good_to_go_check == 0
Line 13806 About to connect
Line 13812 defined($connection
Line 13813 Connected
Line 10958 Perfdata_Option_Get
Line 13817 %Perfdata_Options: '0'
Line 10751 Modifiers_Get
Line 10805 @Modifiers_Supplied_Local: '0'
Line 13821 @Modifiers_Supplied_Global: '0'
Line 6266 Guest_Snapshot
Line 6268 $snapshot_request: 'Exclude Snapshot - Get'
Line 6280 option --exclude_snapshot was NOT set
Line 13825 @Exclude_Snapshot_Supplied: '0'
Line 13829 Running check: 'Cluster_CPU_Usage'
Line 2421 Cluster_Select
Line 2426 Cluster_Select @target_properties: '4'
Line 2427 Cluster_Select @target_properties values: 'summary.numCpuCores, summary.effectiveCpu, summary.totalCpu, host'
Line 2438 $cluster_name provided via --cluster: 'TGCSNET-Vcenter1-Cluster'
Line 2468 $target_cluster_view: ''
Line 14584 About to disconnect
Line 14589 Disconnected
Line 14608 Script ended @ Fri Apr 10 21:32:09 2020
Line 14609 Script running time: 9 seconds
Line 14612 Exit Message: 'UNKNOWN: Cluster 'TGCSNET-Vcenter1-Cluster' not found'
Line 14613 Exit Code: '3'
Line 14614 Script ended @ Fri Apr 10 21:32:09 2020
UNKNOWN: Cluster 'TGCSNET-Vcenter1-Cluster' not found

Hope this helps

Thank you

Tom
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Box293 Checks new config having some concerns

Post by ssax »

Is 10.2.8.111 your vcenter server IP or the esxi host? Please change it to your vcenter IP (not the esxi host)
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Box293 Checks new config having some concerns

Post by kwhogster »

10.2.8.111 is my ESXI Host

10.2.8.11 is the VCSA Vcenter Ip address

nagios@tgcs017:/usr/local/nagios/libexec$ ./check_by_ssh -E 1 -l vi-admin -H 10.2.8.74 -C "~/box293_check_vmware.pl --check Cluster_CPU_Usage --server 10.2.8.11 --cluster "TGCSNET-Vcenter1-Cluster" --debug"
Line 556 Script started @ Fri Apr 10 22:34:52 2020
Line 557 $current_version: '2017-01-25'
Line 558 $pre_flight_checks: '0'
Line 592 --check argument is supplied and is 'Cluster_CPU_Usage', proceeding.
Line 606 --server argument is supplied and is '10.2.8.11', proceeding.
Line 623 Running Checks: '0'
Line 624 Total Checks: '-1'
Line 625 Concurrent Checks: '15'
Line 639 Total number of concurrent checks NOT exceeded, proceeding.
Line 13773 $good_to_go_check: '0'
Line 13318 Thresholds_Test
Line 12119 SI_Test
Line 13805 $good_to_go_check == 0
Line 13806 About to connect
Line 13812 defined($connection
Line 13813 Connected
Line 10958 Perfdata_Option_Get
Line 13817 %Perfdata_Options: '0'
Line 10751 Modifiers_Get
Line 10805 @Modifiers_Supplied_Local: '0'
Line 13821 @Modifiers_Supplied_Global: '0'
Line 6266 Guest_Snapshot
Line 6268 $snapshot_request: 'Exclude Snapshot - Get'
Line 6280 option --exclude_snapshot was NOT set
Line 13825 @Exclude_Snapshot_Supplied: '0'
Line 13829 Running check: 'Cluster_CPU_Usage'
Line 2421 Cluster_Select
Line 2426 Cluster_Select @target_properties: '4'
Line 2427 Cluster_Select @target_properties values: 'summary.numCpuCores, summary.effectiveCpu, summary.totalCpu, host'
Line 2438 $cluster_name provided via --cluster: 'TGCSNET-Vcenter1-Cluster'
Line 2468 $target_cluster_view: ''
Line 14584 About to disconnect
Line 14589 Disconnected
Line 14608 Script ended @ Fri Apr 10 22:34:57 2020
Line 14609 Script running time: 5 seconds
Line 14612 Exit Message: 'UNKNOWN: Cluster 'TGCSNET-Vcenter1-Cluster' not found'
Line 14613 Exit Code: '3'
Line 14614 Script ended @ Fri Apr 10 22:34:57 2020
UNKNOWN: Cluster 'TGCSNET-Vcenter1-Cluster' not found


Same thing happens no matter which I use

Any ideas

Thank you
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Box293 Checks new config having some concerns

Post by kwhogster »

OOPS
I figured it out
I have two vcenters and I had the ip address mixed up
when I used the correct ip address of the vcenter the checks all worked.

Now configuring the remainder

Thanks for all the help Please mark this as resolved.

Thank you

Tom
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Box293 Checks new config having some concerns

Post by scottwilkerson »

kwhogster wrote:OOPS
I figured it out
I have two vcenters and I had the ip address mixed up
when I used the correct ip address of the vcenter the checks all worked.

Now configuring the remainder

Thanks for all the help Please mark this as resolved.

Thank you

Tom
Great!

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked