Ad Widget

Collapse

Zabbix Trapper item and Zabbix sender

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • omar.cacciotti
    Junior Member
    • Jul 2021
    • 25

    #1

    Zabbix Trapper item and Zabbix sender

    Hello everyone!

    I'm facing with a need about managing an external message sent by another monitoring tool.
    I need to get an ALARM when a value is 1 and close it when a value is 0 and I need to get the TEXT as alarm description.

    The string (Sent by zabbix_sender from the client):

    [HYDRA] [CRITICAL: 1] [CALCIO - SIACOR-DirectDebitsQuery.getIBANValidation-Volumi-ST...] - POSTKIT

    Name = [HYDRA]
    Value = [CRITICAL: 1] (so the value is 1)
    Error = [CALCIO - SIACOR-DirectDebitsQuery.getIBANValidation-Volumi-ST...]


    So I configured this item from the guy:

    for the Host = 10.1.1.1

    Name = TEST
    Key = key.test
    Type = TEXT


    And i tested all with this command:

    #zabbix_sender -z 10.100.2.13 -s10.1.1.1 -k test.key -o "CALCIO - SIACOR-DirectDebitsQuery.getIBANValidation-Volumi-ST..." -vv

    zabbix_sender [1492946]: DEBUG: answer [{"response":"success","info":"processed: 1; failed: 0; total: 1; seconds spent: 0.000081"}]
    Response from "10.100.2.13:10051": "processed: 1; failed: 0; total: 1; seconds spent: 0.000081"
    sent: 1; skipped: 0; total: 1


    QUESTION:
    How should I approach to all this if I need to generate an alarm based on [CRITICAL: 1] and get a WARNING with [CALCIO - SIACOR-DirectDebitsQuery.getIBANValidation-Volumi-ST...] as a message?

    Thank you very much in advance!
    ​​​​​​​OC
  • splitek
    Senior Member
    • Dec 2018
    • 101

    #2
    You need to get familiar with dependent items and value preprocessing



    In short. One item get data from sender and this data is split into two separate (dependent) items. First of this items can be numeric and will extract number and second will extract text.To extract data for both items you need to use preprocessing.

    Here is also some Zabbix blog about preprocessing: https://blog.zabbix.com/preprocessin...bix-5-0/12079/

    Comment

    • omar.cacciotti
      Junior Member
      • Jul 2021
      • 25

      #3
      Originally posted by splitek
      You need to get familiar with dependent items and value preprocessing



      In short. One item get data from sender and this data is split into two separate (dependent) items. First of this items can be numeric and will extract number and second will extract text.To extract data for both items you need to use preprocessing.

      Here is also some Zabbix blog about preprocessing: https://blog.zabbix.com/preprocessin...bix-5-0/12079/
      Thank you for the answer,
      I already started with preprocessing but regex in Zabbix are not so clear at the moment.
      I have to check for dependent items too.

      Any other suggestion is welcome
      have a nice day!

      OC

      Comment

      Working...