Technical Tip

Outputting Audit Query Results to a Web Page

Author Info

12 September 2007 - 1:29am
Submitted by: aburgemeister

tip
Reads:

1415

Score:
2
2
2
 
Comments:

0

Problem

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 ...

Solution

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:

<?php
$query = 'SELECT * FROM naudit WHERE <conditionsGoHere>;
mysql_connect('<parametersHere>';
mysql_select_db('<dbNameHere>');
$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.


Author Info

12 September 2007 - 1:29am
Submitted by: aburgemeister




User Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <p> <a> <em> <i> <cite> <code> <img> <ul> <ol> <li> <div> <dl> <dt> <dd> <b> <strong> <h1> <h2> <h3> <pre> <table> <td> <tr> <th> <blockquote>
  • Lines and paragraphs break automatically.
  • Glossary terms will be automatically marked with links to their descriptions. If there are certain phrases or sections of text that should be excluded from glossary marking and linking, use the special markup, [no-glossary] ... [/no-glossary]. Additionally, these HTML elements will not be scanned: a, abbr, acronym, code, pre.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
16 + 2 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

© 2008 Novell, Inc. All Rights Reserved.