3. What is this Show and Tell
Reporting in your Domino environment covers a lot of ground
We’ve focused on reports that are immediately useful to Administrators
Reports that we’ve seen customers use time and time again
Reports that help you explain your environment to your boss
Reports that help justify how good your environment is
We’ve focused on reporting via Microsoft Excel
Why ? Just about everyone has it.
Its a consistent base
It can be used for far far more than just spreadsheets
Saturday, 8 June 13
4. Who is Wouter?
Wouter is the founder of Trust Factory
Recently acquired by Panagenda
Knows more about Domino infrastructure
analysis than anyone else in the world
Lives in Den Haag - (the Hague) in the
Netherlands (Holland)
Saturday, 8 June 13
5. Who is Bill
Bill is a PCLP in both Administration and
Development in v3, v4, v5, v6, v7, v8, and v8.5
CEO and one of the founders of hadsl
Subject matter specialist on large
environment user lifecycle management
Lives near Aberdeen, Scotland
Saturday, 8 June 13
7. So why report on your
environment?
Reporting every week or every month:
Is tedious and time consuming, but forces you to review your environment
Shows your management that you are on top of issues
You can manually report
Go to each servers console, and type in ‘show stat’ or ‘show server’
Go to the administration client and type in the hard drive available/free figures
Go to the directory and note down the domino release version
Or you can automate it
Saturday, 8 June 13
8. Automated Domino Reporting
We’ve taken several reports that we’ve done for customers
And packaged them into an Excel Spreadsheet
It runs on a windows PC, and requires Excel 2010
When you click on a report,
It opens your notes client (you may be prompted for a password)
It connects to your home notes server
It figures out your environment from your directory
It produces a beautifully formatted report, ready for your boss.
Some reports require elevated privileges
Such as READ ONLY console access.
Saturday, 8 June 13
9. Some notes on Excel
We’re using Excel 2010
This appears to be quite a popular version out there in userland
None of the features are sophisticated - this will probably quite happily work in earlier
or later versions
We’ve not had time to test it on other versions
Your Mileage May Vary
We’re using ‘Macros’ within Excel
So you have to enable Macros
Saturday, 8 June 13
10. How to write reports in Excel
Start Excel
Press Alt-F11 to get the VBA Editor
This will look remarkably familiar..
Create a new Class
Add a reference to ‘domobj.tlb’ from VBA
Its in your Notes client program directory
Most LotusScript calls to the Notes object
classes are exactly the same
You will be prompted for your Notes
Client password:
Saturday, 8 June 13
12. Which reports have we chosen?
1. Notes.ini
Lets collect notes.ini from all your servers. This helps you figure out what has changed
2. server docs & config docs
Lets collect all these from all your servers, and show you the differences
3. Mailfile
Lets show you some statistics from your (or anyone elses) mailfile
sender, author, timestamp, size,
4. Server Disk space and Performance
Lets show you how full your disks are and how they are performing
5. Inactive users
Lets show you how effective your HR department are about telling you about leavers
Saturday, 8 June 13
13. 1. Notes.ini - manually
This report quickly allows you to compare important Notes.ini settings across servers
Aids environmental consistency
Good for troubleshooting and diagnosis
You can manually create this report by:
Going into the administration client
For each Domino server in your public directory
Open console
Type in ‘Show Conf *’
Copy and paste the results to Excel
You can imagine that this gets a little tedious
We’ve created this in Excel for you
Saturday, 8 June 13
15. 1. Notes.ini - Automatically
Click on the blue button beside 1. Collect Notes.ini
Sit back and wait.
This will
Open your Notes client
You may be prompted for your Notes client password
It will then find your home notes server
It will open the directory on your home notes server
It will then collect all the servers listed in the ‘servers’ view
For each server,
It will open a remote console session
send ‘Show Conf *’
Collect and parse the results
Saturday, 8 June 13
17. 1. Notes.ini Automatically
This has
Scanned all servers in your directory
Servers it cannot connect to have been coloured in Red
Listed all notes.ini parameters from each server
Parsed them into columns and rows within Excel
You can now
Run comparisons and searches on this data using Excel
We recommend:
You run this on a weekly/monthly basis during any server upgrade process to
snapshot progress and/or provide backup of configuration information
Use it for server audits
Saturday, 8 June 13
18. But how do we create this in
Open Excel 2010
Open the VBE Editor
Alt+F11
Create a new Macro, called ‘ServerNotesIni
The first routine it calls is
ServerNotesIniRH
Sets up the ReportHeader
Then it creates a new
DominoReporting object
Gets a list of servers
For each server, gets the notes.ini values
Writes it to the spreadsheet
Finally, selects all columns, and autofits the
columns to the content
Sub ServerNotesIni()
'
' Run the server Notes.ini report
'
On Error GoTo ErrorHandler
Call ServerNotesIniRH
Dim dr As New DominoReporting
If Not dr.getServers() Then
Debug.Print "Failed to get a list of servers"
Exit Sub
End If
Dim servers() As String, i As Integer
Call dr.copyToArray(dr.getSelectedServers(), servers)
Range("A" + CStr(2 + i)).Select
For i = 0 To UBound(servers)
Call ServerNotesIniRS(dr, servers(i))
Next i
Columns("A:P").EntireColumn.AutoFit
exitFunction:
Exit Sub
ErrorHandler:
Debug.Print "ServerNotesIni: Run time error: " + Error$
Resume exitFunction
End Sub
Saturday, 8 June 13
19. 1. Notes.ini Code
We call a private Sub
ServerNotesIniRH
RH - Report Header
It sets up a new worksheet
Called ‘Notes.ini’
And sets up the headers
Columns for
Servers
Variable
Value
Private Sub ServerNotesIniRH()
On Error GoTo ErrorHandler
If (ActiveSheet.Name = "Notes.Ini") Then
Else
Sheets.Add After:=Sheets(Sheets.count)
ActiveSheet.Name = "Notes.Ini"
End If
' Now set up the titles
Range("A1").Select
ActiveCell.FormulaR1C1 = "Server"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "Variable"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "Value"
Range("A2").Select
exitFunction:
Exit Sub
ErrorHandler:
Debug.Print "ServerNotesIniRH: Run-time error: " +
Error$
Resume exitFunction
End Sub
Saturday, 8 June 13
20. DominoReporting Object Private
The DominoReporting object has a number of private
properties
used internally
For instance
session is a NotesSession object -used by everything
Username, servername, mailfile
Plucked from the users notes.ini file
NAB is a NotesDatabase representing the directory
on the users home mail server
nabServerView is ($Servers)
nabConfigView is ($ServerConfig)
The constructor is automatically called, and sets most
of these
Private isOkay As Boolean
Private session As domino.NotesSession
Private homeServer As domino.NotesName
Private mailfile As String
Private thisUser As domino.NotesName
Private nab As domino.NotesDatabase
Private nabServersView As domino.NotesView
Private nabConfigView As domino.NotesView
Private selectedServers() As String
Saturday, 8 June 13
21. DominoReporting Object
Private Sub Class_Initialize()
On Error GoTo ErrorHandler
isOkay = False
Debug.Print "New instance of DominoReporting Class"
Set session = New domino.NotesSession
Call session.Initialize
Set thisUser = session.CreateName(session.EffectiveUserName)
Set homeServer = session.CreateName(session.GetEnvironmentString("MailServer", True))
mailfile = session.GetEnvironmentString("MailFile", True)
Debug.Print "User: " + thisUser.Abbreviated + " has home server: " +
homeServer.Abbreviated + " and mailfile: " + mailfile
isOkay = True
exitFunction:
Exit Sub
ErrorHandler:
Debug.Print "Run time error: " + Error$ + " at line: " + CStr(Erl)
Resume exitFunction
End Sub
Saturday, 8 June 13
22. DominoReporting.getServers()
GetServers
looks in the ($Servers) Directory view
Gets a list of server abbreviated names
Populates a simple String array with those names
Returns True if successful
Saturday, 8 June 13
23. DominoReporting.getServers()
Public Function getServers() As Boolean
getServers = False
On Error GoTo ErrorHandler
If Not isOkay Then
Debug.Print "The DominoReporting class has not initialised
correctly"
Exit Function
End If
If nab Is Nothing Then
If Not getNab() Then
Debug.Print "getServers: I cannot open the directory"
Exit Function
End If
End If
If nabServersView Is Nothing Then
Set nabServersView = nab.GetView("($Servers)")
End If
If (nabServersView Is Nothing) Then
Debug.Print "getServers: I cannot open NAB view: ($Servers)"
Exit Function
End If
ReDim selectedServers(0)
Saturday, 8 June 13
24. DominoReporting.getServers()
ReDim selectedServers(0)
' Now get a list of servers in this directory
Dim doc As domino.NotesDocument, count As Long
Set doc = nabServersView.GetFirstDocument
While Not doc Is Nothing
Dim nn As domino.NotesName
Set nn = session.CreateName(doc.GetItemValue("ServerName")(0))
selectedServers = addString(nn.Abbreviated, selectedServers)
count = count + 1
Set doc = nabServersView.GetNextDocument(doc)
Wend
Debug.Print "getServers: I found: " + CStr(count) +
" servers in the ($Servers) view"
getServers = True
exitFunction:
Exit Function
ErrorHandler:
Debug.Print "getServers: Run-time error: " + Error$ + " at line: "+ CStr(Erl)
Resume exitFunction
End Function
Saturday, 8 June 13
25. DominoReporting.ServerNotesIn
ServerNotesIniRS
RS stands for Report each Server
Is passed in the Domino Reporting object
The Target Server name
It then calls the DominoReporting routine ‘runConsoleCommand’
with ‘Show Conf *’
This lists the notes.ini variables
Parses these into separate String Array pieces
Each of the lines is then written to the spreadsheet
Saturday, 8 June 13
26. DominoReporting.ServerNotesIn
Private Sub ServerNotesIniRS(dr As DominoReporting, serverName As String)
On Error GoTo ErrorHandler
Dim ini() As String, i As Long
ini = dr.runConsoleCommand(serverName, "show conf *")
If (ini(0) = "") Then
ActiveCell.FormulaR1C1 = serverName
Call makeCurrentCellRed
ActiveCell.Offset(1, 0).Select ' Move down
Else
Saturday, 8 June 13
27. DominoReporting.ServerNotesIn
For i = 0 To UBound(ini)
ActiveCell.FormulaR1C1 = serverName
Dim thisLine As String, V As Variant
thisLine = ini(i)
If (thisLine <> "") Then
V = Split(thisLine, "=")
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = V(0)
If (UBound(V) > 0) Then
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = V(1)
ActiveCell.Offset(1, -2).Select
Else
ActiveCell.Offset(1, -1).Select
End If
Else
ActiveCell.Offset(1, 0).Select ' move down
End If
Next i
End If
Saturday, 8 June 13
30. DominoReporting.runConsoleCo
Function runConsoleCommand(serverName As String, consoleCommand As String) As String()
On Error GoTo ErrorHandler
Dim ret() As String
ReDim ret(0)
runConsoleCommand = ret
If serverName = "" Then Exit Function
If consoleCommand = "" Then Exit Function
Dim rawret As String
rawret = session.SendConsoleCommand(serverName, consoleCommand)
Debug.Print "runConsoleCommand: Server: " + serverName + ", Command: "
+ consoleCommand + ", result: " + rawret
Call copyToArray(Split(rawret, Chr(10)), ret)
runConsoleCommand = ret
exitFunction:
Exit Function
ErrorHandler:
Debug.Print "runConsoleCommand: Run time error: " + Error$
+ " at line: " + CStr(Erl)
Resume exitFunction
End Function
Saturday, 8 June 13
31. 2. Server Docs & Configuration
This report quickly allows you to compare important settings in Server Documents and
Server Configuration Documents
Aids environmental consistency
Good for troubleshooting and diagnosis
You can manually create this report by:
Going into each server document and server configuration document
And copying the values for each field
Then copy and paste the results to Excel
You can imagine that this gets a little very tedious
We’ve created this in Excel for you
Saturday, 8 June 13
33. 2. Server Docs & Configuration
Click on the blue button beside 2. Server Docs & Configuration
Sit back and wait.
This will
Open your Notes client
You may be prompted for your Notes client password
It will then find your home notes server
It will open the directory on your home notes server
It will then collect all the servers listed in the ‘servers’ view
For each server,
It will copy the values from the server document and server configuration
document
Collect and parse the results
Saturday, 8 June 13
35. 2. Server Docs & Configuration
This has
Scanned all servers in your directory
Listed all server document and server configuration document values from each server
Parsed them into columns and rows within Excel
You can now
Run comparisons and searches on this data using Excel
We recommend:
You run this on a weekly/monthly basis during any server upgrade process to
snapshot progress and/or provide backup of configuration information
Use it for server audits
Saturday, 8 June 13
36. 3. Mail File Reporting - manually
This report quickly exports your inbox to an Excel sheet
Allows fast comparison and lookup
Allows an end-user to change sort order, compute new columns
You can manually create this report by:
Go to your inbox
Select all Documents
Edit Menu, Copy as Table
Paste into Excel
Whilst straightforward, may be error prone.
We’ve created this in Excel for you
Saturday, 8 June 13
38. 3. Mail File Reporting
Click on the blue button beside 3. Mail File Reporting
This will
Open your Notes client
You may be prompted for your Notes client password
It will then open your mailfile on your home notes server
It will open the Inbox
It will then collect all the email information listed in the inbox and
Collect and parse the results
Saturday, 8 June 13
40. 3. Mail File Reporting
This has
Exported your inbox information to Excel
Parsed them into columns and rows within Excel
You can now
Mine your inbox data using Excel
This assumes you have far more information in there than we do!
We recommend:
You can give this to end users to help tame huge inboxes
Saturday, 8 June 13
41. 4. Server Disk Space
This report quickly allows you to examine your server disk capacity
Capacity Management
Good for proving to management that
You have/have not enough disk
The disks are fast/not fast enough
You can manually create this report by:
Going into the administration client and for each server
Note the disk capacity, Free and %Free for each server hard drive
Run ‘Show Stat Database.RM.Logger.IO.Avg.OS.Write.Time” &
“Show Stat Database.RM.Logger.IO.Avg.Write.Time”
Put them in the Excel sheet!
You can imagine that this gets time-consuming
Saturday, 8 June 13
43. 4. Server Disk Space
Click on the blue button beside 4. Server Disk space....
This will
Open your Notes client
You may be prompted for your Notes client password
It will open the directory on your home notes server
It will then collect all the servers listed in the ‘servers’ view
For each server,
It will figure out the data drive, DAOS drive and Transaction Log Drive
Find out (using ‘Show Stat’) what each drive capacity and %Free space is
Find out (using ‘Show Stat’) the performance of your disk subsystem
Collect and parse the results
This means
You have to have at least read-only access to the directory
You must have at least read-only console access to all servers
Saturday, 8 June 13
45. 4. Server Disk Space and
This has
Scanned all servers in your directory
Unavailable servers are in red
Worked out, using the servers notes.ini,
the Data Drive, DAOS Drive and Transaction Logging Drive
Worked out the drives capacity
Worked out the drives performance (in milliseconds)
Parsed them into columns and rows within Excel
You can now
Measure your entire environment
We recommend:
Saturday, 8 June 13
46. 5. Inactive users - manually
This report quickly shows you users by last login date
However, this information is not kept on the person document
You need to enable License Tracking on all your servers
And have it run for a few weeks!
This builds database ‘userlicenses.nsf’ on your administration server
Which only contains a last logged in date for recent users.
You can manually create this report by:
Writing down each user and home mail server
Checking to see if they have a record in userlicenses.nsf. If so, note down the date
You can imagine that this will take a very long time
We’ve created this in Excel for you
Saturday, 8 June 13
48. 5. Inactive users - Automatically
Click on the blue button beside 5. Inactive Users
This takes a long time on a large domain
This will
Open your Notes client
You may be prompted for your Notes client password
It will then find your home notes server
It will open the directory on your home notes server
It will run down the ‘Person’ view and for each person
Look at their entry on the userlicenses.nsf database on the admin server
If it finds one, it copies the last login timestamp onto the spreadsheet.
This means
You have to have at least read-only access to the directory
Saturday, 8 June 13
50. 5. Inactive users - Automatically
This has
Scanned all users in your directory
Found any corresponding entries in userlicenses.nsf
Broken them into a row containing username, home server and last login date
You can now
Sort by last login date
Use this to establish inactive users
We recommend:
You run this on a weekly/monthly basis as part of your normal reporting
Check with HR to see if these people are long-term absence, or actual leavers
Saturday, 8 June 13