Welcome to Pandora FMS Community!

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

Welcome to Pandora FMS Community Forums Community support Advanced troubleshooting Plugin/Module doesn’t take care of variable (macro?) _fieldX_

  • Plugin/Module doesn’t take care of variable (macro?) _fieldX_

    Posted by Mystikal57 on January 22, 2019 at 13:18

    Hello,

    In declaration of Plugin,  i use plugin parameters with macro:
    ex: -H _field1_ -m _field2_

    My module will execute the plugin command like that:
    /usr/share/pandora_server/util/plugin/wmi_remoto_v1r1.pl -H _field1_ -m _field2_

    it doesn’t replace _field1_ by value.

    I tested with edit wmi_remoto_v1r1.pl to write argument in file, and value doesn’t appear, just macro: _fieldX_

    Mystikal57 replied 5 years, 9 months ago 3 Members · 12 Replies
  • 12 Replies
  • Like it
    Up
    0
    Down
    Drop it
    ::

    Unknown Member

    Moderator
    January 23, 2019 at 12:28

    Hello,

    In declaration of Plugin,  i use plugin parameters with macro:
    ex: -H _field1_ -m _field2_

    My module will execute the plugin command like that:
    /usr/share/pandora_server/util/plugin/wmi_remoto_v1r1.pl -H _field1_ -m _field2_

    it doesn’t replace _field1_ by value.

    I tested with edit wmi_remoto_v1r1.pl to write argument in file, and value doesn’t appear, just macro: _fieldX_

    Good morning Mystikal57,

    Have you configured the plugins as follows:

    Plugin command : /usr/share/pandora_server/util/plugin/wmi_remoto_v1r1.pl
    Plugin parameters: -H _field1_ -m _field2_

    Alberto

  • Mystikal57

    Member
    January 23, 2019 at 12:36
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hello,

    In declaration of Plugin,  i use plugin parameters with macro:
    ex: -H _field1_ -m _field2_

    My module will execute the plugin command like that:
    /usr/share/pandora_server/util/plugin/wmi_remoto_v1r1.pl -H _field1_ -m _field2_

    it doesn’t replace _field1_ by value.

    I tested with edit wmi_remoto_v1r1.pl to write argument in file, and value doesn’t appear, just macro: _fieldX_

    Good morning Mystikal57,

    Have you configured the plugins as follows:

    Plugin command : /usr/share/pandora_server/util/plugin/wmi_remoto_v1r1.pl
    Plugin parameters: -H _field1_ -m _field2_

    Alberto

    yes

  • Like it
    Up
    0
    Down
    Drop it
    ::

    Unknown Member

    Moderator
    January 23, 2019 at 12:58

    Hello,

    In declaration of Plugin,  i use plugin parameters with macro:
    ex: -H _field1_ -m _field2_

    My module will execute the plugin command like that:
    /usr/share/pandora_server/util/plugin/wmi_remoto_v1r1.pl -H _field1_ -m _field2_

    it doesn’t replace _field1_ by value.

    I tested with edit wmi_remoto_v1r1.pl to write argument in file, and value doesn’t appear, just macro: _fieldX_

    Good morning Mystikal57,

    Have you configured the plugins as follows:

    Plugin command : /usr/share/pandora_server/util/plugin/wmi_remoto_v1r1.pl
    Plugin parameters: -H _field1_ -m _field2_

    Alberto

    yes

    Good morning Mystikal57,

    Can you please attach me a screenshot of: the configuration of the plugin (In servers-> plugin), and a screenshot of the configuration of the module that uses the plugin.

    Alberto

  • Mystikal57

    Member
    January 23, 2019 at 13:12
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hello,

    In declaration of Plugin,  i use plugin parameters with macro:
    ex: -H _field1_ -m _field2_

    My module will execute the plugin command like that:
    /usr/share/pandora_server/util/plugin/wmi_remoto_v1r1.pl -H _field1_ -m _field2_

    it doesn’t replace _field1_ by value.

    I tested with edit wmi_remoto_v1r1.pl to write argument in file, and value doesn’t appear, just macro: _fieldX_

    Good morning Mystikal57,

    Have you configured the plugins as follows:

    Plugin command : /usr/share/pandora_server/util/plugin/wmi_remoto_v1r1.pl
    Plugin parameters: -H _field1_ -m _field2_

    Alberto

    yes

    Good morning Mystikal57,

    Can you please attach me a screenshot of: the configuration of the plugin (In servers-> plugin), and a screenshot of the configuration of the module that uses the plugin.

    Alberto

    Hello,

    This configuration works with centos appliance.

  • Like it
    Up
    0
    Down
    Drop it
    ::

    Unknown Member

    Moderator
    January 24, 2019 at 15:22

    Hello,

    In declaration of Plugin,  i use plugin parameters with macro:
    ex: -H _field1_ -m _field2_

    My module will execute the plugin command like that:
    /usr/share/pandora_server/util/plugin/wmi_remoto_v1r1.pl -H _field1_ -m _field2_

    it doesn’t replace _field1_ by value.

    I tested with edit wmi_remoto_v1r1.pl to write argument in file, and value doesn’t appear, just macro: _fieldX_

    Good morning Mystikal57,

    Have you configured the plugins as follows:

    Plugin command : /usr/share/pandora_server/util/plugin/wmi_remoto_v1r1.pl
    Plugin parameters: -H _field1_ -m _field2_

    Alberto

    yes

    Good morning Mystikal57,

    Can you please attach me a screenshot of: the configuration of the plugin (In servers-> plugin), and a screenshot of the configuration of the module that uses the plugin.

    Alberto

    Hello,

    This configuration works with centos appliance.

    Good morning Mystikal57,

    We will try to replicate your error, was it debian right? in centos works perfectly?

    Alberto

  • Mystikal57

    Member
    January 24, 2019 at 17:29
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Good morning Mystikal57,

    Have you configured the plugins as follows:

    Plugin command : /usr/share/pandora_server/util/plugin/wmi_remoto_v1r1.pl
    Plugin parameters: -H _field1_ -m _field2_

    Alberto

    yes

    Good morning Mystikal57,

    Can you please attach me a screenshot of: the configuration of the plugin (In servers-> plugin), and a screenshot of the configuration of the module that uses the plugin.

    Alberto

    Hello,

    This configuration works with centos appliance.

    Good morning Mystikal57,

    We will try to replicate your error, was it debian right? in centos works perfectly?

    Alberto

    Hello,

    Yes Debian 9
    It works good on centos, i have a lot of others bugs with centos but not the object of this thread 🙂

  • Like it
    Up
    0
    Down
    Drop it
    ::

    Unknown Member

    Moderator
    January 25, 2019 at 14:15

    yes

    Good morning Mystikal57,

    Can you please attach me a screenshot of: the configuration of the plugin (In servers-> plugin), and a screenshot of the configuration of the module that uses the plugin.

    Alberto

    Hello,

    This configuration works with centos appliance.

    Good morning Mystikal57,

    We will try to replicate your error, was it debian right? in centos works perfectly?

    Alberto

    Hello,

    Yes Debian 9
    It works good on centos, i have a lot of others bugs with centos but not the object of this thread 🙂

    Good morning Mystikal57,

    We are concerned that we are having problems with debian macros.. wil try to fix it as soon as possible.

    Alberto

  • Mystikal57

    Member
    January 25, 2019 at 17:18
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Good morning Mystikal57,

    Can you please attach me a screenshot of: the configuration of the plugin (In servers-> plugin), and a screenshot of the configuration of the module that uses the plugin.

    Alberto

    Hello,

    This configuration works with centos appliance.

    Good morning Mystikal57,

    We will try to replicate your error, was it debian right? in centos works perfectly?

    Alberto

    Hello,

    Yes Debian 9
    It works good on centos, i have a lot of others bugs with centos but not the object of this thread 🙂

    Good morning Mystikal57,

    We are concerned that we are having problems with debian macros.. wil try to fix it as soon as possible.

    Alberto

    Good news, i’m not alone 🙂

    Thank you

  • jose.almendros

    Member
    February 4, 2019 at 17:44
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hello,

    This configuration works with centos appliance.

    Good morning Mystikal57,

    We will try to replicate your error, was it debian right? in centos works perfectly?

    Alberto

    Hello,

    Yes Debian 9
    It works good on centos, i have a lot of others bugs with centos but not the object of this thread 🙂

    Good morning Mystikal57,

    We are concerned that we are having problems with debian macros.. wil try to fix it as soon as possible.

    Alberto

    Good news, i’m not alone 🙂

    Thank you

    Hello Mystikal57,

    On Debian, try to change in /usr/lib/perl5/PandoraFMS/PluginServer.pm, line 182:

    This line: my $macros = decode_json(encode_utf8($module->{‘macros’}));

    For this one: my $macros = JSON->new->allow_nonref->decode(encode_utf8($module->{‘macros’}));

    Restart pandora server and try to use macros in plugin declaration again.

    Regards.

  • Mystikal57

    Member
    February 4, 2019 at 18:08
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Good morning Mystikal57,

    We will try to replicate your error, was it debian right? in centos works perfectly?

    Alberto

    Hello,

    Yes Debian 9
    It works good on centos, i have a lot of others bugs with centos but not the object of this thread 🙂

    Good morning Mystikal57,

    We are concerned that we are having problems with debian macros.. wil try to fix it as soon as possible.

    Alberto

    Good news, i’m not alone 🙂

    Thank you

    Hello Mystikal57,

    On Debian, try to change in /usr/lib/perl5/PandoraFMS/PluginServer.pm, line 182:

    This line: my $macros = decode_json(encode_utf8($module->{‘macros’}));

    For this one: my $macros = JSON->new->allow_nonref->decode(encode_utf8($module->{‘macros’}));

    Restart pandora server and try to use macros in plugin declaration again.

    Regards.

    i tested a few thing with this line before opening issue, but i hadn’t the good syntax 😉

    Sorry could not test, because i am on the centos appliance now.

  • jose.almendros

    Member
    February 5, 2019 at 14:43
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hello Mystikal57,

    Ok, if you finally can test in your environment don’t hesitate in contact with us and tell if it works.

    Please, do take a few minutes to write a Pandora FMS review in order to help us continue monitoring systems… https://bit.ly/2S9Y2kp

    Thank you for your time!

    Regards

  • Mystikal57

    Member
    February 5, 2019 at 16:38
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hello Mystikal57,

    Ok, if you finally can test in your environment don’t hesitate in contact with us and tell if it works.

    Please, do take a few minutes to write a Pandora FMS review in order to help us continue monitoring systems… https://bit.ly/2S9Y2kp

    Thank you for your time!

    Regards

    Hello, 

    i left a review ;–)