DX Unified Infrastructure Management

 View Only
  • 1.  HUB queue monitoring and QOS

    Posted Aug 21, 2020 03:34 AM

    Hi everyone

    From time to time hub queues gets issues and start stacking messages. I'm trying to build a script for identifying these issues and create alerts and QOS data. The script below is partly a copy from another tread and is quite static only considering one queue. I would like to run through any queue and do this by a function instead of a fixed script.

    I have the object q.name containing all the queues for any hub, but I struggle to rewrite this static query to a generic supervision. 

    I guess many other have done similar stuff. Any suggestions?


     

    function gethubs()

       hubs, rc = nimbus.request("hub", "gethubs")

       if (rc == 0) then return hubs.hublist end

       return nil

    end

     

    function get_queue_from_list(name, list_subscribers)

       for _,q in pairs(list_subscribers.postroute) do

          if q.name == name then return q end

       end

       return nil

    end

     

    funcion ListQueuesPerHub ()
        -- missing functions for running through queue and write alarms and QOS
    end

     

    -- main entry

    for _,hub in pairs(gethubs()) do

       subscribers, rc = nimbus.request(hub.addr, "list_subscribers")

       if rc == 0 then

          queue = get_queue_from_list("probeDiscovery", subscribers

          --Consider rewrite to run trough any hubQueue by function ListQueuesPerHub instead of single run pr quoue

          if queue ~=  nil then

             -- Consider rewrite to collect sent messages vs messages in queue.

            -- qos_name = hub.name.."_"..queue.name

             -- nimbus.qos ("QOS_queue_COUNT",nil, qos_name, queue.npds, 300)

     

             if queue.npds > 500 then

                --nimbus.alarm(3, string.format("%s %s has %d messages", hub.name, queue.name, queue.npds), string.format("%s-%s", hub.name, queue.name))

                 --printf("queue %s found on %s. Count: %s", "probeDiscovery", hub.name, queue.npds)

             end

          else

             --printf("queue %s not found on %s", "probeDiscovery", hub.name)

          end

       end

    end



    ------------------------------
    Senior engineer
    NetNordic.com
    Norway
    ------------------------------


  • 2.  RE: HUB queue monitoring and QOS

    Posted Aug 21, 2020 04:46 AM
    reference to existing LUA script that:
    - monitor all queues
    - create qos metrics
    - generate alarms based on thresholds
    - can send email
    https://community.broadcom.com/enterprisesoftware/viewdocument/queuecheck-lua-script-v22?CommunityKey=170eb4e5-a593-4af2-ad1d-f7655e31513b&tab=librarydocuments
    (in attachment the latest version)


  • 3.  RE: HUB queue monitoring and QOS

    Posted Aug 21, 2020 05:07 AM
    In attachment 2 listview examples based on qos metrics of the queue check lua script
    - queue status
    - hub status


  • 4.  RE: HUB queue monitoring and QOS

    Posted Aug 24, 2020 08:31 AM

    Hi Luc

    Thanks for sharing. This will be helpfull.

    br
    Joachim



    ------------------------------
    Senior engineer
    NetNordic.com
    Norway
    ------------------------------