@vic
For example , this is the script for monitoring CPU Usage.
#!/bin/bash
HOST=$2
USERNAME=$4
PARL=/usr/bin/perl
AUTHFILE=/etc/pandora/plugins/lib/vmware_esxi.auth
COMMAND=cpu
# runtime
# cpu
# mem
FINDSTRING="cpu_usage="
STOPSTRING="%"
$PERL /etc/pandora/plugins/lib/vmware_checks.pl -f $AUTHFILE -H $HOST -l $COMMAND -s usage | awk -F"$FINDSTRING" '{print $2}' |sed 's/'"$STOPSTRING"'.*//'
When i run via bash -x for debug
bash -x -vvv /etc/pandora/plugins/vmware_host_NICs.sh -H xxxxx -u xxxxx -p xxxxxx
which () { ( alias;
eval ${which_declare} ) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@
}
#!/bin/bash
HOST=$2
+ HOST=xxxxxx
USERNAME=$4
+ USERNAME=xxxxxx
PASSWORD=$6
+ PASSWORD=xxxxxx
PERL=/usr/bin/perl
+ PERL=/usr/bin/perl
AUTHFILE=/etc/pandora/plugins/lib/vmware_esxi.auth
+ AUTHFILE=/etc/pandora/plugins/lib/vmware_esxi.auth
COMMAND=net
+ COMMAND=net
# runtime
# cpu
# mem
FINDSTRING="Bad_NICs="
+ FINDSTRING=Bad_NICs=
STOPSTRING=";;"
+ STOPSTRING=';;'
$PERL /etc/pandora/plugins/lib/vmware_checks.pl -f $AUTHFILE -H $HOST -l $COMMAND | awk -F"$FINDSTRING" '{print $2}' |sed 's/'"$STOPSTRING"'.*//'
+ awk -FBad_NICs= '{print $2}'
+ /usr/bin/perl /etc/pandora/plugins/lib/vmware_checks.pl -f /etc/pandora/plugins/lib/vmware_esxi.auth -H xxxxx -l net
+ sed 's/;;.*//'
Nagios::Plugin is deprecated, use Monitoring::Plugin instead. at /usr/share/perl5/vendor_perl/Nagios/Plugin/Functions.pm line 14.
But this output is the same for the pandora production that function correctly.
Thanks for the support again
BR