Ad Widget

Collapse

Can I add an alert script from an external location?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cesarsj
    Senior Member
    • Dec 2018
    • 154

    #1

    Can I add an alert script from an external location?

    Because the ZBX server cannot have access to the internet, and we want to trigger an alert script from another server that has free access.
  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #2
    An action could be configured to run a command on the server with the access. https://www.zabbix.com/documentation...remote_command

    Comment

    • cesarsj
      Senior Member
      • Dec 2018
      • 154

      #3
      Originally posted by LenR
      An action could be configured to run a command on the server with the access. https://www.zabbix.com/documentation...remote_command
      It would be a great solution if it were possible to pass macros on the remote. I left:

      /opt/zabbix-hangout.sh {ALERT.SUBJECT} {ALERT.MESSAGE} and the Zabbix Agent on the remote server is literally getting this.

      Comment

      • LenR
        Senior Member
        • Sep 2009
        • 1005

        #4
        I pass {HOST.HOIST} in an auto registration action. There was a list of where you could use which macro's, but I can't find it at the moment.

        Comment

        • cesarsj
          Senior Member
          • Dec 2018
          • 154

          #5
          Originally posted by LenR
          I pass {HOST.HOIST} in an auto registration action. There was a list of where you could use which macro's, but I can't find it at the moment.
          I just saw that only the {ALERT.SUBJECT} and {ALERT.MESSAGE} macros do not work, the others work on the command. Your great solution helped me!

          Comment

          • LenR
            Senior Member
            • Sep 2009
            • 1005

            #6
            Odd, what version of Zabbix?

            Comment

            • cesarsj
              Senior Member
              • Dec 2018
              • 154

              #7
              Originally posted by LenR
              Odd, what version of Zabbix?
              The version is 4.0.26

              Comment

              Working...