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.
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
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
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.