Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: PFCCWA on July 31, 2018, 09:07:59 AM
-
Hello,
I am trying to find a report or something that would tell me when the last time or date a user(supervisor) logged into CME.
Is this possible?
It would be good enough to know whether they have logged in the last 30 days as well if this is easier to see.
We have CCA, ICON and access to Configuration Server tables but cannot see anything to obtain this particular data.
thanks.
-
I maybe wrong but that's likely only going to show up in the confserv logs unless you have some auditing solution installed as well to catch any changes they make.
Sent from my Redmi Note 3 using Tapatalk
-
No DB stores that info, unless you made something customized for it based on CFGSERVER logs as vmc indicated
-
You can enable Last Login option on config server.
But it might not help you as it only tracks the actual last log in for the user. Means if the supervisor uses WDE after CME it will show the WDE login.
It might work if you create a specific csproxy for CME logins, enable last login, and don’t use last login for all other CSPs.
Gesendet von iPhone mit Tapatalk
-
https://docs.genesys.com/Documentation/System/8.5.x/SDG/LLogIn
This?
-
Yes, but I’m not sure whether he can achieve exactly what he aims for.
It will show one line per username with an associated timestamp and application.
If SVs are using default for CME, GA and GAX it would show default as application.
I’ve used LastLogin to a achieve a different goal, I was mainly using it for cleaning up accounts which were not used for > 6 months.
Cheers
Gesendet von iPhone mit Tapatalk
-
Yeah, OP request needs a log collector. There is no other way
Enviado de meu E6633 usando o Tapatalk
-
[quote author=zwerg82 link=topic=11072.msg50359#msg50359 date=1533366877]
It will show one line per username with an associated timestamp and application.
[/quote]
Hello,
where is this information containing the timestamp/application? is it reportable?
thanks
-
No,will be shown just at the GUI
Please read the link I shared
Enviado de meu E6633 usando o Tapatalk
-
It's stored in the Configuration Database.
It's in the table "CFG_HDB_LAST_LOGIN"
To have a view which is telling you something you could use the following sql statement to check:
[code]SELECT
CFG_PERSON.USER_NAME,
CFG_PERSON.EMPLOYEE_ID,
CFG_PERSON.LAST_NAME,
CFG_PERSON.FIRST_NAME,
decode(CFG_PERSON.STATE,1,'enabled',2,'disabled') as STATE,
decode(CFG_PERSON.IS_AGENT,1,'NONAGENT',2,'AGENT') as PERSON_TYPE,
to_date('1970-01-01','YYYY-MM-DD') + numtodsinterval(LOGIN_TIME,'SECOND') AS LastLogin,
CFG_APPLICATION.NAME AS APPLICATION
FROM
CFG_PERSON
LEFT JOIN
CFG_HDB_LAST_LOGIN
ON CFG_PERSON.DBID = CFG_HDB_LAST_LOGIN.PERSON_DBID
LEFT JOIN
CFG_APPLICATION
ON CFG_APPLICATION.DBID = CFG_HDB_LAST_LOGIN.APP_DBID
ORDER BY LastLogin ASC;
[/code]
-
So it does have an historical option???
-
Yes!
Have just tested and using the CFG_HDB_LAST_LOGIN table I can report on the information required.
The login time itself is UTC so needs a conversion , otherwise reporting is available.
-
Sorry for the delayed post.
If you need historical reporting on this:
On Configuration Server Application (confserv):
1. make sure the option log\print-attributes is set to true;
2. Set the option log-extended\level-reassign-22121 to 'standard' (without the quotes);
3. Make sure the Configuration Server application has a connection to the Log Events message server;
4. Confirm the option log\standard has 'network' on its destinations (without the quotes).
On the Log Events Message Server Application:
1. Confirm it has a DAP in its connections to the Log Database (or it has the DBServer options pointing to the Log Database);
2. Make sure the option messages\db_storage is set to true.
On the Log Database, perform the following query (assuming Oracle DBMS):
select to_char(lm.timegenerated, 'yyyy-mm-dd hh24:mi:ss') as logintime, lau.attr_value as username, lap.attr_value as application_, lah.attr_value as hostname, lm.messagetext
from gen_log.g_log_messages lm
inner join gen_log.g_log_attrs lau on lau.LRID = lm.id and lau.attr_name = 'USER'
inner join gen_log.g_log_attrs lap on lap.lrid = lm.id and lap.attr_name = 'APPNAME'
inner join gen_log.g_log_attrs lah on lah.lrid = lm.id and lah.attr_name = 'HOST'
where lm.message_id = 22121;
-
Thx for this. It works! just tested it in my lab.
Best regards
-
Nice! 2 solutions for a problem!
Learned new stuff 8)
Thanks guys
-
There is another option for historical reporting that I just thought about (the problem is solved already, but just for a matter of keeping it recorded here):
You could create a Database Trigger that runs after UPDATEs on the table CFG_HDB_LAST_LOGIN and save the data of the new values on a customized table. That way, you can record each login of a person, and have control of the retention rules.
-
I thought of triggers too, but if you have both solutions enabled, you have:
1. all logins in log db, and you can configure how long you want to store those by defining it in your purge job (cat 2, prio 2)
2. in config db you have the actual last login for every user, which helps to identify „dead“ accounts.
Wouldn’t it make more sense to do the trigger on log db? Especially because it gives you the ip?
-
I am not sure about the table CFG_HDB_LAST_LOGIN whether contains all attempts to log into Genesys environment as I saw a few installation where this table was always empty (even the HDB was enabled). So I would not rely on it
-
At least for me it's tracking all logins for now in a test environment.
If the customers are using CSProxies they have to be configured to sync this information with confserv.
I have to admit , that I like the solution via log db more.
-
[quote author=zwerg82 link=topic=11072.msg50411#msg50411 date=1533813423]
At least for me it's tracking all logins for now in a test environment.
If the customers are using CSProxies they have to be configured to sync this information with confserv.
I have to admit , that I like the solution via log db more.
[/quote]
Just an additional info for that solution, then:
The Log DB does not automatically purge by default. The administrator is reposible for either run the Log DB Maintenance Wizard or create an automated job for purging old data.
In that case, it is interesting to include a "WHERE" clause in order not to delete the records which have the messageid = 22121 or else this historical report would be compromised
Edit: I just realized you have already added that note :)