Bienvenido a la comunidad de Pandora FMS › Forums › Community support › Advanced troubleshooting › Pandora 776 vmware_check.pl
-
Pandora 776 vmware_check.pl
Posted by Luca on junio 26, 2024 at 12:02Hi team,
I have successfully upgraded pandora fms to 776.
I have many custom plugins that use /etc/pandora/plugins/lib/vmware_checks.pl in the script to monitor some ESXi servers. This monitoring was working fine before the pandora instance upgrade. I do not know why after the upgrade this check still does not work.
NOTE: the mysql db has been upgraded to version 8.
Many thanks for the support
BR
vic replied 4 months, 3 weeks ago 2 Members · 14 Replies -
14 Replies
-
::
Hi Luca,
Have you tried launching the plugin manually to see if there are any errors?
Can you check that there is no queuing in the “/var/spool/pandora/data_in” directory?
The internal servers are stable in the Pandora FMS servers view in the console?
Do you know if there is any error in the server log that refers to restarts or shutdowns of the service?
Best regards,
Víc.-
::
Hi @vic ,
I have two instances of Pandora FMS Server, one production and one test. The test instance has been upgraded to version 776, while the production instance is at version 772.
The checks fail as the mysql instance has been upgraded to version 8. I also tried with version 777 but the result is the same.
Running the script from the command line, I have the same result on both the production instance (772) and the test instance (776).
The internal server is stable in the Pandora FMS server view in the console.
In the logs I do not see any particular errors when restarting the service for the check there are in failed status but for the checks there are in unknow status i see this error:
ProducerConsumerServer: xxxx [V3] [ERROR] Undefined value returned by plug-in module ‘ESXi NICs bad’ in agent whith name ‘xxx’ and alias ‘xxxx’. Is the server out of memory?
2024-06-27 09:42:19 ProducerConsumerServer: xxxx [V3] [ERROR] Undefined value returned by plug-in module ‘CPU:load%’ in agent whith name ‘xxxxx’ and alias ‘xxxxx’. Is the server out of memory?
2024-06-27 09:42:19 ProducerConsumerServer: xxxx [V3] [ERROR] Undefined value returned by plug-in module ‘ESXi:VM_Running’ in agent whith name ‘xxxxx’ and alias ‘xxxxx’. Is the server out of memory?
2024-06-27 09:43:19 ProducerConsumerServer: xxxxx [V3] [ERROR] Undefined value returned by plug-in module ‘CPU:load%’ in agent whith name ‘xxxx’ and alias ‘xxxx’. Is the server out of memory?In the console I only see a “cannot access api” error, I don’t know if that could have anything to do with the problem.
In the “/var/spool/pandora/data_in” there isn’t a queuing directory
Thanks for the support
BR
-
-
::
Hi Luca,
Can you tell us what failure you are getting when you launch the script manually in the terminal?
The logs indicate that there is some module returning data that is not compatible with the module type.
At the machine level, do you have enough resources?
As for the API, you can do the “get test” to check access, but this does not affect the discovery task.
Best regards,
Víc.-
-
::
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
# memFINDSTRING=”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
# memFINDSTRING=”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
-
-
-
-
-
::
Hi Luca,
Have you edited the plugin?
Please note that updating Pandora FMS does not affect the operation of the plugin.
In any case it could be updated, if you want you can download the .tar.gz file from the Pandora FMS server and check that nothing has been changed at plugin level.
You can use a previous version of the plugin.
Best regards,
Vic. -
::
Hello @vic ,
I don’t have edited the plugin.
I checked the vmware_check.pl file before running the Pandora FMS update and after running the update. I ran this check with the diff command and the two scripts are the same, as are the permissions.
I noticed that when running from the Pandora server that is running I see the authentication logs to the esxi host, while when I run it on the updated Pandora the login attempts are not there.At this point I think it is a bug in the 776 version of Pandora. What are your thoughts on this?
maybe I just have to wait for the new LTS version, can you tell me what it will be and when it will be available?
Thanks in advance
BR
-
-
-
-
-