Welcome Guest, you are in: Login

Water Mission Country Programs Wiki

RSS RSS

Navigation




Search the wiki
»

PoweredBy

EventLog Table Help

RSS
Modified on 2010/05/11 16:27 by EventLogFormatter Categorized as Uncategorized

EventLog Tables

Autogenerates a table based on an eventlog and show the associated eventlog entries, all based on user input.

Table of Contents [Hide/Show]


Administrators

Administrator might need to be involved depending on the security settings of the machine which is hosting the wiki and the remote machines with eventlogs which might be contacted.
You can verify that the formatter is working by opening this test page (be patient, it may be slow).

Markup Usage

What can you do?
  • Generate a table of eventlog entries.
    • Filter eventlog by 1 or more of the following: Id, Type, Date, Time, Source, Category, Event, User, Computer and Description
    • Contact remote machine's event logs (permission setup might be required)
    • Limit your search result by setting an upper limit
  • Format your table
    • Add a table heading
    • Override column headers and make them more user friendly
    • Change table style
    • Change columns header style
    • Change row style
    • Use one of 3 predefined styles bw,bg,gb
    • Combine several of the above options



Usage:

{EventLog(Machine,Log,Filter,Results,Heading,Columns,Headers,TblStyle,HeadStyle,RowStyle)}

Where:
  • Data:
    • Machine - Name/IP of a the machine to fetch the eventlog from. Leave blank for localhost.
    • Log - Name of the log, must be encapsulated in ' ' (ex. 'Application').
    • Filter - Filter to limit the search results, must be encapsulated in ' ' (ex. 'type=error,id=1'). Use the following filters, seperate by ",".
      • "Id" - Index id of the entry
      • "Type" - Must be one of:
        • Information
        • Warning
        • Error
        • InfoAndWarn
        • InforAndError
        • WarnAndError
      • "Date" - Date and time the eventlog entry was created, may depend on machine setup (ex. 01-01-2010 or 01-01-2010 01:30:00 )
        • This is a eventlogdate >= myDate test.
        • Alternatively use: -1 or -x for days to look back, ex ,date=-1,
      • "Time" - Date and time the eventlog was written, may depend on machine setup (ex. 01-01-2010 or 01-01-2010 01:30:00 )
        • Alternatively use: -1 or -x for days to look back, ex ,date=-1,
        • This is always a eventlogtime >= myTime test.
      • "Source" - Source of the eventlog entry
      • "Category" - Category of the eventlog entry
      • "Event" - EventId/InstanceId of the eventlog entry
      • "User" - User name of the eventlog entry
      • "Computer" - Computer name of the eventlog entry
      • "Description" - Actual eventlog entry description. When using this field a string search will be performed, so use keywords such as: MyApp, database or other.
        • "' '" - does not apply to this field, search must match entry string to reveal results.
    • Results - Number which limits the amount of results returned, use this with care since it may be VERY cpu intensive to query the eventlog and scan for matches. Default is 15 results.
  • Formatting:
    • TblHeading - Heading of the table, must be encapsulated in ' ' ex. 'My Heading'
    • Columns - Columns and column order starting at 0, must be encapsulated in ' ' ex. 1,2,3 or 1,0,3. See the next 2 lines for special formatting of columns.
      • If left blank, the 4 columns (Type,Date,Source,Description) will be shown.
      • If valued 'all', all possible columns will be shown (10 in all)
    • Headers - Columnheaders will override default naming, must be encapsulated in ' ' ex. 'Head1,Head2'
    • TblStyle - Style format, must be encapsulated in ' ' ex. 'align="center" style="color: #000000;"'
    • HeadFStyle - Style format, must be encapsulated in ' ' ex. 'align="center" style="color: #000000;"'
    • RowStyle - Style format,must be encapsulated in ' ' ex. 'align="center" style="color: #000000;"'

  • All "," must always be included in the tag, at all times, even if the content is blank.



Examples

All examples here contacts the local eventlog only for better readbility.
Minimum
Markup:

{EventLog(,'Application',,3,,,,,,) }

Result:

TypeDateSourceDescription
Image Information01-01-2010 01:00:00WinlogonDescription
Image Warning01-01-2010 01:00:00WinlogonDescription
Image Error01-01-2010 01:00:00WinlogonDescription

All columns
Markup:

{EventLog(,'Application',,3,'all',,,,,,) }

Result:

IdTypeDateTimeSourceCategoryEventUserComputerDescription
0Image Information01-01-2010 01:00:0001-01-2010 01:00:00Winlogon0XUserMyMachineDescription
1Image Warning01-01-2010 01:00:0001-01-2010 01:00:00Winlogon0YUserMyMachineDescription
2Image Error01-01-2010 01:00:0001-01-2010 01:00:00Winlogon0ZUserMyMachineDescription

