Ad Widget

Collapse

Remote commands problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mistur
    Junior Member
    • Jan 2009
    • 11

    #1

    Remote commands problems

    hi,

    running zabbix server 1.6.2 on an ubuntu hardy x86_64 as openvz virtual server and zabbix agent 1.6.2 are running on ubuntu dapper x86_64 (physical server or virtual server)

    EnableRemoteCommands=1 has been set in zabbix_agentd.conf and zabbix_agentd has been restarted.

    On the server, I created an action when my ntp daemon is stopped, an email is sent and a remote commande is perform :
    Code:
    {HOSTNAME}: echo KO > /tmp/KO.txt
    I get the email but KO.txt is not created.

    I tried by change {HOSTNAME} by the zabbix name of the server, but nothing change.

    maybe I forgot something but I don't find anything in the doc or on the forum that can help me.

    is some can help me ?

    thanks

    Yoann
  • mistur
    Junior Member
    • Jan 2009
    • 11

    #2
    compile options :
    Code:
    ./configure --prefix=/usr/local/zabbix-1.6.2 --enable-server --enable-agent --enable-proxy --with-net-snmp --with-libcurl --with-jabber --enable-static --enable-ipv6 --with-mysql
    Yoann

    Comment

    • nelsonab
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2006
      • 1233

      #3
      You might want to consider filing a bug.
      RHCE, author of zbxapi
      Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
      Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

      Comment

      • mistur
        Junior Member
        • Jan 2009
        • 11

        #4
        bug opened

        Comment

        • bashman
          Senior Member
          • Dec 2009
          • 432

          #5
          My remote command is not executed:

          {HOSTNAME}: /etc/zabbix/externalscripts/example.sh {ITEM.LASTVALUE} {TRIGGER.NAME}.txt

          Here are my action conditions:

          Trigger = "<hostname>:example_trigger"
          Trigger value = "PROBLEM"

          I can see triggered item on Dashboard, but the action is not executed.

          The script has the right permissions and owner.
          978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

          Comment

          • bashman
            Senior Member
            • Dec 2009
            • 432

            #6
            Originally posted by bashman
            My remote command is not executed:

            {HOSTNAME}: /etc/zabbix/externalscripts/example.sh {ITEM.LASTVALUE} {TRIGGER.NAME}.txt

            Here are my action conditions:

            Trigger = "<hostname>:example_trigger"
            Trigger value = "PROBLEM"

            I can see triggered item on Dashboard, but the action is not executed.

            The script has the right permissions and owner.
            Has anybody this problem?
            978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

            Comment

            • nelsonab
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • Sep 2006
              • 1233

              #7
              Is there anything in the client log? You might need to increase logging to see it.
              RHCE, author of zbxapi
              Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
              Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

              Comment

              • bashman
                Senior Member
                • Dec 2009
                • 432

                #8
                Hi nelsonab,

                Thanks for your reply.

                There is nothing on the agent log.

                I must say that the agent is on the Zabbix Server host and the script (remote command) is on the externalscripts path.

                The weirdest thing is that it worked twice from about tweenty attempts.

                The trigger has information severity.
                978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                Comment

                • bashman
                  Senior Member
                  • Dec 2009
                  • 432

                  #9
                  Today only one remote command was executed on the host XXX, but it should had executed 4 remote commands on the same host XXX.

                  This is my scenario:

                  I have 4 calculated items working fine with 0 seconds update interval and:
                  For item (a) 60 sec at 7,23:45-23:46
                  For item (b) 60 sec at 7,23:46-23:47
                  For item (c) 60 sec at 7,23:47-23:48
                  For item (d) 60 sec at 7,23:48-23:49

                  I have 4 triggers with information severity related to the items with function .last(0) working fine.

                  I have an action that executes a remote command with conditions:
                  (A) and (B or C or D or E) and (F) and (G)
                  (A) Host = "XXX"
                  (B) Trigger = "XXX:trigger (a)"
                  (C) Trigger = "XXX:trigger (b)"
                  (D) Trigger = "XXX:trigger (c)"
                  (E) Trigger = "XXX:trigger (d)"
                  (F) Trigger severity = "Information"
                  (G) Trigger value = "PROBLEM"

                  And this is the remote command executed on host XXX {HOSTNAME}: /etc/zabbix/externalscripts/cuadroMando.sh {ITEM.LASTVALUE} {TRIGGER.NAME}.txt

                  Right permisons and owner applied.

                  Any ideas?, is this a bug?.
                  978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                  Comment

                  • bashman
                    Senior Member
                    • Dec 2009
                    • 432

                    #10
                    Issue created: https://support.zabbix.com/browse/ZBX-3321
                    978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                    Comment

                    • bashman
                      Senior Member
                      • Dec 2009
                      • 432

                      #11
                      Originally posted by bashman
                      Has someone had this problem?, any ideas?.
                      978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                      Comment

                      • bashman
                        Senior Member
                        • Dec 2009
                        • 432

                        #12
                        Originally posted by bashman
                        Has someone had this problem?, any ideas?.
                        Anything new about the 3321 issue?
                        978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                        Comment

                        • bashman
                          Senior Member
                          • Dec 2009
                          • 432

                          #13
                          Any ideas?
                          978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                          Comment

                          • bashman
                            Senior Member
                            • Dec 2009
                            • 432

                            #14
                            Are there any news about this issue?:

                            978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                            Comment

                            • bashman
                              Senior Member
                              • Dec 2009
                              • 432

                              #15
                              Why remote commands don't always get executed?.
                              978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                              Comment

                              Working...