Outputting Audit Query Results to a Web Page

By: ab

September 12, 2007 2:29 am

Reads: 210




A Forum reader recently asked:

“I’m using a Novell Audit 6.5 Server with Audit 1.0, logging to a mySQL database. Does anyone know of a good way to output the the database’s logged event into a webpage? For example, I need the Login name, date, time, and IP address of the computer that caused the event.”

And here’s the response from Aaron Burgemeister …


iManager has some canned queries, and you can customize them as well. If you want to be able to “roll your own” and have them available outside iManager, you’ll probably need your own application to do so, which is trivial. If you are familiar with PHP and MySQL, you could do this on any box you currently have (NetWare, Linux, various types of Unix, even Windows). Also, if you own Audit you can use Crystal (also, of course, if you own Crystal via some other source). Free reporting software is also available, such as Jasper Reports.

A worst-case scenario would just involve a simple PHP page that looked up the information:

$query = 'SELECT * FROM naudit WHERE <conditionsGoHere>;
$return0 = mysql_query($query0);
for($ctr0 = 0; $ctr0 <mysql_count($return0); ++$ctr0)
  $row0 = mysql_fetch_array($return0);
  print $row0['<columnYouWant>'] . $row0['<anotherColumnYouWant>'] .
'<br /><br />'

Something like that … See php.net and mysql.com for documentation to refine that a bit.

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Tags: , ,
Categories: iManager, Technical Solutions

Disclaimer: As with everything else at NetIQ Cool Solutions, this content is definitely not supported by NetIQ, so Customer Support will not be able to help you if it has any adverse effect on your environment.  It just worked for at least one person, and perhaps it will be useful for you too.  Be sure to test in a non-production environment.