Filter - Type 1
Markup:

{EventLog(,'Application','type=error',3,,,,,,) }

Result:

TypeDateSourceDescription
Image Error01-01-2010 01:00:01WinlogonDescription
Image Error01-01-2010 01:00:02WinlogonDescription
Image Error01-01-2010 01:00:03WinlogonDescription

Filter - Type 2
Markup:

{EventLog(,'Application','type=warnanderror',3,,,,,,) }

Result:

TypeDateSourceDescription
Image Error01-01-2010 01:00:01WinlogonDescription
Image Warning01-01-2010 01:00:02WinlogonDescription
Image Error01-01-2010 01:00:03WinlogonDescription

Filter - Date 1
Markup:

{EventLog(,'Application','date=01-01-2010',3,,,,,,) }

Result:

TypeDateSourceDescription
Image Information01-01-2010 00:00:00WinlogonDescription
Image Warning01-01-2010 01:00:00WinlogonDescription
Image Error01-02-2010 02:00:00WinlogonDescription

Filter - Date 2
Markup:

{EventLog(,'Application','date=01-01-2010 01:00:00',3,,,,,,) }

Result:

TypeDateSourceDescription
Image Information01-01-2010 01:00:00WinlogonDescription
Image Warning01-01-2010 02:00:00WinlogonDescription
Image Error01-02-2010 03:00:00WinlogonDescription

Filter - Description
Markup:

{EventLog(,'Application','description=database',3,,,,,,) }

Result:

TypeDateSourceDescription
Image Information01-01-2010 01:00:00Winlogon....dataBase....
Image Warning01-01-2010 02:00:00Winlogon....DATABase....
Image Error01-02-2010 03:00:00Winlogon....DataBase....

Filter - Multiple filters
Markup:

{EventLog(,'Application','type=information,source=winlogon,description=license',3,,,,,,) }

Result:

TypeDateSourceDescription
Image Information01-01-2010 01:00:00Winlogon....license....
Image Information01-01-2010 01:00:00Winlogon....license....
Image Information01-01-2010 01:00:00Winlogon....license....

Styling

Default style
Depends on your chosen theme.
Markup:

{EventLog(,'Application',,,,,,,,) }

Result:

TypeDateSourceDescription
Image Information01-01-2010 01:00:00WinlogonDescription
Image Warning01-01-2010 01:00:00WinlogonDescription
Image Error01-01-2010 01:00:00WinlogonDescription



Predefined style: Black and White
Markup:

{EventLog(,'Application',,,,,,'bw','bw','bw') }

Result:

TypeDateSourceDescription
Image Information01-01-2010 01:00:00WinlogonDescription
Image Warning01-01-2010 01:00:00WinlogonDescription
Image Error01-01-2010 01:00:00WinlogonDescription





Predefined style: Black and Grey
Markup:

{EventLog(,'Application',,,,,,'bg','bg','bg') }

Result:

TypeDateSourceDescription
Image Information01-01-2010 01:00:00WinlogonDescription
Image Warning01-01-2010 01:00:00WinlogonDescription
Image Error01-01-2010 01:00:00WinlogonDescription



Predefined style: Green and Black
Markup:

{EventLog(,'Application',,,,,,'gb','gb','gb') }

Result:

TypeDateSourceDescription
Image Information01-01-2010 01:00:00WinlogonDescription
Image Warning01-01-2010 01:00:00WinlogonDescription
Image Error01-01-2010 01:00:00WinlogonDescription



Custom style:
Markup:

{EventLog(,'Application',,,,,,'cellspacing="10" style="background-color: #88CC33; color: #000000;"','style="color: #00AAAA;"','style="color: #BBBB00;"') }

Result:

TypeDateSourceDescription
Image Information01-01-2010 01:00:00WinlogonDescription
Image Warning01-01-2010 01:00:00WinlogonDescription
Image Error01-01-2010 01:00:00WinlogonDescription



Custom heading + headers:
Markup:

{EventLog(,'Application',,,'My Heading',,'H1,H2,H3,H4',,,) }

Result:

My Heading
H1H2H3H4
Image Information01-01-2010 01:00:00WinlogonDescription
Image Warning01-01-2010 01:00:00WinlogonDescription
Image Error01-01-2010 01:00:00WinlogonDescription



Custom heading + headers + order:
Markup:

{EventLog(,'Application',,,'My Heading','9,2,4,1','Dscr,When,From,Cat',,,) }

Result:

My Heading
DscrWhenFromCat
Description01-01-2010 01:00:00WinlogonImage Information
Description01-01-2010 01:00:00WinlogonImage Warning
Description01-01-2010 01:00:00WinlogonImage Error

ScrewTurn Wiki version 3.0.2.509. Some of the icons created by FamFamFam.


Disclaimer