Ad Widget

Collapse

To execute a command when trigger is in PROBLEM

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • entropia
    Junior Member
    • Oct 2021
    • 1

    #1

    To execute a command when trigger is in PROBLEM

    Hello. This is my first post!

    I'd like to know how to execute a command when a trigger is red in PROBLEM.

    I mean, I have a trigger that I recived in my Telegram saying that System time is out of sync.
    Now... I'd like to execute a command or a script to this host to resync. How can I do it?

    Thank you very much.
  • niveastn
    Member
    • Oct 2021
    • 82

    #2
    Hi! Welcome to the forum!

    So, you will need to go to Configuration > Actions > Trigger actions > Create action

    Choose a nice and descriptive name. Conditions you choose the host or group it will apply.

    Then you will need to go to operations > Operations box > add

    Depending of your zabbix version, you have 2 ways to do the next step:

    before 5.0
    Choose Remote command >
    • Target list (where the script is going to run, host where the alert came from, proxy or server)
    • Type - IPMI, SSH, Custom script, a telnet or a global script (from you admistration scripts tab)
    • Execute on - Basically same as target list
    • Commands - The script

    After 5.4

    you go to administration > Fill the options bellow >
    Click image for larger version

Name:	forum1.png
Views:	6372
Size:	35.6 KB
ID:	435015
    Go back to operations, follow all the steps until operations box, When the popup opens, in operations you will be able to choose the script you configured in "Administration > Scripts", together with target list.

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #3

      Follow this part of documentation......

      Comment

      • somesh_k
        Junior Member
        • Feb 2023
        • 12

        #4
        Hi,

        We wanted to implement the resync feature in zabbix to send the pending alerts to other EMS using webhook.
        Below are the requirement.

        1.How to find the events i.e. not sent to other EMS i.e Netcool,[we implemented webhook to sent the alarms to netcool]
        2.Suppose we lost the connectivity from zabbix to Netcool for 1hr then how we can send the current active alarms between that 1 hour.

        Comment

        Working...