Ad Widget

Collapse

using Macros in Trigger Name or Action

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jix
    Member
    • Feb 2011
    • 73

    #1

    using Macros in Trigger Name or Action

    Hi
    I have zabbix 2.2

    and cisco switch with 24 Gigabit ports
    each port have it own description

    i set up trigger for port up/down

    each time the port change state from up to down or down to up
    trigger will be fired like this

    Cisco-sw1 port Gig0/1 changed to down

    how can i have port description like this on my alarms?

    Cisco-sw1 port Gig0/1 Link to Unit4 changed to down

    i couldn't find any suitable macros for that

    any help will be appreciate
  • jix
    Member
    • Feb 2011
    • 73

    #2
    j

    is there any idea?

    Comment

    • aib
      Senior Member
      • Jan 2014
      • 1615

      #3
      I'm using macros
      Code:
      {{HOST.HOST}:ifAlias[{#SNMPVALUE}].last(0)}
      in my Graph prototype.

      I'm not sure if it can work in your case.
      Sincerely yours,
      Aleksey

      Comment

      • Uri
        Junior Member
        • Feb 2011
        • 12

        #4
        Hello. I have the same problem.

        I have edited the Graph prototype name to
        HTML Code:
        {{HOST.HOST}:ifAlias[{#SNMPVALUE}].last(0)}
        , but on the graphs i see only {{HOST.HOST}:ifAlias[GigabitEthernet0/47].last(0)} string, without any port description.

        Comment

        • aib
          Senior Member
          • Jan 2014
          • 1615

          #5
          but on the graphs i see only {{HOST.HOST}:ifAlias[GigabitEthernet0/47].last(0)} string, without any port description.
          Did you check in Monitoring ->Latest Data that port description?
          Does it have any data or not?
          Sincerely yours,
          Aleksey

          Comment

          • Uri
            Junior Member
            • Feb 2011
            • 12

            #6
            Yes, in the Latest data section I see everything as expected.
            For example: Monitoring -> Latest Data:
            column Name has a value Alias of interface GigabitEthernet0/47 , column Last value has a value Link to router.
            I think, my error is in the template, but i can't understand where is exactly.

            aib , could you share your working template?

            Comment

            • Uri
              Junior Member
              • Feb 2011
              • 12

              #7
              My zabbix version is Zabbix 2.0.9.

              Comment

              • aib
                Senior Member
                • Jan 2014
                • 1615

                #8
                Originally posted by Uri
                aib , could you share your working template?
                It's hard to say that I cannot share my Template (I don't have any one made by myself)

                I can share the Host description with Discovery rule which is working.
                After you import that host you have to:
                - change the address for SNMP interface
                - change the macros {$SNMP_COMMUNITY} to real community string

                After short time, Discovery will made many items/triggers/graphs. I hope. I cross my fingers for that!
                Sincerely yours,
                Aleksey

                Comment

                • Uri
                  Junior Member
                  • Feb 2011
                  • 12

                  #9
                  Hello. First of all thank you for sharing.
                  I have imported this host. I have edited snmp-community, ip and also activated description of the interface item in discovery. But it's not a success.
                  In the graph I see the wrong header all the same. (I have attached the screenshot). Also, it the Latest Data menu there are correct values of the interface descriptions.
                  Maybe there are some actions i forgot to do?
                  Attached Files

                  Comment

                  • aib
                    Senior Member
                    • Jan 2014
                    • 1615

                    #10
                    I give up.
                    Sometimes I have the same weird name before my ifAlias item collect some values (more than one)
                    But then I have "Description of port" or nothing if my port not described.

                    may be something wrong between out zabbix server versions?
                    I have 2.2.2 - what version do you have?
                    Sincerely yours,
                    Aleksey

                    Comment

                    • Uri
                      Junior Member
                      • Feb 2011
                      • 12

                      #11
                      Hello, aib. I have some good news
                      I have tried version 2.2.2 and all I want works fine except one thing. There are only 20 visible symbols in the Graph title interface description part. I'm searching about this problem in this forum, but if you already have met this problem, please let me know.

                      //updated. I found the solution. It's a ZBX-4303 request.
                      Last edited by Uri; 10-03-2014, 22:09.

                      Comment

                      • aib
                        Senior Member
                        • Jan 2014
                        • 1615

                        #12
                        well, you solved your own problem!

                        perfectly done, congratulations!
                        Sincerely yours,
                        Aleksey

                        Comment

                        Working...