/build/static/layout/Breadcrumb_cap_w.png

K1000: Primary user from Asset history

I know the inventory has the last logged in user (last logged in when agent reported) but for the asset side we use a primary user lookup in the asset history table - then assign user and attributes where a match is found in the user table. The problem is, only about 10% of the Computer (400) inventory is reporting back. Our agent reporting is fairly good (85-90%) within reasonable time period, and our assets have been accumulating data in the history table for a couple months now - i initially thought maybe it will just grow over time. Any ideas? Suggestions? I'm not a fan of blanks, and open to suggestions. The below rule itself is created by Dell, and works returning the details required, just seems to only pull a small percent. I'd assume this is related to the type of criteria used in the asset history and maybe the asset history not populating ? 

Thanks in advance, 

 

update 
ASSET AM left join ASSET_DATA_5 AD5 on AD5.ID = AM.ASSET_DATA_ID left join (
select LOGINS.NAME,
LOGINS.USER,
max(LOGINS.LoginCount) as TOTAL from
(
SELECT
 AH.NAME, AH.VALUE2 as USER, COUNT(*) AS LoginCount
  FROM ASSET_HISTORY AH
 
where AH.FIELD_NAME like 'user_name' and AH.TIME > date_sub(now(), INTERVAL 30 DAY)  GROUP BY AH.NAME,AH.VALUE2
order by LoginCount ) LOGINS   group by NAME -- ,USER
order by TOTAL desc)  LOGINS2 on LOGINS2.NAME = AM.NAME join USER U on U.USER_NAME = LOGINS2.USER set AM.OWNER_ID = U.ID,
AD5.FIELD_77 = U.ID,
AD5.FIELD_175 = U.CUSTOM_1,
AD5.FIELD_174 = U.CUSTOM_2,
AD5.FIELD_181 = U.CUSTOM_3 where LOGINS2.NAME = AM.NAME

0 Comments   [ + ] Show comments

Answers (0)

Be the first to answer this question

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