Hi @sekhar463, let me understand: you have to perform a join to extract the status field from the second search using as keys Node=hostname, is it correct? If this is your requirement, appendcols i...
See more...
Hi @sekhar463, let me understand: you have to perform a join to extract the status field from the second search using as keys Node=hostname, is it correct? If this is your requirement, appendcols isn't the solution, you could use "join" but I don't like it because there's the limit of 50,000 results in the second search and because it's very slow. You should correlate events using stats, something like this: (index=_internal sourcetype=splunkd source="/opt/splunk/var/log/splunk/metrics.log" group=tcpin_connections os=Windows) OR (index=ivz_em_solarwinds source="solwarwinds_query://Test_unmanaged_Nodes_Data")
| rename hostname=coalesce(hostname,Node)
| stats latest(_time) AS _time values(status) AS status BY hostname
| eval age=(now()-_time)
| eval LastActiveTime=strftime(_time,"%y/%m/%d %H:%M:%S")
| eval Status=if(age< 3600,"Running","DOWN")
| rename age AS Age
| eval Age=tostring(Age,"duration")
| lookup 0010_Solarwinds_Nodes_Export Caption as hostname OUTPUT Application_Primary_Support_Group AS CMDB2_Application_Primary_Support_Group,
Application_Primary AS CMDB2_Application_Primary, Support_Group AS CMDB2_Support_Group NodeID AS SW2_NodeID Enriched_SW AS Enriched_SW2
Environment AS CMDB2_Environment
| eval Assign_To_Support_Group=if(Assign_To_Support_Group_Tag="CMDB_Support_Group", CMDB2_Support_Group, CMDB2_Application_Primary_Support_Group)
| table _time, hostname,sourceIp, Status, LastActiveTime, Age, SW2_NodeID,Assign_To_Support_Group, CMDB2_Support_Group,CMDB2_Environment
| where Status="DOWN" AND NOT isnull(SW2_NodeID) AND CMDB2_Environment="Production"
| sort 0 hostname please see the approach, if some field is missing, add it to the stats command. ciao. Giuseppe