Ad Widget

Collapse

System.run Unsupported item. Agent 5.4. Please help.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mong
    Junior Member
    • Sep 2023
    • 10

    #1

    System.run Unsupported item. Agent 5.4. Please help.

    ​Hello all,
    this is my first post in the group. I have been trying to get all the software installed on a windows machine using system.run . The Agent version is the latest 5.4
    i already updated the conf file with AllowKey=system.run[*] and EnableRemoteCommands=1​. and also ListenIP=192.168...... and ServerActive=127.0.0.1​
    The command used for the item is system.run[ "C:\Programs\test.bat"] as key. Can you please advice me here. I am lost.
    Thanks in advance.The bat code is simple:
    echo off
    wmic product get Name, Version​​
    Attached Files
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    Change the LogRemoteCommands=1 and UnsafeUserParameters=1 parameters in the agent config, restart the agent, try to request the item value and see what will be written in the log (if empty, increase the logging level).

    PS
    Why not use the "wmi.get[<namespace>,<query>]" key?

    PPS
    Why is it written like this "ServerActive=127.0.0.1​"? Don't you think that's wrong?
    Last edited by Hamardaban; 27-09-2023, 14:44.

    Comment

    • mong
      Junior Member
      • Sep 2023
      • 10

      #3
      Hi Harmardaban, Thank at first. I changed it and this is what i get on the log file.
      0652:20230927:124522.532 Active check configuration update started to fail
      80:20230927:144613.064 Zabbix Agent received stop request.
      80:20230927:144614.056 Zabbix Agent stopped. Zabbix 6.4.7 (revision 2ac20065acd).
      22860:20230927:144711.345 Starting Zabbix Agent [PC63146]. Zabbix 6.4.7 (revision 2ac20065acd).
      22860:20230927:144711.347 **** Enabled features ****
      22860:20230927:144711.349 IPv6 support: YES
      22860:20230927:144711.351 TLS support: YES
      22860:20230927:144711.353 **************************
      22860:20230927:144711.355 using configuration file: C:\Program Files\Zabbix Agent\zabbix_agentd.conf
      22860:20230927:144716.483 agent #0 started [main process]
      9416:20230927:144716.486 agent #3 started[listener #2]
      12512:20230927:144716.487 agent #4 started[listener #3]
      17108:20230927:144716.489 agent #5 started [active checks #1]
      15196:20230927:144716.491 agent Home started [collector]
      22700:20230927:144716.493 agent Forum started[listener #1]
      17108:20230927:144717.501 Unable to connect to [127.0.0.1]:10051 [cannot connect to [[127.0.0.1]:10051]: Connection refused.]
      17108:20230927:144717.503 Unable to send heartbeat message to [127.0.0.1]:10051 [cannot connect to [[127.0.0.1]:10051]: Connection refused.]
      17108:20230927:144718.519 Unable to connect to [127.0.0.1]:10051 [cannot connect to [[127.0.0.1]:10051]: Connection refused.]
      17108:20230927:144718.522 Active check configuration update started to fail​
      Attached Files

      Comment

      • mong
        Junior Member
        • Sep 2023
        • 10

        #4
        i haven't used the wmi.get commands. I am new in Zabbix

        Comment

        • Hamardaban
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • May 2019
          • 2713

          #5
          Then you first need to read the wonderful and detailed documentation with examples!

          Here about item key: https://www.zabbix.com/documentation...s/zabbix_agent

          Comment

          • mong
            Junior Member
            • Sep 2023
            • 10

            #6
            Believe me i did already

            Comment

            • Hamardaban
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • May 2019
              • 2713

              #7
              It is wonderful! Then tell me why do you have "ServerActive=127.0.0.1​" in your configuration?

              Comment

              • mong
                Junior Member
                • Sep 2023
                • 10

                #8
                Hi Harmardaban, Thanks a lot. i had no idea to conf file was not updating. After changing everything i am not having the same mistake anymore. But it's something else.
                Click image for larger version

Name:	grafik.png
Views:	1468
Size:	20.2 KB
ID:	471213​​
                Attached Files

                Comment

                • Hamardaban
                  Senior Member
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • May 2019
                  • 2713

                  #9
                  Check that there are no extra spaces after ",Version" in the command file

                  Comment

                  Working...