Option to alert netconnect probe disabled state

book

Article ID: 143386

calendar_today

Updated On:

Products

NIMSOFT PROBES DX Infrastructure Management

Issue/Introduction

We are looking for scripts or options to alert ( via email or major/critical alerts) if net_connect probe is in deactivate state. 

 

 

 

Environment

Release : 8.5.1

Component : UNIFIED INFRASTRUCTURE MGMT

Resolution

This script may suit your needs.

Please note that editing and creating LUA scripts is outside the scope of Technical Support and would require a paid services engagement.

It looks for inactive net_connect probes on all hubs, and if it finds one, it will send an alarm.

--
-- check_net_connect_probe_on_hub_status.lua
--
print('Robot & Probe Status')
print('====================')
print(' ')

hublist = nimbus.request("hub","gethubs");
hubs = hublist.hublist
for hub_key,hub_table in pairs(hubs) do
   hub = hubs[hub_key]
   print ("Processing hub: " .. hub.addr .. "")
   hubAddress = hub.addr
   c = hubAddress:gsub("/hub", "/controller")
   print ("The controller address for this hub is:\t" .. c .. "")  
   -- enter your domain name below, replace "domain"
   if (hub.domain == "domain") 
   then
      probelist = nimbus.request(c,"probe_list")
      for probe_key,probe_value in pairs(probelist) do
         probe = probelist[probe_key]
         print ("Probe is:\t" .. probe.name)
            if (probe.name == "net_connect" and probe.active == 0) then
               -- print ("\t\t\t**************************Watch out... " .. probe.name .. " is inactive!!!*********")
               local resp,rc = nimbus.alarm(5, "Check_net_connect_probe_status - Probe: " .. probe.name .. " is Inactive on hub: " .. hub.addr)
            end             
      end
   else
      do print ("this hub is not part of the domain") 
   end
end
end



You can also query the database to get a report of all robots that have the net_connect probe and it is deactivated:

select * from cm_nimbus_robot where robot_id in
(select robot_id from cm_nimbus_probe
where probe_name like 'net_connect' and ip is null);

Additional Information

NAS Extensions to LUA: https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/it-operations-management/ca-unified-infrastructure-management-probes/GA/alphabetical-probe-articles/nas-alarm-server/the-nas-extensions-to-lua-all-versions.html