[ZBXNEXT-421] display user account information in action auditlog Created: 2010 Jun 19  Updated: 2014 Jun 24  Resolved: 2014 Feb 27

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F)
Affects Version/s: None
Fix Version/s: 2.3.0

Type: Change Request Priority: Major
Reporter: richlv Assignee: Martins Valkovskis
Resolution: Fixed Votes: 2
Labels: audit, patch
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File zabbix-1.8.10-itsc-show-alias-in-audit-action-log.patch     File zabbix-2.0.4-useralias-in-audit-and-event-details.patch     File zabbix-2.2.0-ZBXNEXT-421.patch    
Issue Links:
Duplicate
is duplicated by ZBXNEXT-1104 [Patch] Show user alias on event deta... Closed

 Description   

in administration -> audit -> actions, "recipient" column contains information from "send to field". unfortunately, user account name is not shown (except in some error messages, like "No media defined for user "monitoring user (monitoring_user)"").

it's not always obvious which user has a specific email address, especially in larger installations where multiple system integration accounts might exist. would be great if a separate column was used to store user account name in "alerts" table, and displayed in this list.

while that table already has userid column, it's not long-term safe solution, because user might get deleted, and in that case information would be lost.

for added bonuspoints audit view could check whether username from the alert matches current username with same 'userid'. if it's different, it would show "(now named NEWNAME)", if it's missing, "(user deleted)".



 Comments   
Comment by richlv [ 2012 Feb 08 ]

proof of concept patch provided at ZBXNEXT-1104

Comment by Volker Fröhlich [ 2012 Mar 14 ]

The other patch from #1104 must be applied before

Comment by Volker Fröhlich [ 2012 Mar 14 ]

Following up to my patch in #1104:

Show the user alias in the action auditing as well

Comment by Volker Fröhlich [ 2013 Jan 05 ]

Show user alias in event details and audit log – No direct SQL

Comment by Volker Fröhlich [ 2013 Jan 11 ]

For not using SQL, the latest patch is limited by API permissions. It therefore doesn't work properly for Zabbix users and guests.

Comment by Volker Fröhlich [ 2013 Nov 08 ]

As I understand from https://www.zabbix.com/documentation/2.2/manual/introduction/whatsnew220#displaying_name_and_surname_with_acknowledgments, unprivileged users can now access full names through the API. If that's the case, this issue should be a breeze and sorted out for the sake of consistency.

Comment by Volker Fröhlich [ 2013 Nov 21 ]

Turns out that's an SQL hack in acknow.php:194.

Comment by Volker Fröhlich [ 2013 Dec 03 ]

Forward-ported to 2.2

Comment by Eduards Samersovs (Inactive) [ 2014 Feb 14 ]

Implemented in development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-421

Comment by Oleg Egorov (Inactive) [ 2014 Feb 18 ]

Don't make code refactoring, if someone make fix in the same file

Eduards It's not a proper argument to write a bad code ))

oleg.egorov ?

Comment by Oleg Egorov (Inactive) [ 2014 Feb 18 ]

(1) Not implemented changes from ZBXNEXT-1104 for events (tr_events.php)

Eduards RESOLVED r.42878

oleg.egorov In actions.inc.php:985 used isset(). $alerts return API and $alerts is inside foreach loop
Eduards RESOLVED r.42934
oleg.egorov CLOSED

Comment by Oleg Egorov (Inactive) [ 2014 Feb 24 ]

(2) Code refactoring

if (in_array($page['type'], array(PAGE_TYPE_JS, PAGE_TYPE_HTML_BLOCK))) {

Please revert old code

if (PAGE_TYPE_JS == $page['type'] || PAGE_TYPE_HTML_BLOCK == $page['type']) {

Don't use array and in_array construction if condition count at less <= 2

Eduards RESOLVED r.42941

oleg.egorov CLOSED

Comment by Oleg Egorov (Inactive) [ 2014 Feb 24 ]

TESTED!

Comment by Eduards Samersovs (Inactive) [ 2014 Feb 25 ]

Fixed in versions 2.3.0 (trunk) r.42950

Comment by Pavels Jelisejevs (Inactive) [ 2014 Feb 26 ]

(3) Documentation needs to be updated. A related documentation issue - ZBXNEXT-1533.

martins-v Updated documentation (for both issues ZBXNEXT-421 and ZBXNEXT-1533 together):

<richlv> changes from (5) should be noted in whatsnew and also in screen docs

martins-v

have been the updated. RESOLVED.

<richlv> seems ok to me, CLOSED

Comment by Pavels Jelisejevs (Inactive) [ 2014 Feb 26 ]

(4) The user.get request retrieves users for all alerts, instead of the ones that are displayed on the selected page.

Eduards RESOLVED r.43012

jelisejev Now when calculating the maximum time period we olny consider alerts of users that are displayed on the selected page.

Eduards RESOLVED r.43044

jelisejev Please review my changes in r43055.

Eduards CLOSED

Comment by Eduards Samersovs (Inactive) [ 2014 Feb 27 ]

(5) Display user in "History of actions" screen item

Eduards RESOLVED r.43046

jelisejev CLOSED.

Comment by Eduards Samersovs (Inactive) [ 2014 Feb 27 ]

Fixed in versions 2.3.0 (trunk) r.43056

Generated at Fri Apr 26 14:02:48 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.