Ad Widget

Collapse

ZBX_NOTSUPPORTED error even with direct UserParameter in zabbix_agentd.conf (v6.2.7)

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • pilotnite
    Junior Member
    • Mar 2025
    • 6

    #1

    ZBX_NOTSUPPORTED error even with direct UserParameter in zabbix_agentd.conf (v6.2.7)

    Hello all,

    I'm running into a strange issue with Zabbix Agent 6.2.7 compiled with --enable-agent --sysconfdir=/etc on an embedded Linux system (Yocto-based).

    I'm trying to test a simple UserParameter, but even with the key defined directly in /etc/zabbix/zabbix_agentd.conf, it returns unsupported:
    # grep -i UserParameter /etc/zabbix/zabbix_agentd.conf
    UserParameter=test.hello,echo hello

    # zabbix_agentd -t test.hello
    test.hello [m|ZBX_NOTSUPPORTED] [Unsupported item key.]

    Agent startup logs look clean:
    Zabbix Agent 6.2.7 (revision d7e8df54d76)
    using configuration file: /etc/zabbix/zabbix_agentd.conf
    ...
    agent #0 started [main process]
    ...
    agent #5 started [active checks #1]


    I’ve verified:
    • Agent is running with the correct config: /etc/zabbix/zabbix_agentd.conf
    • The UserParameter is defined directly in that file
    • Permissions on the file are correct
    • No duplicate keys exist
    • No related errors appear in /tmp/zabbix_agentd.log

    I've also tried defining test.hello inside zabbix_agentd.d/test.conf with Include=/etc/zabbix/zabbix_agentd.d/*.conf enabled — same result: ZBX_NOTSUPPORTED.

    Would really appreciate any insight into what else could cause this behavior, especially when the key is defined in the main config itself.

    Thanks in advance!

    Cheers,
    Nitesh
  • Answer selected by pilotnite at 30-07-2025, 22:56.
    pilotnite
    Junior Member
    • Mar 2025
    • 6


    Hi Markku,

    Just wanted to follow up — it turns out the UserParameter= is working correctly on its own.

    In my case, I simply needed to specify the configuration file explicitly when testing via the command line using zabbix_agentd. Here's a working example:
    Code:
    # zabbix_agentd -t modem.lte.rssi -c /etc/zabbix/zabbix_agentd.conf modem.lte.rssi
    [t|-78.00]
    So the configuration and UserParameter logic are functioning as expected; the issue was only related to manual testing without the -c flag.

    Thanks again for your guidance — much appreciated!

    Best regards,
    Nitesh

    Comment

    • Markku
      Senior Member
      Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
      • Sep 2018
      • 1781

      #2
      In the manual it says that the command is a "shell command". Is it possible that your system has some limitations on starting shells?

      Maybe increase the agent log level (in runtime or with DebugLevel) and test getting the item with zabbix_get, then you will get more information about the agent when it processes the item. Also test getting an undefined item like "test.hello2", if it gives you different output and leads you somewhere.

      Also "zabbix_agentd --print" should be checked that it contains your UserParameter item.

      Code:
      $ /usr/sbin/zabbix_agentd --print | grep hello
      test.hello                                    [t|hello]
      Markku

      Comment

      • pilotnite
        Junior Member
        • Mar 2025
        • 6

        #3
        Hi Markku,

        Thanks again for your help and suggestions.

        I wanted to share my findings after further testing the UserParameter behavior:

        The Zabbix agent is correctly configured with the following line in /etc/zabbix/zabbix_agentd.conf:
        UserParameter=test.hello,/bin/echo hello

        However, when I run:
        zabbix_agentd -t test.hello
        I receive:
        [m|ZBX_NOTSUPPORTED] [Unsupported item key.]

        But if I explicitly pass the config file, it works as expected:
        zabbix_agentd -t test.hello -c /etc/zabbix/zabbix_agentd.conf
        => [t|hello]
        zabbix_agentd -t test.hello2 -c /etc/zabbix/zabbix_agentd.conf
        => [m|ZBX_NOTSUPPORTED] [Unsupported item key.]
        zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf --print | grep hello
        => test.hello [t|hello]

        This indicates that, despite the agent being installed with the correct config path (/etc/zabbix/zabbix_agentd.conf), it does not pick it up unless -c is explicitly specified.

        For reference, the systemd service is correctly running the agent with the -c option:
        # systemctl status zabbix-agent
        * zabbix-agent.service - Zabbix Monitor Agent
        Loaded: loaded (/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: enabled)
        Active: active (running) since Tue 2025-07-29 02:22:02 UTC; 1 day 14h ago
        Main PID: 475 (zabbix_agentd)
        Tasks: 6 (limit: 1042)
        Memory: 10.1M
        CGroup: /system.slice/zabbix-agent.service
        |- 475 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
        |- 476 "/usr/sbin/zabbix_agentd: collector [idle 1 sec]"
        |- 477 "/usr/sbin/zabbix_agentd: listener #1 [waiting for connection]"
        |- 478 "/usr/sbin/zabbix_agentd: listener #2 [waiting for connection]"
        |- 479 "/usr/sbin/zabbix_agentd: listener #3 [waiting for connection]"
        `- 480 "/usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]"

        Is there anything else you’d recommend checking? Your help is much appreciated.

        Cheers,
        Nitesh

        Comment

        • Markku
          Senior Member
          Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
          • Sep 2018
          • 1781

          #4
          Ok, so you have demonstrated that your zabbix_agentd does not read /etc/zabbix/zabbix_agentd.conf by default (for any reason), and that's why the -t test does not work without explicitly setting the config file location.

          But does your item work? In a Zabbix item configuration, or by using zabbix_get.

          Markku

          Comment

          • pilotnite
            Junior Member
            • Mar 2025
            • 6

            #5
            Hello Markku,

            Thank you for your feedback.

            Yes, as an alternative option I end up running a bash script using `zabbix_sender` like:

            Code:
              /usr/bin/zabbix_sender -z server_ip -s host -k modem.lte.rssi -o "$RSSI"
            Cheers,
            Nitesh

            Comment

            • pilotnite
              Junior Member
              • Mar 2025
              • 6

              #6
              Forgot to add:
              Code:
              # zabbix_get -s 127.0.0.1 -p 10050 -k test.hello
              
              hello
              # zabbix_get -s 127.0.0.1 -p 10050 -k test.hello2
              
              ZBX_NOTSUPPORTED: Unsupported item key.

              Comment

              • pilotnite
                Junior Member
                • Mar 2025
                • 6

                #7

                Hi Markku,

                Just wanted to follow up — it turns out the UserParameter= is working correctly on its own.

                In my case, I simply needed to specify the configuration file explicitly when testing via the command line using zabbix_agentd. Here's a working example:
                Code:
                # zabbix_agentd -t modem.lte.rssi -c /etc/zabbix/zabbix_agentd.conf modem.lte.rssi
                [t|-78.00]
                So the configuration and UserParameter logic are functioning as expected; the issue was only related to manual testing without the -c flag.

                Thanks again for your guidance — much appreciated!

                Best regards,
                Nitesh

                Comment

                • Markku
                  Senior Member
                  Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                  • Sep 2018
                  • 1781

                  #8
                  Thanks for following up.

                  Based on the examples in https://www.zabbix.com/documentation...lation/install, I'd guess your agent is (without -c) expecting the config file to be at /etc/zabbix_agentd.conf.

                  Markku

                  Comment

                  Working...