Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

  • Pandora 776 vmware_check.pl

    Posted by Luca on June 26, 2024 at 12:02

    Hi 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 1 week, 6 days ago 2 Members · 14 Replies
  • 14 Replies
  • vic

    Administrator
    June 27, 2024 at 08:24
    1426 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    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.

    • Luca

      Member
      June 27, 2024 at 09:46
      429 Karma points
      Community rank: tentacle-noob-1 Tentacle noob
      Like it
      Up
      0
      Down
      Drop it
      ::

      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

  • vic

    Administrator
    June 27, 2024 at 09:53
    1426 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    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.

    • Luca

      Member
      June 27, 2024 at 10:07
      429 Karma points
      Community rank: tentacle-noob-1 Tentacle noob
      Like it
      Up
      0
      Down
      Drop it
      ::

      Hi @vic,

      the machine has 16gb of ram and 8vCPU with 4 cores per socket, so 2 sockets.

      in the morning i will try again the command line execution and put the output here.

      Thanks for the support

      BR

      • This reply was modified 3 weeks ago by  Luca.
      • Luca

        Member
        June 27, 2024 at 10:37
        429 Karma points
        Community rank: tentacle-noob-1 Tentacle noob
        Like it
        Up
        0
        Down
        Drop it
        ::

        @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

  • Luca

    Member
    June 27, 2024 at 17:44
    429 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Maybe this plugin is not supported?

    BR

  • Luca

    Member
    June 28, 2024 at 12:04
    429 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Anyone?

    Thanks

  • vic

    Administrator
    July 3, 2024 at 11:28
    1426 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    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.

  • Luca

    Member
    July 3, 2024 at 15:23
    429 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    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

  • vic

    Administrator
    July 4, 2024 at 09:26
    1426 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hi Luca,

    Does the Discovery server ultimately do the same thing, or how are you running it?

    Manually it should not return any errors.

    Version 777LTS is already available, but we don’t know if the bug will be fixed.

    Best regards,
    Víc.

    • Luca

      Member
      July 4, 2024 at 16:13
      429 Karma points
      Community rank: tentacle-noob-1 Tentacle noob
      Like it
      Up
      0
      Down
      Drop it
      ::

      Hi @vic ,

      I have verified that this bug has been present since version 774. I have test in this versin 774,775 e 776. I will try also with version 777 and i will update this discussion.

      But with any possibility it is probably a Pandora FMS bug.

      Thanks for the support

      BR

  • vic

    Administrator
    July 5, 2024 at 09:42
    1426 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hi Luca,

    Could you attach a screenshot of running the plugin “vmware_check.pl” manually to see what errors you get?

    Best regards,
    Víc.

    • Luca

      Member
      July 5, 2024 at 13:45
      429 Karma points
      Community rank: tentacle-noob-1 Tentacle noob
      Like it
      Up
      0
      Down
      Drop it
      ::

      Hello @vic ,

      i don’t see any errors and i’m not able to debug a pl script.

      Thanks

      BR

  • vic

    Administrator
    July 5, 2024 at 15:58
    1426 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hi Luca,

    I’m afraid it’s due to some problem with the plugin, as no error or successful output is returned on execution.

    You will have to check the plugin.

    We cannot take any action if the plugin is not provided by us.

    Best regards,
    Víc.