Ad Widget

Collapse

Link Indicators not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • coolcliff
    Junior Member
    • Sep 2017
    • 17

    #1

    Link Indicators not working

    Hi

    I have created a network map of 3 switches in my lab environment as in the attachment, i have also created the link indicators.

    i need the link to change its color to red when i unplug the Ethernet cable to simulate a link failure, somehow the link does not change the color, it just stays green. everything else is great. can someone guide me how to achieve this.

    could it be because there is no alarm triggered when i unplug the port. the port however shows up in the trigger list for the host as below

    Severity|Name|Expression|status
    Average|Network Interfaces Discovery: Interface Port2(): Link down||{$IFCONTROL:"Port2"}=1 and({192.168.5.2:net.if.status[ifOperStatus.2].last()}=2 and {192.168.5.2:net.if.status[ifOperStatus.2].diff()}=1) Enabled

    so should'nt an alarm be generated when the port is unplugged?

    Regards

    Clifford Dsouza
    Attached Files
  • kaspars.mednis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2017
    • 349

    #2
    Hello !

    Have you specified the right color in link indicator ?
    See the attached picture - Green is the ok color, red is alarm color

    here is documentation


    Regards,
    Kaspars
    Attached Files

    Comment

    • coolcliff
      Junior Member
      • Sep 2017
      • 17

      #3
      Hi

      Have done that, please see the attachment

      may be the trigger is not working and so the link color does not change, cause when i unplug the port i don't see an alarm on the dashboard for the port status change. that's weird, cause my other NMS does register the status change quite well.

      I've no idea what else i can do, some insight would be greatly appreciated, i really need the link monitoring in the map to work.

      our NMS primary job is to monitor for fiber link outages and to send email alerts for the same. besides i also need email alerts for bandwidth threshold email alerts on certain links

      Regards

      Clifford Dsouza
      Attached Files

      Comment

      • kaspars.mednis
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2017
        • 349

        #4
        could it be because there is no alarm triggered when i unplug the port. the port however shows up in the trigger list for the host as below
        Is the item supported in zabbix interface and receiving data ?
        if you provide me screenshots of item config and trigger config, i think we can solve it pretty fast.

        Comment

        • coolcliff
          Junior Member
          • Sep 2017
          • 17

          #5
          Hi

          thanks for the quick replies

          trigger config for the interface status

          Severity Name Expression Status
          Average Network Interfaces Discovery: Interface Console41(): Link down {$IFCONTROL:"Console41"}=1 and ({192.168.5.3:net.if.status[ifOperStatus.41].last()}=2 and {192.168.5.3:net.if.status[ifOperStatus.41].diff()}=1) Enabled
          Average Network Interfaces Discovery: Interface Port1(): Link down {$IFCONTROL:"Port1"}=1 and ({192.168.5.3:net.if.status[ifOperStatus.1].last()}=2 and {192.168.5.3:net.if.status[ifOperStatus.1].diff()}=1) Enabled
          Average Network Interfaces Discovery: Interface Port2(): Link down {$IFCONTROL:"Port2"}=1 and ({192.168.5.3:net.if.status[ifOperStatus.2].last()}=2 and {192.168.5.3:net.if.status[ifOperStatus.2].diff()}=1) Enabled
          Average Network Interfaces Discovery: Interface Port3(): Link down {$IFCONTROL:"Port3"}=1 and ({192.168.5.3:net.if.status[ifOperStatus.3].last()}=2 and {192.168.5.3:net.if.status[ifOperStatus.3].diff()}=1) Enabled
          Average Network Interfaces Discovery: Interface Port4(): Link down {$IFCONTROL:"Port4"}=1 and ({192.168.5.3:net.if.status[ifOperStatus.4].last()}=2 and {192.168.5.3:net.if.status[ifOperStatus.4].diff()}=1) Enabled
          Average Network Interfaces Discovery: Interface Port5(): Link down {$IFCONTROL:"Port5"}=1 and ({192.168.5.3:net.if.status[ifOperStatus.5].last()}=2 and {192.168.5.3:net.if.status[ifOperStatus.5].diff()}=1) Enabled
          Average Network Interfaces Discovery: Interface Port6(): Link down {$IFCONTROL:"Port6"}=1 and ({192.168.5.3:net.if.status[ifOperStatus.6].last()}=2 and {192.168.5.3:net.if.status[ifOperStatus.6].diff()}=1) Enabled
          Average Network Interfaces Discovery: Interface Port7(): Link down {$IFCONTROL:"Port7"}=1 and ({192.168.5.3:net.if.status[ifOperStatus.7].last()}=2 and {192.168.5.3:net.if.status[ifOperStatus.7].diff()}=1) Enabled
          Average Network Interfaces Discovery: Interface Port8(): Link down {$IFCONTROL:"Port8"}=1 and ({192.168.5.3:net.if.status[ifOperStatus.8].last()}=2 and {192.168.5.3:net.if.status[ifOperStatus.8].diff()}=1) Enabled
          Average Network Interfaces Discovery: Interface Port9(): Link down {$IFCONTROL:"Port9"}=1 and ({192.168.5.3:net.if.status[ifOperStatus.9].last()}=2 and {192.168.5.3:net.if.status[ifOperStatus.9].diff()}=1) Enabled
          Average Network Interfaces Discovery: Interface Port10(): Link down {$IFCONTROL:"Port10"}=1 and ({192.168.5.3:net.if.status[ifOperStatus.10].last()}=2 and {192.168.5.3:net.if.status[ifOperStatus.10].diff()}=1) Enabled
          Average Network Interfaces Discovery: Interface VLAN1(): Link down {$IFCONTROL:"VLAN1"}=1 and ({192.168.5.3:net.if.status[ifOperStatus.1001].last()}=2 and {192.168.5.3:net.if.status[ifOperStatus.1001].diff()}=1) Enabled

          -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


          Item Config

          Name Triggers Key Interval History Trends Type Applications status

          Template Module ICMP Ping: ICMP loss Triggers 1 icmppingloss 60 1w 365d Simple check Status Enabled
          Template Module ICMP Ping: ICMP ping Triggers 1 icmpping 60 1w 365d Simple check Status Enabled
          Template Module ICMP Ping: ICMP response time Triggers 1 icmppingsec 60 1w 365d Simple check Status Enabled
          Network Interfaces Discovery: Interface Console41(): Operational status Triggers 2 net.if.status[ifOperStatus.41] 60 14d 0d SNMPv2 agent Network Interfaces Enabled
          Network Interfaces Discovery: Interface Port1(): Operational status Triggers 2 net.if.status[ifOperStatus.1] 60 14d 0d SNMPv2 agent Network Interfaces Enabled
          Network Interfaces Discovery: Interface Port2(): Operational status Triggers 2 net.if.status[ifOperStatus.2] 60 14d 0d SNMPv2 agent Network Interfaces Enabled
          Network Interfaces Discovery: Interface Port3(): Operational status Triggers 2 net.if.status[ifOperStatus.3] 60 14d 0d SNMPv2 agent Network Interfaces Enabled
          Network Interfaces Discovery: Interface Port4(): Operational status Triggers 2 net.if.status[ifOperStatus.4] 60 14d 0d SNMPv2 agent Network Interfaces Enabled
          Network Interfaces Discovery: Interface Port5(): Operational status Triggers 2 net.if.status[ifOperStatus.5] 60 14d 0d SNMPv2 agent Network Interfaces Enabled
          Network Interfaces Discovery: Interface Port6(): Operational status Triggers 2 net.if.status[ifOperStatus.6] 60 14d 0d SNMPv2 agent Network Interfaces Enabled
          Network Interfaces Discovery: Interface Port7(): Operational status Triggers 2 net.if.status[ifOperStatus.7] 60 14d 0d SNMPv2 agent Network Interfaces Enabled
          Network Interfaces Discovery: Interface Port8(): Operational status Triggers 2 net.if.status[ifOperStatus.8] 60 14d 0d SNMPv2 agent Network Interfaces Enabled
          Network Interfaces Discovery: Interface Port9(): Operational status Triggers 2 net.if.status[ifOperStatus.9] 60 14d 0d SNMPv2 agent Network Interfaces Enabled
          Network Interfaces Discovery: Interface Port10(): Operational status Triggers 2 net.if.status[ifOperStatus.10] 60 14d 0d SNMPv2 agent Network Interfaces Enabled
          Network Interfaces Discovery: Interface VLAN1(): Operational status Triggers 2 net.if.status[ifOperStatus.1001] 60 14d 0d SNMPv2 agent Network Interfaces Enabled
          Template Module Generic SNMPv2: SNMP availability Triggers 1 zabbix[host,snmp,available] 60 14d 0d Zabbix internal Status Enabled



          Regards

          Clifford Dsouza

          Comment

          • kaspars.mednis
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Oct 2017
            • 349

            #6
            Why do you use so complicated expression ?

            there is already problems with it

            Link down {$IFCONTROL:"Port8"}=1 and ({192.168.5.3:net.if.status[ifOperStatus.8].last()}=2 and {192.168.5.3:net.if.status[ifOperStatus.8].diff()}=1) Enabled
            The part {192.168.5.3:net.if.status[ifOperStatus.8].diff()}=1) means, that your trigger will come in problem state only when the problem happens, it will go to OK state when the second status value 2 is received

            To have a line in red color, this trigger must be in the problem state all the time while link is down

            and im not sure - what expression Link down {$IFCONTROL:"Port8"}=1 means ?

            Comment

            • coolcliff
              Junior Member
              • Sep 2017
              • 17

              #7
              Hi

              am sorry, i am horrible at expressions or scripting, what i did was add the host with the correct snmp parameters and the items and triggers and their expressions were automatically created by zabbix. i am just using the default link down trigger for the required port created by the zabbix server.

              Can i have the right trigger expression so i get things working.

              what i need is when a port on a switch or a router is down, the link is read
              and the link is green when the port status is up again.

              wonder why this is complicate in zabbix, however i love the awesome zabbix interface dashboard and alerting functions

              i'm so only with the map thing

              Regards

              Clifford

              Comment

              • kaspars.mednis
                Senior Member
                Zabbix Certified Trainer
                Zabbix Certified SpecialistZabbix Certified Professional
                • Oct 2017
                • 349

                #8
                Ok, you used some template with zabbix autodiscovery (you can read more about LLD discovery here, if you have time https://www.zabbix.com/documentation...evel_discovery

                Your trigger contains 3 logical expressions EXP1 AND EXP2 AND EXP3, all must be true for trigger to fire

                1. {$IFCONTROL:"Port8"}=1 means, that you can add custom user macros to the host :
                {$IFCONTROL:"Port1"},{$IFCONTROL:"Port2"} etc., and assign them values 1 or 0, in such way controlling from the host or template level which ports to monitor
                if the {$IFCONTROL:"Port8"} macro will be 0 , that trigger will never fire on that port, because first logical expression will return false, false and whatever and whatever = always false
                2. The second part {192.168.5.3:net.if.status[ifOperStatus.8].last()}=2 checks the last received value from item (1 up,2 down) , if the value = 2 , then expression becomes true
                3. The third part {192.168.5.3:net.if.status[ifOperStatus.8].diff()}=1 is responsible for the trigger being in problem state only short time when the port status change, it measures the difference between last received and previous value

                SOLUTION

                You can omit 1st part, if you want to monitor all ports or by hand disable unneeded triggers
                You must remove the third part of expression, to have always problem state trigger when the link is down. That will make your line go red
                The most important is {192.168.5.3:net.if.status[ifOperStatus.8].last()}=2, so your trigger can consist only from this expression

                To edit the triggers, you must go yo your template -> Discovery Rules
                click on Network Interfaces Discovery, there will be item and trigger prototypes
                The trigger prototype will be named Interface {#IFNAME}: Operational status or something like this
                Edit this prototype, correct the expression, all the triggers will change after update interval specified in Discovery rule

                If you need more help with expression, just paste the full expression here from trigger prototype, i will correct

                Regards,
                Kaspars

                Comment

                • coolcliff
                  Junior Member
                  • Sep 2017
                  • 17

                  #9
                  Hi kaspars

                  I'am still struggling

                  below are the expressions after the recommended changes

                  Expression from SNMP Template Trigger Prototype
                  {Template Module Interfaces SNMPv2 for ECS2100-10T:net.if.status[ifOperStatus.{#SNMPINDEX}].last()}=2


                  Expression from Host Trigger Prototypes
                  {192.168.5.3:net.if.status[ifOperStatus.{#SNMPINDEX}].last()}=2


                  Expression seen in the host trigger
                  {192.168.5.3:net.if.status[ifOperStatus.1].last()}=2

                  on the Interface graph page i see the interface go up or down as and when i plug or unplugh the port the trigger displayed on the graph page is as below
                  Trigger: Interface Port2(): Link down [=2]


                  Regards
                  Clifford Dsouza

                  Comment

                  • kaspars.mednis
                    Senior Member
                    Zabbix Certified Trainer
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • Oct 2017
                    • 349

                    #10
                    If the trigger is firing and staying in ON state while the link is down, the line must change color.
                    You can check the trigger on Monitoring->Triggers page, it must be in problem state

                    Do you still have problem with this ?

                    Regards
                    Kaspars

                    Comment

                    • coolcliff
                      Junior Member
                      • Sep 2017
                      • 17

                      #11
                      Hi Kaspars

                      that's was is so weird.
                      there is no trigger fired, however if i monitor the latest data for the switch port, i can see the link state change to up/down when i plug/unplug the switch port.

                      Comment

                      • coolcliff
                        Junior Member
                        • Sep 2017
                        • 17

                        #12
                        Hi kaspars

                        The trigger page shows the below triggers

                        Severity Status Info Time Age Ack Host Name Description
                        Disaster OK Never No events 192.168.5.3 Interface Port2(): Link down Show
                        Disaster OK Never No events 192.168.5.3 Interface Port1(): Link down Show

                        Wondering why is the status Ok!

                        could you please help

                        Regards

                        Clifford Dsouza

                        Comment

                        • kaspars.mednis
                          Senior Member
                          Zabbix Certified Trainer
                          Zabbix Certified SpecialistZabbix Certified Professional
                          • Oct 2017
                          • 349

                          #13
                          I will try to help

                          can you look in the latest data section for interfaces ?
                          Maybe there is not 2, but something like down(2) ?


                          {192.168.5.3:net.if.status[ifOperStatus.{#SNMPINDEX}].last()}=2
                          - this trigger will fire in problem if the items value is exactly 2

                          Regards,
                          Kaspars

                          Comment

                          • coolcliff
                            Junior Member
                            • Sep 2017
                            • 17

                            #14
                            Hi kaspars

                            Here's what i did.

                            Yesterday I removed the template for one device and created the item and trigger manually, like the one u suggested, and voila.... things started working.

                            However i have no idea about how the devices with the templates started working after that. Just like that.... its crazy.

                            The expressions for the manually created items and trigger are the same as for the devices with templates.

                            However many many many many thanks for your kind support and patience to help me resolve this issue.

                            Warm regards
                            Clifford Dsouza

                            Comment

                            Working...