Ad Widget

Collapse

Zabbix Agent2 External Plugin Question / Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MvandeG
    Junior Member
    • Apr 2022
    • 2

    #1

    Zabbix Agent2 External Plugin Question / Error

    Greetings,

    I'm trying to write out a Zabbix Agent2 Plugin in GoLang, therefore I've been looking up some tutorials and tried out some like:
    Howto: https://git.zabbix.com/projects/WEB/...gins/how_to.md
    Zabbix Fora: https://www.zabbix.com/forum/zabbix-...able-go-plugin
    Zabbix Git: https://git.zabbix.com/projects/ZBX/.../external/test

    Running above resulted in the following error:
    Code:
    # zabbix_agent2 -t myip
    2023/02/23 15:06:15.335351 cannot register plugins: failed to parse agent version strconv.Atoi: parsing "6.2.7": invalid syntax
    zabbix_agent2 [50069]: ERROR: cannot register plugins: failed to parse agent version strconv.Atoi: parsing "6.2.7": invalid syntax​
    What am I doing wrong or is there something wrong with the (int)conversion in the agent?

    What Am I using:
    • Zabbix Agent2 6.2.7 (via rpm)
    • CentOS Stream 9
    • GoLang go1.19.4 linux/amd64
    Thanks in advance!
  • mednbiba
    Junior Member
    • Feb 2023
    • 1

    #2
    I am facing the same problem, i first tried the build the mongodb plugin then the myip example in the documentation and faced the same errors.
    2023/02/24 16:18:11.424914 cannot register plugins: failed to parse agent version strconv.Atoi: parsing "6.2.7": invalid syntax
    zabbix_agent2 [3983]: ERROR: cannot register plugins: failed to parse agent version strconv.Atoi: parsing "6.2.7": invalid syntax




    Comment

    • ronaldocb
      Junior Member
      • Sep 2022
      • 2

      #3
      I installed Postgres plugin zabbix-agent2-plugin-postgresql_1.2.0-1+debian11_amd64.deb and I am facing the same problem.

      2023/03/02 17:20:29.828075 cannot register plugins: failed to parse agent version strconv.Atoi: parsing "6.2.7": invalid syntax
      zabbix_agent2 [1566485]: ERROR: cannot register plugins: failed to parse agent version strconv.Atoi: parsing "6.2.7": invalid syntax

      Comment

      • Mikhail_Vasilyeu
        Junior Member
        • Jan 2023
        • 5

        #4
        The same issue. Checked with zabbix_agent2 6.0.13 and 6.2.7 + self-written​ plugin based on the example.

        zabbix_agent2[1714321]: 2023/03/03 10:55:12.492816 cannot register plugins: failed to parse agent version strconv.Atoi: parsing "6.0.13": invalid syntax
        zabbix_agent2[1714321]: zabbix_agent2 [1714321]: ERROR: cannot register plugins: failed to parse agent version strconv.Atoi: parsing "6.0.13": invalid syntax​

        Issue exists only with loadable plugin. Built-in plugin work as expected after the agent compiling.

        Comment

        • MvandeG
          Junior Member
          • Apr 2022
          • 2

          #5
          I've created a ticket on their support environment if you're interested: https://support.zabbix.com/browse/ZBX-22422

          Comment

          Working...