Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Fri Mar 29, 2024 8:24 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
PostPosted: Tue Jul 26, 2016 3:22 am 
Offline
Newbie

Joined: Fri Jul 22, 2016 12:11 am
Posts: 2
Hi all.

After upgrade Open-Audit 1.8.2 to 1.12.6 some report error in some queries.

In system group device list when select Alert the report error are showed;

A Database Error Occurred
Error Number: 1146
Table 'openaudit.oa_alert_log' doesn't exist
/* M_oa_report::get_report */ SELECT oa_alert_log.alert_id, oa_alert_log.system_id, oa_alert_log.timestamp, system.man_ip_address, system.hostname, system.man_description, oa_alert_log.alert_details FROM system, oa_alert_log, oa_group_sys WHERE oa_alert_log.user_id is NULL AND oa_alert_log.system_id = system.system_id AND oa_alert_log.system_id = oa_group_sys.system_id AND oa_group_sys.group_id = @group GROUP BY oa_alert_log.alert_id ORDER BY oa_alert_log.timestamp DESC
Filename: models/m_oa_report.php
Line Number: 223

In system group device list when select Alerts-Software the report error are showed;

A Database Error Occurred
Error Number: 1146
Table 'openaudit.oa_alert_log' doesn't exist
/* M_oa_report::get_report */ SELECT oa_alert_log.alert_id, oa_alert_log.system_id, oa_alert_log.timestamp, system.man_ip_address, system.hostname, system.man_description, oa_alert_log.alert_details FROM system, oa_alert_log, oa_group_sys WHERE oa_alert_log.user_id is NULL AND oa_alert_log.system_id = system.system_id AND oa_alert_log.timestamp > DATE_SUB(NOW(),INTERVAL 100 DAY) AND oa_alert_log.system_id = oa_group_sys.system_id AND oa_alert_log.alert_details LIKE 'software%' AND oa_group_sys.group_id = @group GROUP BY oa_alert_log.alert_id ASC
Filename: models/m_oa_report.php
Line Number: 223

In system group device list Device Detais are duplicated, one option works, the other no, I drop in mysql the incorrect option.

When I choose Instaled - Software the error below are showed:

Error Number: 1146
Table 'openaudit.sys_sw_windows' doesn't exist
/* M_oa_report::get_report */ SELECT system.system_id, system.hostname, system.man_status, sys_sw_software.software_name, sys_sw_software.software_installed_by, date(sys_sw_software.software_installed_on) as software_installed_on, sys_sw_software.software_version, sys_sw_windows.windows_user_name, date(sys_sw_software.first_timestamp) as first_timestamp FROM system LEFT JOIN sys_sw_windows ON (system.system_id = sys_sw_windows.system_id AND system.timestamp = sys_sw_windows.timestamp) LEFT JOIN sys_sw_software ON (system.system_id = sys_sw_software.system_id and system.first_timestamp < sys_sw_software.first_timestamp) WHERE sys_sw_software.software_name = (SELECT software_name FROM sys_sw_software WHERE software_id = '157646' LIMIT 1) AND date(sys_sw_software.first_timestamp) = date('0') GROUP BY system.system_id
Filename: models/m_oa_report.php
Line Number: 223

Any idea how can I fix the errors?

Thanks. :D


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 29, 2016 6:05 am 
Offline
Newbie

Joined: Fri Jul 22, 2016 12:11 am
Posts: 2
Im trying to fix the problem, I made the update again in snapshot and get the renamed tables.

RENAME TABLE sys_hw_bios TO `bios`
RENAME TABLE sys_hw_hard_drive TO `disk`
RENAME TABLE sys_sw_dns TO `dns`
RENAME TABLE sys_sw_log TO `log`
RENAME TABLE sys_hw_memory TO `memory`
RENAME TABLE sys_hw_module TO `module`
RENAME TABLE sys_hw_monitor TO `monitor`
RENAME TABLE sys_hw_motherboard TO `motherboard`
RENAME TABLE sys_hw_optical_drive TO `optical`
RENAME TABLE sys_sw_netstat TO `netstat`
RENAME TABLE sys_hw_network_card TO `network`
RENAME TABLE sys_hw_partition TO `partition`
RENAME TABLE sys_hw_processor TO `processor`
RENAME TABLE sys_hw_scsi_controller TO `scsi`
RENAME TABLE sys_sw_group TO `user_group`
RENAME TABLE sys_sw_pagefile TO `pagefile`
RENAME TABLE sys_sw_print_queue TO `print_queue`
RENAME TABLE sys_sw_route TO `route`
RENAME TABLE sys_sw_service TO `service`
RENAME TABLE sys_sw_share TO `share`
RENAME TABLE sys_sw_software TO `software`
RENAME TABLE sys_sw_software_key TO `software_key`
RENAME TABLE sys_hw_sound TO `sound`
RENAME TABLE sys_sw_user TO `user`
RENAME TABLE sys_sw_variable TO `variable`
RENAME TABLE sys_hw_video TO `video`
RENAME TABLE sys_sw_virtual_machine TO `vm`
RENAME TABLE sys_hw_warranty TO `warranty`
RENAME TABLE sys_sw_windows TO `windows`
RENAME TABLE oa_alert_log TO `change_log`

I find where the report get the information of this option and made a update in MySQL table:

UPDATE oa_report SET report_sql='SELECT change_log.id, change_log.system_id, change_log.timestamp, system.man_ip_address, system.hostname, system.man_description, change_log.details FROM system, change_log, oa_group_sys WHERE change_log.user_id is NULL AND change_log.system_id = system.system_id AND change_log.system_id = oa_group_sys.system_id AND oa_group_sys.group_id = @group GROUP BY change_log.id ORDER BY change_log.timestamp DESC' WHERE report_id='42';

UPDATE oa_report SET report_sql="SELECT change_log.id, change_log.system_id, change_log.timestamp, system.man_ip_address, system.hostname, system.man_description, change_log.details FROM system, change_log, oa_group_sys WHERE change_log.user_id is NULL AND change_log.system_id = system.system_id AND change_log.timestamp > DATE_SUB(NOW(),INTERVAL 100 DAY) AND change_log.system_id = oa_group_sys.system_id AND change_log.details LIKE 'software%' AND oa_group_sys.group_id = @group GROUP BY change_log.id ASC" WHERE report_id='43';

The report back but some erros in php

Column Icon

A PHP Error was encountered
Severity: Notice
Message: Undefined property: stdClass::$icon
Filename: theme-tango/v_report_alerts.php
Line Number: 64
.png" style='border-width:0px;' title="" alt=""/>

Column DB Table

A PHP Error was encountered
Severity: Notice
Message: Undefined property: stdClass::$db_table
Filename: theme-tango/v_report_alerts.php
Line Number: 66

Column DB Action

A PHP Error was encountered
Severity: Notice
Message: Undefined property: stdClass::$db_action
Filename: theme-tango/v_report_alerts.php
Line Number: 67

Im keep going, if I find more I will report.

Tks.


Attachments:
File comment: Image of error
php-error.png
php-error.png [ 17.3 KiB | Viewed 6208 times ]
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group