How to create a list of all reports and Dashboard in DX Netops
search cancel

How to create a list of all reports and Dashboard in DX Netops

book

Article ID: 382586

calendar_today

Updated On:

Products

Network Observability CA Performance Management

Issue/Introduction

For auditing I need a way to create a list of all reports and Dashboards in DX Netops.  A list of all personal/private reports in DX NetOps

Environment

Dx NetOps Performance Management 23.x

Resolution

Run the following query in Portal / mysql:

 select ud.UserID, ud.Name, rd.RoleID, ifnull(rd.Name, rd_i18n.Name) as rolename, ifnull(m.Name, m_i18n.Name) as MenuName ,ifnull(pi2.pageTitle, pi2_i18n.pageTitle) as PageTitle from user_definitions ud join role_definitions rd on ud.RoleID = rd.RoleID left join role_definitions_i18n rd_i18n on ud.RoleID = rd_i18n.RoleID and rd_i18n.CultureID = 'en-US' join role_menus rm on rd.RoleID = rm.RoleID join menus m on rm.MenuID = m.MenuID left join menus_i18n m_i18n on rm.MenuID = m_i18n.MenuID and m_i18n.CultureID = 'en-US' join menus submenu on m.MenuID = submenu.ParentId left join menus_i18n submenu_i18n on submenu.MenuID = submenu_i18n.MenuID and submenu_i18n.CultureID = 'en-US' join page_info2 pi2 on submenu.PageID = pi2.PageID left join page_info2_i18n pi2_i18n on pi2.PageID = pi2_i18n.PageID and pi2_i18n.CultureID = 'en-US' order by ud.Name, ifnull(m.Name, m_i18n.Name) INTO OUTFILE '/tmp/report_audit.txt';

 


If you remove the piece in bold it will write to the screen

 

If you add the piece in bold (to save to a file) it will likely give you this error:

ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

You would have to do this to resolve the error:

Add the following line at the end of the [mysqld] in /etc/my.cnf
[mysqld]
secure_file_priv               = ''

After connecting to mysql you can run the following command:
SHOW VARIABLES LIKE 'secure_file_priv';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| secure_file_priv |NULL    |
+------------------+-------+


Restart mysql 
systemctl stop mysql
systemctl start mysql


Connect to mysql again and re-run the 'show variables' command
SHOW VARIABLES LIKE 'secure_file_priv';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| secure_file_priv |             |
+------------------+-------+

Now run your query that you wish to save:

It will now successfully save to /tmp/audit.log

Additional Information
secure_file_priv               = '' (this is 2 single quotes, not a double quote)